org.alfresco.cmis.mapping
Class CMISMapping

java.lang.Object
  extended by org.alfresco.cmis.mapping.CMISMapping
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class CMISMapping
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean

CMIS <-> Alfresco mappings


Field Summary
static org.alfresco.service.namespace.QName CMIS_DATATYPE_HTML
           
static org.alfresco.service.namespace.QName CMIS_DATATYPE_ID
           
static org.alfresco.service.namespace.QName CMIS_DATATYPE_URI
           
static org.alfresco.service.namespace.QName CMIS_DATATYPE_XML
           
static java.lang.String CMIS_EXT_NS
           
static java.lang.String CMIS_EXT_URI
           
static java.lang.String CMIS_MODEL_NAME
          The Alfresco CMIS Model name.
static java.lang.String CMIS_MODEL_NS
          The Alfresco CMIS Namespace
static org.alfresco.service.namespace.QName CMIS_MODEL_QNAME
          The QName for the Alfresco CMIS Model.
static java.lang.String CMIS_MODEL_URI
           
static org.alfresco.service.namespace.QName DOCUMENT_QNAME
           
static org.alfresco.service.namespace.QName FILESYSTEM_OBJECT_QNAME
           
static CMISTypeId FILESYSTEM_OBJECT_TYPE_ID
           
static org.alfresco.service.namespace.QName FOLDER_QNAME
           
protected static org.apache.commons.logging.Log logger
           
static org.alfresco.service.namespace.QName OBJECT_QNAME
           
static CMISTypeId OBJECT_TYPE_ID
           
static org.alfresco.service.namespace.QName POLICY_QNAME
           
