cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



3.3
CMIS

Back to CMIS.




Introduction


This document describes the mapping between the Alfresco Content Repository and the CMIS technical specification.


Repository Capabilities


  • Multi-filing -> TRUE
  • Unfiling -> FALSE
  • Version-specific-filing -> FALSE
  • PWC-Searchable -> TRUE
  • PWC-Updatable -> TRUE
  • Query-non-latest-versions -> FALSE 
  • Inner-join -> FALSE
  • Outer-join -> FALSE
  • Full-text-query -> Full-text + Properties

Model Mapping


  • Note: Node Refs are serialized ${sys:store_protocol}://${sys:store_id}/${sys:node-uuid}
  • Note: (*) - Not supported

Object properties


  • ObjectId -> sys:referencable node ref (as a String) + '/{versionLabel}' if versioned
  • Uri (*)
  • ObjectTypeId -> M2TypeDefinition.name (refer to Meta Model Mapping) as a String
  • CreatedBy -> cm:creator
  • CreationDate  -> cm:created
  • LastModifiedBy -> cm:modifier
  • LastModificationDate -> cm:modified
  • ChangeToken ->

Document (inc. Object) Properties


  • Name  -> cm:name
  • IsImmutable -> TRUE if cm:lockable.lockType == readonly || cm:versionable.auto-version == false
  • IsLatestVersion -> TRUE  (FALSE if PWC)
  • IsMajorVersion -> VersionService().getCurrentVersion().getVersionType() == VersionType.MAJOR   (FALSE if PWC)
  • IsLatestMajorVersion -> IS_MAJOR_VERSION
  • VersionLabel -> cm:versionLabel
  • VersionSeriesId -> sys:referencable node ref (as a String)
  • IsVersionSeriesCheckedOut -> TRUE if COCI.getWorkingCopy is not null
  • VersionSeriesCheckedOutBy -> if COCI.getWorkingCopy is not null cm:lockable.lockOwner
  • VERSION_SERIES_CHECKED_OUT_ID  -> if COCI.getWorkingCopy is not null then COCI.getWorkingCopy noderef (as a String)
  • CheckinComment -> VersionService().getCurrentVersion().getDescription()
  • ContentStreamAllowed -> ContentStreamAllowed.ALLOWED.toString()
  • ContentStreamLength -> cm:content.size
  • ContentStreamMimeType -> cm:content.mimetype
  • ContentStreamFilename-> cm:name
  • ContentStreamUri

Folder (inc. Object) properties


  • Name -> cm:name
  • ParentId -> primary parent node ref
  • AllowedChildObjecTypeIds -> M2ChildAssociationDefinition.targetClassName

Relationship (inc. Object) properties


  • ObjecTypeId -> M2AssociationDefinition.name (refer to Meta Model Mapping)
  • CreatedBy (*)
  • CreationDate (*)
  • LastModifiedBy (*)
  • LastModificationDate (*)
  • SourceId -> AssociationRef.sourceRef node ref
  • TargetId -> AssociationRef.targetRef node ref

Meta Model Mapping


Base Object Types


  • DOCUMENT_OBJECT_TYPE  -> cm:content type
  • FOLDER_OBJECT_TYPE  -> cm:folder type
  • RELATIONSHIP_OBJECT_TYPE  -> simulate (no natural mapping)

NOTE: This means any type outside the cm:content and cm:folder hierarchy is not exposed via the CMIS interface.


Object Type Definition


  • ObjectTypeId -> M2TypeDefinition.name - serialized as D|F|R|P/{prefix}_localName
  • ObjectTypeQueryName -> M2TypeDefinition.name - serialized as prefix_localName (For the base types, use name as defined in the CMIS spec)
  • ObjectTypeDisplayName  -> M2TypeDefinition.title
  • ParentTypeId  -> M2TypeDefinition.parentName - serialized as D|F|R|P/{prefix}_localName
  • RootTypeQueryName  -> as defined in the CMIS spec
  • Description  -> M2TypeDefinition.description
  • Creatable  -> true for files and folders and false otherwise
  • Fileable  -> true for files and folders and false otherwise
  • Queryable -> true for files and folders and false otherwise
  • Controllable -> false
  • Versionable  -> true
  • ContentStreamAllowed  -> type == cm:content ? allowed : notallowed
  • AllowedSourceTypes -> Assocs - DD source definition if a valid CMIS type
  • AllowedTargetTypes -> Assocs - DD target definition if a valid CMIS type

Property Type Definition


  • PropertyName -> M2PropertyDefinition.name - serialized as prefix_localName
  • PropertyId -> M2PropertyDefinition.name - serialized as {uri}localName or just the CMIS propertyname
  • DisplayName -> M2PropertyDefinition.title
  • Description -> M2PropertyDefinition.description
  • IsInherited -> true if the type definition is inherited from a super type (or a mandatory aspect inherits from another aspect)
  • PropertyType -> M2PropertyDefinition.dataType (refer to Property Type Mapping)
  • Cardinality -> M2PropertyDefinition.isMultiValued
  • MaximumLength -> Set if there is an appropriate constraint
  • SchemaURI -> null
  • Encoding -> null
  • Choices  -> M2PropertyDefinition.constraints['list of values'], if any
  • OpenChoice  -> false
  • Required  -> M2PropertyDefinition.isMandatoryEnforced
  • DefaultValue  -> M2PropertyDefinition.defaultValue
  • Updatability  -> M2PropertyDefinition.isProtected
  • Queryable - if indexed
  • Orderable - if indexed and tokenization supports ordering

Property Type Mapping


  • String -> d:text, d:mltext (server locale only?), d:category?
  • Decimal -> d:float, d:double
  • Integer -> d:int, d:long
  • Boolean -> d:boolean
  • DateTime  -> d:date, d:datetime
  • Uri
  • Id -> d:text
  • Xml
  • Html

ID Mapping - In the CMIS model, a data type of d:qname, d:noderef is mapped to a CMIS ID in type and property definitions. They are converted to text in the property mapping.

The following Alfresco data types are not mapped - d:any, d:content, d:childassocref, d:assocref, dSmiley Tongueath, d:locale, d:version

Important: Any Alfresco property whose data type is not mapped to CMIS MUST be excluded from CMIS type definitions.


Permissions


Document


  • DeleteObject -> DeleteNode
  • UpdateProperties  -> WriteProperties
  • CheckOut  -> CheckOut
  • CancelCheckout  -> CancelCheckOut
  • CheckIn  -> CheckIn (on PWC)
  • DeleteAllVersions  -> TRUE
  • AddDocumentToFolder  -> LinkChildren
  • RemoveDocumentFromFolder
  • SetContentStream  -> WriteContent
  • DeleteContentStream  -> WriteProperties
  • GetAllVersions  -> TRUE
  • GetDocumentParents  -> TRUE
  • GetRelationships  -> TRUE
  • GetProperties  -> ReadProperties
  • GetContentStream  -> ReadContent
  • MoveObject  -> DeleteNode?

Folder


  • DeleteObject  -> DeleteNode
  • DeleteTree  -> DeleteNode
  • UpdateProperties  -> WriteProperties
  • GetChildren  -> ReadChildren
  • GetDescendants  -> ReadChildren
  • GetFolderParent  -> TRUE
  • GetProperties  -> ReadProperties
  • GetRelationships  -> TRUE
  • MoveObject  -> DeleteNode?

Relationship


  • DeleteObject  -> TRUE
  • UpdateProperties  -> N/A
  • GetProperties  -> N/A
  • GetRelationships