Package org.alfresco.opencmis.mapping
Class CMISMapping
java.lang.Object
org.alfresco.opencmis.mapping.CMISMapping
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class CMISMapping
extends Object
implements org.springframework.beans.factory.InitializingBean
CMIS <-> Alfresco mappings. It additionally excludes a list of QNames based
on a user defined list
- Author:
- andyh
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic QName
static final String
static QName
static QName
static QName
static QName
static String
static String
static String
The Alfresco CMIS Model name.static String
The Alfresco CMIS Namespacestatic QName
The QName for the Alfresco CMIS Model.static String
static final String
Basic permissions.static final String
protected DictionaryService
static QName
static QName
static QName
protected NamespaceService
static QName
static String
static QName
static QName
static QName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildPrefixEncodedString
(QName qname) getAlfrescoClass
(QName cmisTypeQName) Given a CMIS model type map it to the appropriate Alfresco type.getAlfrescoDataType
(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) getAlfrescoName
(String typeId) getCmisPropertyId
(QName propertyQName) getCmisType
(QName typeQName) Given an Alfresco model type map it to the appropriate type.getCmisTypeId
(QName classQName) getCmisTypeId
(org.apache.chemistry.opencmis.commons.enums.BaseTypeId scope, QName typeQName) Gets the CMIS Type Id given the Alfresco QName for the type in any Alfresco modelorg.apache.chemistry.opencmis.commons.enums.CmisVersion
org.apache.chemistry.opencmis.commons.enums.PropertyType
getDataType
(DataTypeDefinition datatype) Get the CMIS property type for a propertyorg.apache.chemistry.opencmis.commons.enums.PropertyType
getDataType
(QName dataType) getReportedPermissions
(String permission, Set<String> permissions, boolean hasFull, boolean isDirect, CMISAccessControlFormatEnum format) getSetPermission
(String permission) boolean
isExcluded
(QName typeQName) boolean
isRemappedType
(QName typeQName) Is Alfresco Type mapped to an alternative CMIS Type?boolean
isValidCmisDocument
(QName typeQName) Is this a valid CMIS document type?boolean
isValidCmisFolder
(QName typeQName) Is this a valid CMIS folder type?boolean
isValidCmisItem
(QName typeQName) Is this a valid CMIS item type?boolean
isValidCmisObject
(org.apache.chemistry.opencmis.commons.enums.BaseTypeId scope, QName qname) boolean
isValidCmisPolicy
(QName typeQName) Is this a valid CMIS policy type?boolean
isValidCmisRelationship
(QName associationQName) Is an association valid in CMIS? It must be a non-child relationship and the source and target must both be valid CMIS types.boolean
isValidCmisRelationshipEndPoint
(QName typeQName) boolean
isValidCmisSecondaryType
(QName typeQName) Is this a valid CMIS secondary type?void
setCmisVersion
(org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) void
setDictionaryService
(DictionaryService dictionaryService) void
setFilter
(QNameFilter filter) void
setNamespaceService
(NamespaceService namespaceService)
-
Field Details
-
CMIS_MODEL_NS
The Alfresco CMIS Namespace -
CMIS_MODEL_URI
-
CMIS_EXT_NS
-
CMIS_EXT_URI
-
CMIS_MODEL_NAME
The Alfresco CMIS Model name. -
CMIS_MODEL_QNAME
The QName for the Alfresco CMIS Model. -
CMIS_DATATYPE_ID
-
CMIS_DATATYPE_URI
-
CMIS_DATATYPE_XML
-
CMIS_DATATYPE_HTML
-
OBJECT_QNAME
-
DOCUMENT_QNAME
-
FOLDER_QNAME
-
RELATIONSHIP_QNAME
-
POLICY_QNAME
-
SECONDARY_TYPES_QNAME
-
ASPECTS_QNAME
-
ITEM_QNAME
-
OBJECT_TYPE_ID
-
CMIS_READ
Basic permissions.- See Also:
-
CMIS_WRITE
- See Also:
-
CMIS_ALL
- See Also:
-
dictionaryService
-
namespaceService
-
-
Constructor Details
-
CMISMapping
public CMISMapping()
-
-
Method Details
-
setCmisVersion
public void setCmisVersion(org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) -
getCmisVersion
public org.apache.chemistry.opencmis.commons.enums.CmisVersion getCmisVersion() -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
setFilter
-
setDictionaryService
- Parameters:
dictionaryService
- dictionaryService
-
setNamespaceService
- Parameters:
namespaceService
- service
-
getNamespaceService
- Returns:
- namespaceService
-
getDictionaryService
- Returns:
- dictionaryService
-
isExcluded
-
getCmisTypeId
public String getCmisTypeId(org.apache.chemistry.opencmis.commons.enums.BaseTypeId scope, QName typeQName) Gets the CMIS Type Id given the Alfresco QName for the type in any Alfresco model- Parameters:
scope
- BaseTypeIdtypeQName
- QName- Returns:
- String
-
getCmisTypeId
-
buildPrefixEncodedString
-
getAlfrescoName
-
isValidCmisObject
public boolean isValidCmisObject(org.apache.chemistry.opencmis.commons.enums.BaseTypeId scope, QName qname) -
isValidCmisFolder
Is this a valid CMIS folder type?- Parameters:
typeQName
- QName- Returns:
- boolean
-
isValidCmisDocument
Is this a valid CMIS document type?- Parameters:
typeQName
- QName- Returns:
- boolean
-
isValidCmisSecondaryType
Is this a valid CMIS secondary type?- Parameters:
typeQName
- QName- Returns:
- boolean
-
isValidCmisPolicy
Is this a valid CMIS policy type?- Parameters:
typeQName
- QName- Returns:
- boolean
-
isValidCmisRelationship
Is an association valid in CMIS? It must be a non-child relationship and the source and target must both be valid CMIS types.- Parameters:
associationQName
- QName- Returns:
- boolean
-
isValidCmisRelationshipEndPoint
-
isValidCmisItem
Is this a valid CMIS item type?- Parameters:
typeQName
- QName- Returns:
- boolean
-
getCmisType
Given an Alfresco model type map it to the appropriate type. Maps cm:folder and cm:content to the CMIS definitions -
isRemappedType
Is Alfresco Type mapped to an alternative CMIS Type? -
getAlfrescoClass
Given a CMIS model type map it to the appropriate Alfresco type.- Parameters:
cmisTypeQName
- QName- Returns:
- QName
-
getDataType
public org.apache.chemistry.opencmis.commons.enums.PropertyType getDataType(DataTypeDefinition datatype) Get the CMIS property type for a property- Parameters:
datatype
- DataTypeDefinition- Returns:
- PropertyType
-
getDataType
-
getAlfrescoDataType
public QName getAlfrescoDataType(org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType) -
getCmisPropertyId
- Parameters:
propertyQName
- QName- Returns:
- String
-
getReportedPermissions
public Collection<Pair<String,Boolean>> getReportedPermissions(String permission, Set<String> permissions, boolean hasFull, boolean isDirect, CMISAccessControlFormatEnum format) -
getSetPermission
- Parameters:
permission
- String- Returns:
- permission to set
-