static org.alfresco.service.namespace.QName RELATIONSHIP_QNAME
           
 
Constructor Summary
CMISMapping()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.lang.String buildPrefixEncodedString(org.alfresco.service.namespace.QName qname)
           
 java.util.Map getActionEvaluators(CMISScope scope)
          Gets the Action Evaluators applicable for the given CMIS Scope
 org.alfresco.service.namespace.QName getAlfrescoType(org.alfresco.service.namespace.QName cmisTypeQName)
          Given a CMIS model type map it to the appropriate Alfresco type.
 java.lang.String getCmisPropertyId(org.alfresco.service.namespace.QName propertyQName)
           
 org.alfresco.service.namespace.QName getCmisType(org.alfresco.service.namespace.QName typeQName)
          Given an Alfresco model type map it to the appropriate type.
 CMISTypeId getCmisTypeId(CMISScope scope, org.alfresco.service.namespace.QName typeQName)
          Gets the CMIS Type Id given the Alfresco QName for the type in any Alfresco model
 CMISTypeId getCmisTypeId(org.alfresco.service.namespace.QName classQName)
           
 CMISTypeId getCmisTypeId(java.lang.String typeId)
          Gets the CMIS Type Id given the serialized type Id
 CMISDataTypeEnum getDataType(org.alfresco.service.cmr.dictionary.DataTypeDefinition datatype)
          Get the CMIS property type for a property
 CMISDataTypeEnum getDataType(org.alfresco.service.namespace.QName dataType)
           
 AbstractProperty getPropertyAccessor(CMISPropertyId propertyId)
          Get a Property Accessor
 org.alfresco.service.namespace.QName getPropertyQName(java.lang.String cmisPropertyName)
          Lookup a CMIS property name and get the Alfresco property QName
 java.util.Collection getReportedPermissions(java.lang.String permission, java.util.Set permissions, boolean hasFull, boolean isDirect, org.alfresco.opencmis.CMISAccessControlFormatEnum format)
           
 java.lang.String getSetPermission(java.lang.String permission)
           
 boolean isRemappedType(org.alfresco.service.namespace.QName typeQName)
          Is Alfresco Type mapped to an alternative CMIS Type?
 boolean isValidCmisDocument(org.alfresco.service.namespace.QName typeQName)
          Is this a valid CMIS document type?
 boolean isValidCmisDocumentOrFolder(org.alfresco.service.namespace.QName typeQName)
          Is this a valid cmis document or folder type (not a relationship)
 boolean isValidCmisFolder(org.alfresco.service.namespace.QName typeQName)
          Is this a valid CMIS folder type?
 boolean isValidCmisPolicy(org.alfresco.service.namespace.QName typeQName)
          Is this a valid CMIS policy type?
 boolean isValidCmisRelationship(org.alfresco.service.namespace.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.
 void setCMISService(CMISServices cmisService)
           
 void setServiceRegistry(ServiceRegistry serviceRegistry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger

CMIS_MODEL_NS

public static java.lang.String CMIS_MODEL_NS
The Alfresco CMIS Namespace


CMIS_MODEL_URI

public static java.lang.String CMIS_MODEL_URI

CMIS_EXT_NS

public static java.lang.String CMIS_EXT_NS

CMIS_EXT_URI

public static java.lang.String CMIS_EXT_URI

CMIS_MODEL_NAME

public static java.lang.String CMIS_MODEL_NAME
The Alfresco CMIS Model name.


CMIS_MODEL_QNAME

public static org.alfresco.service.namespace.QName CMIS_MODEL_QNAME
The QName for the Alfresco CMIS Model.


CMIS_DATATYPE_ID

public static org.alfresco.service.namespace.QName CMIS_DATATYPE_ID

CMIS_DATATYPE_URI

public static org.alfresco.service.namespace.QName CMIS_DATATYPE_URI

CMIS_DATATYPE_XML

public static org.alfresco.service.namespace.QName CMIS_DATATYPE_XML

CMIS_DATATYPE_HTML

public static org.alfresco.service.namespace.QName CMIS_DATATYPE_HTML

OBJECT_QNAME

public static org.alfresco.service.namespace.QName OBJECT_QNAME

FILESYSTEM_OBJECT_QNAME

public static org.alfresco.service.namespace.QName FILESYSTEM_OBJECT_QNAME

DOCUMENT_QNAME

public static org.alfresco.service.namespace.QName DOCUMENT_QNAME

FOLDER_QNAME

public static org.alfresco.service.namespace.QName FOLDER_QNAME

RELATIONSHIP_QNAME

public static org.alfresco.service.namespace.QName RELATIONSHIP_QNAME

POLICY_QNAME

public static org.alfresco.service.namespace.QName POLICY_QNAME

OBJECT_TYPE_ID

public static CMISTypeId OBJECT_TYPE_ID

FILESYSTEM_OBJECT_TYPE_ID

public static CMISTypeId FILESYSTEM_OBJECT_TYPE_ID
Constructor Detail

CMISMapping

public CMISMapping()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

setServiceRegistry

public void setServiceRegistry(ServiceRegistry serviceRegistry)
Parameters:
serviceRegistry -

setCMISService

public void setCMISService(CMISServices cmisService)

getCmisTypeId

public CMISTypeId getCmisTypeId(java.lang.String typeId)
Gets the CMIS Type Id given the serialized type Id

Parameters:
typeId - type id in the form of /_
Returns:

getCmisTypeId

public CMISTypeId getCmisTypeId(CMISScope scope,
                                org.alfresco.service.namespace.QName typeQName)
Gets the CMIS Type Id given the Alfresco QName for the type in any Alfresco model

Parameters:
typeQName -
Returns:

getCmisTypeId

public CMISTypeId getCmisTypeId(org.alfresco.service.namespace.QName classQName)

buildPrefixEncodedString

public java.lang.String buildPrefixEncodedString(org.alfresco.service.namespace.QName qname)

isValidCmisDocumentOrFolder

public boolean isValidCmisDocumentOrFolder(org.alfresco.service.namespace.QName typeQName)
Is this a valid cmis document or folder type (not a relationship)

Parameters:
dictionaryService -
typeQName -
Returns:

isValidCmisFolder

public boolean isValidCmisFolder(org.alfresco.service.namespace.QName typeQName)
Is this a valid CMIS folder type?

Parameters:
dictionaryService -
typeQName -
Returns:

isValidCmisDocument

public boolean isValidCmisDocument(org.alfresco.service.namespace.QName typeQName)
Is this a valid CMIS document type?

Parameters:
dictionaryService -
typeQName -
Returns:

isValidCmisPolicy

public boolean isValidCmisPolicy(org.alfresco.service.namespace.QName typeQName)
Is this a valid CMIS policy type?

Parameters:
dictionaryService -
typeQName -
Returns:

isValidCmisRelationship

public boolean isValidCmisRelationship(org.alfresco.service.namespace.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.

Parameters:
dictionaryService -
associationQName -
Returns:

getCmisType

public org.alfresco.service.namespace.QName getCmisType(org.alfresco.service.namespace.QName typeQName)
Given an Alfresco model type map it to the appropriate type. Maps cm:folder and cm:content to the CMIS definitions

Parameters:
typeQName -
Returns:

isRemappedType

public boolean isRemappedType(org.alfresco.service.namespace.QName typeQName)
Is Alfresco Type mapped to an alternative CMIS Type?

Parameters:
typeQName -
Returns:

getAlfrescoType

public org.alfresco.service.namespace.QName getAlfrescoType(org.alfresco.service.namespace.QName cmisTypeQName)
Given a CMIS model type map it to the appropriate Alfresco type.

Parameters:
cmisTypeQName -
Returns:

getDataType

public CMISDataTypeEnum getDataType(org.alfresco.service.cmr.dictionary.DataTypeDefinition datatype)
Get the CMIS property type for a property

Parameters:
dictionaryService -
propertyQName -
Returns:

getDataType

public CMISDataTypeEnum getDataType(org.alfresco.service.namespace.QName dataType)

getPropertyQName

public org.alfresco.service.namespace.QName getPropertyQName(java.lang.String cmisPropertyName)
Lookup a CMIS property name and get the Alfresco property QName

Parameters:
dictionaryService -
namespaceService -
cmisPropertyName -
Returns:

getCmisPropertyId

public java.lang.String getCmisPropertyId(org.alfresco.service.namespace.QName propertyQName)
Parameters:
namespaceService -
propertyQName -
Returns:

getPropertyAccessor

public AbstractProperty getPropertyAccessor(CMISPropertyId propertyId)
Get a Property Accessor

Parameters:
propertyId -
Returns:

getActionEvaluators

public java.util.Map getActionEvaluators(CMISScope scope)
Gets the Action Evaluators applicable for the given CMIS Scope

Parameters:
cmisScope -
Returns:

getReportedPermissions

public java.util.Collection getReportedPermissions(java.lang.String permission,
                                                   java.util.Set permissions,
                                                   boolean hasFull,
                                                   boolean isDirect,
                                                   org.alfresco.opencmis.CMISAccessControlFormatEnum format)

getSetPermission

public java.lang.String getSetPermission(java.lang.String permission)
Parameters:
permission -
Returns:
permission to set


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.