Class RMSiteAPI
java.lang.Object
org.alfresco.rest.requests.ModelRequest<Request>
org.alfresco.rest.rm.community.requests.RMModelRequest
org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI
RM Site REST API Wrapper
- Since:
- 2.6
- Author:
- Tuna Aksoy
-
Field Summary
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRMSite(RMSite rmSiteModel) Create the RM sitevoidDelete RM sitebooleanChecks if the RM site exists or notgetSite()Get the RM siteupdateRMSite(RMSite rmSiteModel) Update RM siteMethods inherited from class org.alfresco.rest.requests.ModelRequest
include, includePath, usingParams
-
Constructor Details
-
RMSiteAPI
Constructor- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Details
-
getSite
Get the RM site- Returns:
- The
RMSitefor the given file plan component id - Throws:
RuntimeException- for the following cases:- Api Response code 400 Invalid parameter: GET request is supported only for the RM site
- Api Response code 401 If authentication failed
- Api Response code 409 If RM Site does not exist
- Api Response code default Unexpected error
-
createRMSite
Create the RM site- Parameters:
rmSiteModel- The properties of the rm site to be created- Returns:
- The
RMSitewith the given properties - Throws:
RuntimeException- for the following cases:- Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid
- Api Response code 401 If authentication failed</
- Api Response code 409 RM Site already exists
- Api Response code default Unexpected error
-
deleteRMSite
public void deleteRMSite()Delete RM site- Throws:
RuntimeException- for the following cases:- Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site
- Api Response code 401 If authentication failed</
- Api Response code 403 Current user does not have permission to delete the site that is visible to them.
- Api Response code 404 RM site does not exist
- Api Response code default Unexpected error
-
updateRMSite
Update RM site- Parameters:
rmSiteModel- The properties to be updated- Returns:
- The updated
RMSite - Throws:
RuntimeException- for the following cases:- Api Response code 400 the update request is invalid
rmSiteModelis invalid - Api Response code 401 If authentication fails
- Api Response code 403 does not have permission to update
RMSite - Api Response code 404
RMSiteModeldoes not exist - Api Response code default Unexpected error,model integrity exception
- Api Response code 400 the update request is invalid
-
existsRMSite
public boolean existsRMSite()Checks if the RM site exists or not- Returns:
trueif the RM site exists,falseotherwise- Throws:
RuntimeException- for the following cases:- Api Response code 400 Invalid parameter: GET request is supported only for the RM site
- Api Response code 401 If authentication failed
- Api Response code 409 If RM Site does not exist
- Api Response code default Unexpected error
-