diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java index c99e9c4555..e246873943 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java @@ -33,11 +33,14 @@ import static org.springframework.http.HttpMethod.DELETE; import static org.springframework.http.HttpMethod.GET; import static org.springframework.http.HttpMethod.POST; import static org.springframework.http.HttpMethod.PUT; +import static org.springframework.http.HttpStatus.OK; import com.google.gson.JsonObject; import org.alfresco.rest.core.RestAPI; import org.alfresco.rest.rm.model.site.RMSite; +import org.alfresco.utility.data.DataUser; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @@ -52,6 +55,9 @@ import org.springframework.stereotype.Component; @Scope (value = "prototype") public class RMSiteAPI extends RestAPI { + @Autowired + private DataUser dataUser; + /** * Get the RM site * @@ -139,4 +145,22 @@ public class RMSiteAPI extends RestAPI "ig-sites/rm" )); } + + /** + * Checks if the RM site exists or not + * + * @return true if the RM site exists, false otherwise. + * @throws Exception for the following cases: + *