Class FilePlanAPI
- java.lang.Object
-
- org.alfresco.rest.requests.ModelRequest<Request>
-
- org.alfresco.rest.rm.community.requests.RMModelRequest
-
- org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI
-
public class FilePlanAPI extends RMModelRequest
File plan REST API Wrapper- Since:
- 2.6
- Author:
- Ramona Popa, Tuna Aksoy
-
-
Constructor Summary
Constructors Constructor Description FilePlanAPI(RMRestWrapper rmRestWrapper)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordCategorycreateRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId)RecordCategorycreateRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId, String parameters)Creates a root record category.FilePlangetFilePlan(String filePlanId)FilePlangetFilePlan(String filePlanId, String parameters)Gets a file plan.RecordCategoryCollectiongetRootRecordCategories(String filePlanId)RecordCategoryCollectiongetRootRecordCategories(String filePlanId, String parameters)Gets the children (root categories) of a file plan.FilePlanupdateFilePlan(FilePlan filePlanModel, String filePlanId)FilePlanupdateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)Updates a file plan.
-
-
-
Constructor Detail
-
FilePlanAPI
public FilePlanAPI(RMRestWrapper rmRestWrapper)
Constructor.- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Detail
-
getFilePlan
public FilePlan getFilePlan(String filePlanId, String parameters)
Gets a file plan.- Parameters:
filePlanId- The identifier of a file planparameters- The URL parameters to add- Returns:
- The
FilePlanfor the givenfilePlanId - Throws:
RuntimeException- for the following cases:filePlanIdis not a valid format- authentication fails
- current user does not have permission to read
filePlanId filePlanIddoes not exist
-
getRootRecordCategories
public RecordCategoryCollection getRootRecordCategories(String filePlanId)
-
getRootRecordCategories
public RecordCategoryCollection getRootRecordCategories(String filePlanId, String parameters)
Gets the children (root categories) of a file plan.- Parameters:
filePlanId- The identifier of a file planparameters- The URL parameters to add- Returns:
- The
RecordCategoryCollectionfor the givenfilePlanId - Throws:
RuntimeException- for the following cases:- authentication fails
- current user does not have permission to read
filePlanId filePlanIddoes not exist
-
createRootRecordCategory
public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId)
-
createRootRecordCategory
public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId, String parameters)
Creates a root record category.- Parameters:
recordCategoryModel- The record category model which holds the informationfilePlanId- The identifier of a file planparameters- The URL parameters to add- Returns:
- The created
RecordCategory - Throws:
RuntimeException- for the following cases:filePlanIdis not a valid format orfilePlanIdis invalid- authentication fails
- current user does not have permission to add children to
filePlanId filePlanIdsdoes not exist- new name clashes with an existing node in the current parent container
- model integrity exception, including node name with invalid characters
-
updateFilePlan
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
Updates a file plan.- Parameters:
filePlanModel- The file plan model which holds the informationfilePlanId- The identifier of the file planparameters- The URL parameters to add- Throws:
RuntimeException- for the following cases:- the update request is invalid or
filePlanIdis not a valid format orfilePlanModelis invalid - authentication fails
- current user does not have permission to update
filePlanId filePlanIddoes not exist- model integrity exception, including file name with invalid characters
- the update request is invalid or
-
-