Class UnfiledRecordFolderAPI
- java.lang.Object
-
- org.alfresco.rest.requests.ModelRequest<Request>
-
- org.alfresco.rest.rm.community.requests.RMModelRequest
-
- org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI
-
public class UnfiledRecordFolderAPI extends RMModelRequest
Unfiled Record Folders REST API Wrapper- Since:
- 2.6
- Author:
- Ramona Popa
-
-
Constructor Summary
Constructors Constructor Description UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnfiledContainerChildcreateUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId)UnfiledContainerChildcreateUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)Creates an unfiled record folder child.voiddeleteUnfiledRecordFolder(String unfiledRecordFolderId)Deletes an unfiled record folder.UnfiledRecordFoldergetUnfiledRecordFolder(String unfiledRecordFolderId)UnfiledRecordFoldergetUnfiledRecordFolder(String unfiledRecordFolderId, String parameters)Gets an unfiled record folder.UnfiledContainerChildCollectiongetUnfiledRecordFolderChildren(String unfiledRecordFolderId)UnfiledContainerChildCollectiongetUnfiledRecordFolderChildren(String unfiledRecordFolderId, String parameters)Gets the children of an unfiled record folderUnfiledRecordFolderupdateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId)UnfiledRecordFolderupdateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)Updates an unfiled record folderUnfiledContainerChilduploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)Create a record from file resource
-
-
-
Constructor Detail
-
UnfiledRecordFolderAPI
public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper)
- Parameters:
rmRestWrapper- RM REST Wrapper
-
-
Method Detail
-
getUnfiledRecordFolder
public UnfiledRecordFolder getUnfiledRecordFolder(String unfiledRecordFolderId)
-
getUnfiledRecordFolder
public UnfiledRecordFolder getUnfiledRecordFolder(String unfiledRecordFolderId, String parameters)
Gets an unfiled record folder.- Parameters:
unfiledRecordFolderId- The identifier of a unfiled record folderparameters- The URL parameters to add- Returns:
- The
UnfiledRecordFolderfor the givenunfiledRecordFolderId - Throws:
RuntimeException- for the following cases:unfiledRecordFolderIdis not a valid format- authentication fails
- current user does not have permission to read
unfiledRecordFolderId unfiledRecordFolderIddoes not exist
-
getUnfiledRecordFolderChildren
public UnfiledContainerChildCollection getUnfiledRecordFolderChildren(String unfiledRecordFolderId)
-
getUnfiledRecordFolderChildren
public UnfiledContainerChildCollection getUnfiledRecordFolderChildren(String unfiledRecordFolderId, String parameters)
Gets the children of an unfiled record folder- Parameters:
unfiledRecordFolderId- The identifier of an unfiled records folderparameters- The URL parameters to add- Returns:
- The
UnfiledRecordFolderChildCollectionfor the givenunfiledRecordFolderId - Throws:
RuntimeException- for the following cases:- authentication fails
- current user does not have permission to read
unfiledRecordFolderId unfiledRecordFolderIddoes not exist
-
createUnfiledRecordFolderChild
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId)
-
createUnfiledRecordFolderChild
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)
Creates an unfiled record folder child. Can be a record or an unfiled record folder.- Parameters:
unfiledRecordFolderChildModel- The unfiled folder child model which holds the informationunfiledRecordFolderId- The identifier of an unfiled folderparameters- The URL parameters to add- Returns:
- The created
UnfiledRecordFolderChild - Throws:
RuntimeException- for the following cases:unfiledRecordFolderIdis not a valid format orunfiledRecordFolderChildModelis invalid- authentication fails
- current user does not have permission to add children to
unfiledRecordFolderId unfiledRecordFolderIddoes not exist- new name clashes with an existing node in the current parent container
- model integrity exception, including node name with invalid characters
-
uploadRecord
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)
Create a record from file resource- Parameters:
unfiledRecordFolderChildModel-UnfiledContainerChildfor electronic record to be createdunfiledRecordFolderChildContent-Filepointing to the content of the electronic record to be createdunfiledRecordFolderId- The identifier of a unfiled record folder- Returns:
- newly created
UnfiledContainerChild - Throws:
RuntimeException- for invalid recordModel JSON strings
-
updateUnfiledRecordFolder
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId)
-
updateUnfiledRecordFolder
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)
Updates an unfiled record folder- Parameters:
unfiledRecordFolderModel- The unfiled record folder model which holds the informationunfiledRecordFolderId- The identifier of an unfiled record folderparameters- The URL parameters to addreturns- The updatedUnfiledRecordFolder- Throws:
RuntimeException- for the following cases:- the update request is invalid or
unfiledRecordFolderIdis not a valid format orunfiledRecordFolderModelis invalid - authentication fails
- current user does not have permission to update
unfiledRecordFolderId unfiledRecordFolderIddoes not exist- the updated name clashes with an existing root category of special container in the current fileplan
- model integrity exception, including file name with invalid characters
- the update request is invalid or
-
deleteUnfiledRecordFolder
public void deleteUnfiledRecordFolder(String unfiledRecordFolderId)
Deletes an unfiled record folder.- Parameters:
unfiledRecordFolderId- The identifier of a unfiled record folder- Throws:
RuntimeException- for the following cases:unfiledRecordFolderIdis not a valid format- authentication fails
- current user does not have permission to delete
unfiledRecordFolderId unfiledRecordFolderIddoes not existunfiledRecordFolderIdis locked and cannot be deleted
-
-