|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.cmis.CmsCmisRelationHelper
public class CmsCmisRelationHelper
Helper class for CMIS CRUD operations on relation objects.
Since CMIS requires any object to have an ID by which it is accessed, but OpenCms relations are not addressable by ids, we invent an artificial relation id string of the form REL_(SOURCE_ID)_(TARGET_ID)_(TYPE).
| Nested Class Summary | |
|---|---|
static class |
CmsCmisRelationHelper.RelationKey
A class which contains the necessary information to identify a relation object. |
| Field Summary | |
|---|---|
static java.lang.String |
RELATION_ID_PREFIX
The prefix used to identify relation ids. |
static java.util.regex.Pattern |
RELATION_PATTERN
The pattern which relation ids should match. |
| Constructor Summary | |
|---|---|
CmsCmisRelationHelper(CmsCmisRepository repository)
Creates a new relation helper for the given repository. |
|
| Method Summary | |
|---|---|
protected org.apache.chemistry.opencmis.commons.data.Acl |
collectAcl(CmsObject cms,
CmsResource resource,
boolean onlyBasic)
Compiles the ACL for a relation. |
protected org.apache.chemistry.opencmis.commons.data.AllowableActions |
collectAllowableActions(CmsObject cms,
CmsResource file,
CmsRelation relation)
Collects the allowable actions for a relation. |
protected org.apache.chemistry.opencmis.commons.data.ObjectData |
collectObjectData(CmsCmisCallContext context,
CmsObject cms,
CmsResource resource,
CmsRelation relation,
java.util.Set<java.lang.String> filter,
boolean includeAllowableActions,
boolean includeAcl)
Fills in an ObjectData record. |
protected org.apache.chemistry.opencmis.commons.data.Properties |
collectProperties(CmsObject cms,
CmsResource resource,
CmsRelation relation,
java.util.Set<java.lang.String> orgfilter,
org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo)
Gathers all base properties of a file or folder. |
protected static java.lang.String |
createKey(CmsUUID source,
CmsUUID target,
java.lang.String relType)
Creates a relation id string from the source and target ids and a relation type. |
protected java.lang.String |
createReadableName(CmsRelation relation)
Creates a user-readable name from the given relation object. |
void |
deleteObject(CmsCmisCallContext context,
java.lang.String objectId,
boolean allVersions)
Deletes a CMIS object. |
org.apache.chemistry.opencmis.commons.data.Acl |
getAcl(CmsCmisCallContext context,
java.lang.String objectId,
boolean onlyBasicPermissions)
Gets the ACL for an object. |
org.apache.chemistry.opencmis.commons.data.AllowableActions |
getAllowableActions(CmsCmisCallContext context,
java.lang.String objectId)
Gets the allowable actions for an object. |
org.apache.chemistry.opencmis.commons.data.ObjectData |
getObject(CmsCmisCallContext context,
java.lang.String objectId,
java.lang.String filter,
boolean includeAllowableActions,
org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
java.lang.String renditionFilter,
boolean includePolicyIds,
boolean includeAcl)
Gets the data for a CMIS object. |
protected static CmsRelationType |
getRelationType(java.lang.String typeName)
Gets a relation type by name. |
protected CmsCmisRelationHelper.RelationKey |
parseRelationKey(java.lang.String id)
Extracts the source/target ids and the type from a relation id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RELATION_ID_PREFIX
public static final java.util.regex.Pattern RELATION_PATTERN
| Constructor Detail |
|---|
public CmsCmisRelationHelper(CmsCmisRepository repository)
repository - the repository| Method Detail |
|---|
protected static java.lang.String createKey(CmsUUID source,
CmsUUID target,
java.lang.String relType)
source - the source idtarget - the target idrelType - the relation type
protected static CmsRelationType getRelationType(java.lang.String typeName)
typeName - the relation type name
public void deleteObject(CmsCmisCallContext context,
java.lang.String objectId,
boolean allVersions)
I_CmsCmisObjectHelper
deleteObject in interface I_CmsCmisObjectHelpercontext - the call contextobjectId - the id of the object to deleteallVersions - flag to delete all versionI_CmsCmisObjectHelper.deleteObject(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean)
public org.apache.chemistry.opencmis.commons.data.Acl getAcl(CmsCmisCallContext context,
java.lang.String objectId,
boolean onlyBasicPermissions)
I_CmsCmisObjectHelper
getAcl in interface I_CmsCmisObjectHelpercontext - the call contextobjectId - the object idonlyBasicPermissions - flag to only get basic permissions
I_CmsCmisObjectHelper.getAcl(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean)
public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(CmsCmisCallContext context,
java.lang.String objectId)
I_CmsCmisObjectHelper
getAllowableActions in interface I_CmsCmisObjectHelpercontext - the call contextobjectId - the object id
I_CmsCmisObjectHelper.getAllowableActions(org.opencms.cmis.CmsCmisCallContext, java.lang.String)
public org.apache.chemistry.opencmis.commons.data.ObjectData getObject(CmsCmisCallContext context,
java.lang.String objectId,
java.lang.String filter,
boolean includeAllowableActions,
org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
java.lang.String renditionFilter,
boolean includePolicyIds,
boolean includeAcl)
I_CmsCmisObjectHelper
getObject in interface I_CmsCmisObjectHelpercontext - the CMIS call contextobjectId - the id of the objectfilter - the property filterincludeAllowableActions - flag to include allowable actionsincludeRelationships - flag to include relationshipsrenditionFilter - the rendition filter stringincludePolicyIds - flag to include policy idsincludeAcl - flag to include ACLs
I_CmsCmisObjectHelper.getObject(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, boolean, boolean)
protected org.apache.chemistry.opencmis.commons.data.Acl collectAcl(CmsObject cms,
CmsResource resource,
boolean onlyBasic)
cms - the CMS contextresource - the resource for which to collect the ACLsonlyBasic - flag to only include basic ACEs
protected org.apache.chemistry.opencmis.commons.data.AllowableActions collectAllowableActions(CmsObject cms,
CmsResource file,
CmsRelation relation)
cms - the current CMS contextfile - the source of the relationrelation - the relation object
protected org.apache.chemistry.opencmis.commons.data.ObjectData collectObjectData(CmsCmisCallContext context,
CmsObject cms,
CmsResource resource,
CmsRelation relation,
java.util.Set<java.lang.String> filter,
boolean includeAllowableActions,
boolean includeAcl)
context - the call contextcms - the CMS contextresource - the resource for which we want the ObjectDatarelation - the relation objectfilter - the property filter stringincludeAllowableActions - true if the allowable actions should be includedincludeAcl - true if the ACL entries should be included
protected org.apache.chemistry.opencmis.commons.data.Properties collectProperties(CmsObject cms,
CmsResource resource,
CmsRelation relation,
java.util.Set<java.lang.String> orgfilter,
org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo)
cms - the current CMS contextresource - the file for which we want the propertiesrelation - the relation objectorgfilter - the property filterobjectInfo - the object info handler
protected java.lang.String createReadableName(CmsRelation relation)
relation - the relation object
protected CmsCmisRelationHelper.RelationKey parseRelationKey(java.lang.String id)
id - the relation id
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||