public class JcmsApp extends java.lang.Object implements JcmsRestConstants
CSRF_HEADER_NAME, HTTP_HEADERS, METHOD_OVERRIDE_HTTP_HEADER, UTS_ADMIN, UTS_CACHES, UTS_DATA_CHILDREN, UTS_DATA_PARAM, UTS_DATATYPE_ITEM, UTS_DATATYPE_LIST, UTS_JSYNC, UTS_JSYNC_REPLICA, UTS_LUCENE, UTS_LUCENE_CATEGORIES, UTS_LUCENE_PUBLICATIONS, UTS_MEMBER_ITEM, UTS_MEMBER_PHOTO_UPDATE, UTS_PRIVATE_RESOURCE, UTS_SEARCH, UTS_WHOAMI_ITEM, UTS_WORKFLOWS, UTS_WORKFLOWS_ITEM| Constructor and Description |
|---|
JcmsApp(ClientSession session) |
| Modifier and Type | Method and Description |
|---|---|
JcmsResource |
createData(java.lang.String dataTypeClassShortName,
org.restlet.data.Form fields)
Create a data of type given by the dataTypeClassShortName and the values set in the form fields.
|
JcmsResource |
createData(java.lang.String dataTypeClassShortName,
org.restlet.data.Form fields,
Authentication forcedAuthentication)
Create a data of type given by the dataTypeClassShortName and the values set in the form fields.
|
JcmsResource |
createDBFileDocument(java.io.File file,
org.restlet.data.Form parameters)
Create a DBFileDocument wrapping the file with the filename and the values set in the form fields.
|
JcmsResource |
createDocument(java.lang.String documentTypeClassShortName,
java.lang.String filename,
java.io.File file,
org.restlet.data.Form parameters,
java.io.File importDataXmlFile)
Create a custom FileDocument instance of the specified class, wrapping the file with the filename and the values set in the form fields.
|
JcmsResource |
createFileDocument(java.io.File file,
org.restlet.data.Form parameters)
Create a FileDocument wrapping the file with the filename and the values set in the form fields.
|
JcmsResource |
createFileDocument(java.lang.String filename,
java.io.File file,
org.restlet.data.Form parameters)
Create a FileDocument wrapping the file with the filename and the values set in the form fields.
|
JcmsResource |
deleteData(org.restlet.data.Reference dataRef) |
JcmsResource |
deleteData(org.restlet.data.Reference dataRef,
Authentication forcedAuthentication) |
JcmsResource |
deleteData(java.lang.String dataId) |
JcmsResource |
deleteData(java.lang.String dataId,
Authentication forcedAuthentication) |
JcmsResource |
disableDataWrite(java.lang.String msg) |
JcmsResource |
disableDataWrite(java.lang.String msg,
Authentication forcedAuthentication) |
JcmsResource |
disableMember(java.lang.String login)
Call to the member resource, given its login, with action disable.
|
JcmsResource |
downloadFile(java.lang.String fileLink) |
JcmsResource |
enableDataWrite(java.lang.String msg) |
JcmsResource |
enableDataWrite(java.lang.String msg,
Authentication forcedAuthentication) |
JcmsResource |
enableMember(java.lang.String login,
java.lang.String password)
Call to the member resource, given its login, with action enable, and with
the password given in parameter (in post).
|
JcmsResource |
findResource(org.restlet.data.Reference ref,
Relateds relateds) |
JcmsResource |
getAdminStatus() |
JcmsResource |
getAdminStatus(Authentication forcedAuthentication) |
java.lang.String |
getAdminStatusPath() |
JcmsResource |
getAllDataType() |
JcmsResource |
getAllDataType(Authentication forcedAuthentication) |
java.lang.String |
getAllDataTypePath() |
JcmsResource |
getAllWorkflows() |
JcmsResource |
getAllWorkflows(Authentication forcedAuthentication) |
java.lang.String |
getAllWorkflowsPath() |
java.util.List<DataElement> |
getChildren(java.lang.String dataId)
Gives the list of children of a data, given its id, if its type supports it
(TreeNode, Group).
|
java.util.List<DataElement> |
getChildren(java.lang.String dataId,
Authentication forcedAuthentication,
Relateds relateds)
Gives the list of children of a data, given its id, if its type supports it
(TreeNode, Group).
|
JcmsResource |
getChildrenData(java.lang.String dataId)
Send a request to get the set of children of a data with a given JCMS id.
|
JcmsResource |
getChildrenData(java.lang.String dataId,
Authentication forcedAuthentication)
Send a request to get the set of children of a data with a given JCMS id.
|
JcmsResource |
getChildrenData(java.lang.String dataId,
Authentication forcedAuthentication,
Relateds relateds)
Send a request to get the set of children of a data with a given JCMS id.
|
JcmsResource |
getChildrenData(java.lang.String dataId,
Relateds relateds)
Send a request to get the set of children of a data with a given JCMS id.
|
java.lang.String |
getChildrenDataPath(java.lang.String dataId)
Construct the URI to get the set of children of a data, given its JCMS id.
|
java.lang.String |
getCreateDataPath(java.lang.String dataTypeClassShortName)
Retrieve the REST path to use to create a new instance of the specified class
|
java.lang.String |
getCreateDBFileDocumentPath()
Deprecated.
|
java.lang.String |
getCreateFileDocumentPath()
Deprecated.
|
JcmsResource |
getData(java.lang.String dataId)
Send a request to find a data with a given JCMS id.
|
JcmsResource |
getData(java.lang.String dataId,
Authentication forcedAuthentication)
Send a request to find a data with a given JCMS id.
|
JcmsResource |
getData(java.lang.String dataId,
Authentication forcedAuthentication,
Relateds relateds)
Send a request to find a data with a given JCMS id.
|
JcmsResource |
getData(java.lang.String dataId,
Relateds relateds)
Send a request to find a data with a given JCMS id.
|
JcmsResource |
getDataList(java.lang.String[] dataId)
Send a request to find a data with a given JCMS id.
|
java.lang.String |
getDataPath(java.lang.String dataId)
Construct the URI for a data, given its JCMS id.
|
JcmsResource |
getDataType(java.lang.String typeshortclassname) |
JcmsResource |
getDataType(java.lang.String typeshortclassname,
Authentication forcedAuthentication) |
java.lang.String |
getDataTypePath(java.lang.String typeshortclassname) |
DataElement |
getDefaultWorkspace()
Gives the default Workspace of JCMS, if it is visible for the loggedMember.
|
DataElement |
getDefaultWorkspace(Authentication forcedAuthentication,
Relateds relateds)
Gives the default Workspace of JCMS, if it is visible for the loggedMember.
|
JcmsResource |
getDefaultWorkspaceData()
Gives the default Workspace of JCMS, if it is visible for the loggedMember.
|
JcmsResource |
getDefaultWorkspaceData(Authentication forcedAuthentication,
Relateds relateds)
Gives the default Workspace of JCMS, if it is visible for the loggedMember.
|
java.lang.String |
getIdFromLogin(java.lang.String login)
High level method.
|
JcmsResource |
getMember(java.lang.String login) |
JcmsResource |
getMember(java.lang.String login,
Authentication forcedAuthentication) |
JcmsResource |
getMember(java.lang.String login,
Authentication forcedAuthentication,
Relateds relateds) |
JcmsResource |
getMember(java.lang.String login,
Relateds relateds) |
JcmsResource |
getMemberList() |
JcmsResource |
getMemberList(Authentication forcedAuthentication) |
JcmsResource |
getMemberList(Authentication forcedAuthentication,
Relateds relateds) |
JcmsResource |
getMemberList(Relateds relateds) |
java.lang.String |
getMemberListPath() |
java.lang.String |
getMemberPath(java.lang.String login) |
DataElement |
getRootCategory()
Gives the root of JCMS categories, if it is visible for the loggedMember.
|
DataElement |
getRootCategory(Authentication forcedAuthentication,
Relateds relateds)
Gives the root of JCMS categories, if it is visible for the loggedMember.
|
JcmsResource |
getRootCategoryData()
Gives the root of JCMS categories, if it is visible for the loggedMember.
|
JcmsResource |
getRootCategoryData(Authentication forcedAuthentication,
Relateds relateds)
Gives the root of JCMS categories, if it is visible for the loggedMember.
|
java.lang.String |
getSearchPath() |
ClientSession |
getSession() |
java.lang.String |
getUpdateFileDocumentPath(java.lang.String id)
Gives the URI of the update of a FileDocument.
|
java.lang.String |
getUploadMemberPhotoPath(java.lang.String login) |
JcmsResource |
getWorkflow(java.lang.String wfId) |
JcmsResource |
getWorkflow(java.lang.String wfId,
Authentication forcedAuthentication) |
java.lang.String |
getWorkflowPath(java.lang.String wfId) |
JcmsResource |
importDataFromSource(java.lang.String importSourceId) |
JcmsResource |
importDataFromSource(java.lang.String importSourceId,
Authentication forcedAuthentication) |
JcmsResource |
lock(org.restlet.data.Reference fileDocRef)
Call to the FileDocument resource, given the id of the FileDocument, with action lock.
|
JcmsResource |
lock(java.lang.String fileDocId)
Call to the FileDocument resource, given the id of the FileDocument, with action lock.
|
JcmsResource |
search(org.restlet.data.Form fields) |
JcmsResource |
search(org.restlet.data.Form fields,
Authentication forcedAuthentication) |
JcmsResource |
search(org.restlet.data.Form fields,
Authentication forcedAuthentication,
Relateds relateds) |
JcmsResource |
search(org.restlet.data.Form fields,
Relateds relateds) |
JcmsResource |
unlock(org.restlet.data.Reference fileDocRef)
Call to the FileDocument resource, given the id of the FileDocument, with action unlock.
|
JcmsResource |
unlock(java.lang.String fileDocId)
Call to the FileDocument resource, given the id of the FileDocument, with action unlock.
|
JcmsResource |
updateData(org.restlet.data.Reference dataRef,
org.restlet.data.Form fields) |
JcmsResource |
updateData(org.restlet.data.Reference dataRef,
org.restlet.data.Form fields,
Authentication forcedAuthentication) |
JcmsResource |
updateData(java.lang.String dataId,
org.restlet.data.Form fields) |
JcmsResource |
updateData(java.lang.String dataId,
org.restlet.data.Form fields,
Authentication forcedAuthentication) |
JcmsResource |
updateFileDocument(org.restlet.data.Reference dataRef,
java.lang.String filename,
java.io.File file,
org.restlet.data.Form parameters)
Update a FileDocument.
|
JcmsResource |
updateFileDocument(java.lang.String id,
java.lang.String filename,
java.io.File file,
org.restlet.data.Form parameters)
Update a FileDocument.
|
JcmsResource |
updateMemberPhoto(java.lang.String login,
java.io.File file)
Update a member Photo.
|
JcmsResource |
whoAmI()
Retrieve the MemberResource corresponding to the current logged Member.
|
public JcmsApp(ClientSession session)
public ClientSession getSession()
public JcmsResource findResource(org.restlet.data.Reference ref, Relateds relateds) throws RestException
RestExceptionpublic java.lang.String getDataPath(java.lang.String dataId)
dataId - the JCMS idpublic JcmsResource getData(java.lang.String dataId) throws RestException
dataId - the JCMS idRestExceptionpublic JcmsResource getData(java.lang.String dataId, Authentication forcedAuthentication) throws RestException
dataId - the JCMS idforcedAuthentication - possible specific authentication for this requestRestExceptionpublic JcmsResource getData(java.lang.String dataId, Relateds relateds) throws RestException
dataId - the JCMS idrelateds - possible relatedsRestExceptionpublic JcmsResource getData(java.lang.String dataId, Authentication forcedAuthentication, Relateds relateds) throws RestException
dataId - the JCMS idforcedAuthentication - possible specific authentication for this requestrelateds - possible relatedsRestExceptionpublic JcmsResource getDataList(java.lang.String[] dataId) throws RestException
dataId - the JCMS idRestExceptionpublic java.lang.String getChildrenDataPath(java.lang.String dataId)
dataId - the JCMS idpublic JcmsResource getChildrenData(java.lang.String dataId) throws RestException
dataId - the JCMS idRestExceptionpublic java.util.List<DataElement> getChildren(java.lang.String dataId)
dataId - public java.util.List<DataElement> getChildren(java.lang.String dataId, Authentication forcedAuthentication, Relateds relateds)
dataId - forcedAuthentication - possible specific authentication for this requestrelateds - possible relatedspublic JcmsResource getChildrenData(java.lang.String dataId, Authentication forcedAuthentication) throws RestException
dataId - the JCMS idforcedAuthentication - possible specific authentication for this requestRestExceptionpublic JcmsResource getChildrenData(java.lang.String dataId, Relateds relateds) throws RestException
dataId - the JCMS idrelateds - possible relatedsRestExceptionpublic JcmsResource getChildrenData(java.lang.String dataId, Authentication forcedAuthentication, Relateds relateds) throws RestException
dataId - the JCMS idforcedAuthentication - possible specific authentication for this requestrelateds - possible relatedsRestExceptionpublic java.lang.String getSearchPath()
public JcmsResource search(org.restlet.data.Form fields) throws RestException
RestExceptionpublic JcmsResource search(org.restlet.data.Form fields, Authentication forcedAuthentication) throws RestException
RestExceptionpublic JcmsResource search(org.restlet.data.Form fields, Relateds relateds) throws RestException
RestExceptionpublic JcmsResource search(org.restlet.data.Form fields, Authentication forcedAuthentication, Relateds relateds) throws RestException
RestExceptionpublic JcmsResource downloadFile(java.lang.String fileLink) throws RestException
RestExceptionpublic java.lang.String getMemberListPath()
public JcmsResource getMemberList() throws RestException
RestExceptionpublic JcmsResource getMemberList(Authentication forcedAuthentication) throws RestException
RestExceptionpublic JcmsResource getMemberList(Relateds relateds) throws RestException
RestExceptionpublic JcmsResource getMemberList(Authentication forcedAuthentication, Relateds relateds) throws RestException
RestExceptionpublic java.lang.String getMemberPath(java.lang.String login)
public java.lang.String getUploadMemberPhotoPath(java.lang.String login)
public JcmsResource getMember(java.lang.String login) throws RestException
RestExceptionpublic JcmsResource getMember(java.lang.String login, Authentication forcedAuthentication) throws RestException
RestExceptionpublic JcmsResource getMember(java.lang.String login, Relateds relateds) throws RestException
RestExceptionpublic JcmsResource getMember(java.lang.String login, Authentication forcedAuthentication, Relateds relateds) throws RestException
RestExceptionpublic JcmsResource updateMemberPhoto(java.lang.String login, java.io.File file)
login - the login od the member to updatefilename - the filename which the new photofile - the new photo file (null to delete the previous photo)public JcmsResource whoAmI() throws RestException
ClientSession clientSession = new ClientSession("http://www.example.com/");
JcmsApp jcmsApp = new JcmsApp(clientSession);
JcmsResource memberResource = jcmsApp.whoAmI();
MemberElement memberDataElement = MemberElement.getFirstMemberElement(memberResource, clientSession);
String login = memberDataElement.getLogin();
RestException - if authentication could not be processed or if any other network error occuredpublic JcmsResource disableMember(java.lang.String login)
login - the login of the member to disablepublic JcmsResource enableMember(java.lang.String login, java.lang.String password)
login - the login of the member to enablepassword - the new password : mandatory to activate the memberpublic java.lang.String getIdFromLogin(java.lang.String login)
login - public java.lang.String getDataTypePath(java.lang.String typeshortclassname)
public JcmsResource getDataType(java.lang.String typeshortclassname) throws RestException
RestExceptionpublic JcmsResource getDataType(java.lang.String typeshortclassname, Authentication forcedAuthentication) throws RestException
RestExceptionpublic java.lang.String getAllDataTypePath()
public JcmsResource getAllDataType() throws RestException
RestExceptionpublic JcmsResource getAllDataType(Authentication forcedAuthentication) throws RestException
RestExceptionpublic java.lang.String getAllWorkflowsPath()
public JcmsResource getAllWorkflows() throws RestException
RestExceptionpublic JcmsResource getAllWorkflows(Authentication forcedAuthentication) throws RestException
RestExceptionpublic java.lang.String getWorkflowPath(java.lang.String wfId)
public JcmsResource getWorkflow(java.lang.String wfId) throws RestException
RestExceptionpublic JcmsResource getWorkflow(java.lang.String wfId, Authentication forcedAuthentication) throws RestException
RestExceptionpublic java.lang.String getAdminStatusPath()
public JcmsResource getAdminStatus() throws RestException
RestExceptionpublic JcmsResource getAdminStatus(Authentication forcedAuthentication) throws RestException
RestExceptionpublic java.lang.String getCreateDataPath(java.lang.String dataTypeClassShortName)
dataTypeClassShortName - type of the data to be createdpublic JcmsResource createData(java.lang.String dataTypeClassShortName, org.restlet.data.Form fields)
dataTypeClassShortName - type of the data to be createdfields - values to create the new datapublic JcmsResource createData(java.lang.String dataTypeClassShortName, org.restlet.data.Form fields, Authentication forcedAuthentication)
dataTypeClassShortName - type of the data to be createdfields - values to create the new dataforcedAuthentication - possible authenticatio nto use for this requestpublic JcmsResource updateData(java.lang.String dataId, org.restlet.data.Form fields)
public JcmsResource updateData(org.restlet.data.Reference dataRef, org.restlet.data.Form fields)
public JcmsResource updateData(java.lang.String dataId, org.restlet.data.Form fields, Authentication forcedAuthentication)
public JcmsResource updateData(org.restlet.data.Reference dataRef, org.restlet.data.Form fields, Authentication forcedAuthentication)
public JcmsResource deleteData(java.lang.String dataId)
public JcmsResource deleteData(org.restlet.data.Reference dataRef)
public JcmsResource deleteData(java.lang.String dataId, Authentication forcedAuthentication)
public JcmsResource deleteData(org.restlet.data.Reference dataRef, Authentication forcedAuthentication)
public java.lang.String getCreateFileDocumentPath()
public java.lang.String getCreateDBFileDocumentPath()
public JcmsResource createFileDocument(java.lang.String filename, java.io.File file, org.restlet.data.Form parameters)
filename - the filenamefile - the fileparameters - others parameters as set in DocUploadHandlerpublic JcmsResource createFileDocument(java.io.File file, org.restlet.data.Form parameters)
file - the fileparameters - others parameters as set in DocUploadHandlerpublic JcmsResource createDBFileDocument(java.io.File file, org.restlet.data.Form parameters)
file - the fileparameters - others parameters as set in DocUploadHandlerpublic JcmsResource createDocument(java.lang.String documentTypeClassShortName, java.lang.String filename, java.io.File file, org.restlet.data.Form parameters, java.io.File importDataXmlFile)
documentTypeClassShortName - the (eg: "FileDocument", "DBFileDocument", "MYCustomDocument")filename - the filenamefile - the fileparameters - others parameters as set in DocUploadHandlerimportDataXmlFile - an optional XML file, resulting from an XML export in JCMS, to populate the fields of the document to createpublic java.lang.String getUpdateFileDocumentPath(java.lang.String id)
id - the id of the given FileDocumentpublic JcmsResource updateFileDocument(java.lang.String id, java.lang.String filename, java.io.File file, org.restlet.data.Form parameters)
id - the id of the FileDocumentfilename - the filenamefile - the fileparameters - others parameters as set in DocUploadHandlerpublic JcmsResource updateFileDocument(org.restlet.data.Reference dataRef, java.lang.String filename, java.io.File file, org.restlet.data.Form parameters)
dataRef - the reference of the FileDocumentfilename - the filenamefile - the fileparameters - others parameters as set in DocUploadHandlerpublic JcmsResource lock(java.lang.String fileDocId)
fileDocId - the id of the FileDocumentpublic JcmsResource lock(org.restlet.data.Reference fileDocRef)
fileDocRef - the Reference of the FileDocumentpublic JcmsResource unlock(java.lang.String fileDocId)
fileDocId - the id of the FileDocumentpublic JcmsResource unlock(org.restlet.data.Reference fileDocRef)
fileDocRef - the Reference of the FileDocumentpublic JcmsResource disableDataWrite(java.lang.String msg)
public JcmsResource disableDataWrite(java.lang.String msg, Authentication forcedAuthentication)
public JcmsResource enableDataWrite(java.lang.String msg)
public JcmsResource enableDataWrite(java.lang.String msg, Authentication forcedAuthentication)
public JcmsResource importDataFromSource(java.lang.String importSourceId)
public JcmsResource importDataFromSource(java.lang.String importSourceId, Authentication forcedAuthentication)
public JcmsResource getRootCategoryData() throws RestException
RestExceptionpublic DataElement getRootCategory()
public JcmsResource getRootCategoryData(Authentication forcedAuthentication, Relateds relateds) throws RestException
forcedAuthentication - relateds - RestExceptionpublic DataElement getRootCategory(Authentication forcedAuthentication, Relateds relateds)
forcedAuthentication - relateds - public JcmsResource getDefaultWorkspaceData() throws RestException
RestExceptionpublic DataElement getDefaultWorkspace()
public JcmsResource getDefaultWorkspaceData(Authentication forcedAuthentication, Relateds relateds) throws RestException
forcedAuthentication - relateds - RestExceptionpublic DataElement getDefaultWorkspace(Authentication forcedAuthentication, Relateds relateds)
forcedAuthentication - relateds - Copyright © 2001-2021 Jalios SA. All Rights Reserved.