Class NuxeoTypeHelper
java.lang.Object
org.nuxeo.ecm.core.opencmis.impl.server.NuxeoTypeHelper
Nuxeo Type Utilities.
Maps Nuxeo types to CMIS types using the following rules:
- Only types containing dublincore are exposed,
- cmis:document and cmis:folder expose dublincore, and are not creatable,
- The Document type is not exposed,
- Types inheriting from Document are exposed as inheriting cmis:document,
- The Folder type is mapped to a concrete subtype of cmis:folder,
- Other folderish types directly under Folder are mapped to subtypes of cmis:folder as well.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.chemistry.opencmis.commons.enums.CmisVersion
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition
-
Constructor Summary
ModifierConstructorDescriptionprotected
NuxeoTypeHelper
(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Helper to construct one CMIS type from aDocumentType
.protected
NuxeoTypeHelper
(String id, String nuxeoTypeId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Helper to construct one CMIS type from a secondary type. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
addDocumentPropertyDefinitions
(org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl t) protected static void
addFolderPropertyDefinitions
(org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl t) protected static void
addRelationshipPropertyDefinitions
(org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl t) protected void
addSchemaPropertyDefinitions
(Schema schema) protected void
constructBaseDocumentType
(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable) Constructs the base for aDocumentType
.protected void
constructBaseSecondaryType
(String id, String nuxeoTypeId) Constructs the base for a secondary type.static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
constructCmisBase
(org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, SchemaManager schemaManager, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Constructs a base type, not mapped to a Nuxeo type.static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
constructDocumentType
(DocumentType documentType, String parentId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
constructSecondaryType
(CompositeType type, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) static org.apache.chemistry.opencmis.commons.enums.BaseTypeId
static org.apache.chemistry.opencmis.commons.enums.BaseTypeId
getBaseTypeId
(DocumentType type) static String
getParentTypeId
(DocumentType documentType) Gets the remapped parent type id, ornull
if the type is to be ignored.protected static org.apache.chemistry.opencmis.commons.enums.PropertyType
getPropertType
(SimpleType type) protected static boolean
protected static String
Turns a Nuxeo type into a CMIS type.protected static org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>
newPropertyDefinition
(String id, String displayName, org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType, org.apache.chemistry.opencmis.commons.enums.Cardinality cardinality, org.apache.chemistry.opencmis.commons.enums.Updatability updatability, boolean inherited, boolean required, boolean queryable, boolean orderable) protected static boolean
supportsBlobHolder
(DocumentType documentType)
-
Field Details
-
NUXEO_DOCUMENT
- See Also:
-
NUXEO_FOLDER
- See Also:
-
NUXEO_RELATION
- See Also:
-
NUXEO_RELATION_DEFAULT
- See Also:
-
NUXEO_FILE
- See Also:
-
NUXEO_ORDERED_FOLDER
- See Also:
-
FACET_TYPE_PREFIX
- See Also:
-
NX_DUBLINCORE
- See Also:
-
NX_DC_TITLE
- See Also:
-
NX_DC_DESCRIPTION
- See Also:
-
NX_DC_CREATED
- See Also:
-
NX_DC_CREATOR
- See Also:
-
NX_DC_MODIFIED
- See Also:
-
NX_DC_LAST_CONTRIBUTOR
- See Also:
-
NX_ICON
- See Also:
-
NX_REL_SOURCE
- See Also:
-
NX_REL_TARGET
- See Also:
-
NX_DIGEST
- See Also:
-
NX_ISVERSION
- See Also:
-
NX_ISCHECKEDIN
- See Also:
-
NX_ISTRASHED
- Since:
- 10.2
- See Also:
-
NX_FACETS
- See Also:
-
NX_LIFECYCLE_STATE
- See Also:
-
NX_PARENT_ID
- See Also:
-
NX_PATH_SEGMENT
- See Also:
-
ENABLE_COMPLEX_PROPERTIES
- See Also:
-
NX_POS
- Since:
- 6.0
- See Also:
-
t
protected org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition t -
propertyToSchema
-
cmisVersion
protected org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion
-
-
Constructor Details
-
NuxeoTypeHelper
protected NuxeoTypeHelper(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Helper to construct one CMIS type from aDocumentType
. -
NuxeoTypeHelper
protected NuxeoTypeHelper(String id, String nuxeoTypeId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Helper to construct one CMIS type from a secondary type.
-
-
Method Details
-
isComplexPropertiesEnabled
protected static boolean isComplexPropertiesEnabled() -
getParentTypeId
Gets the remapped parent type id, ornull
if the type is to be ignored. -
constructDocumentType
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructDocumentType(DocumentType documentType, String parentId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) -
constructSecondaryType
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructSecondaryType(CompositeType type, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) -
constructCmisBase
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructCmisBase(org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, SchemaManager schemaManager, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion) Constructs a base type, not mapped to a Nuxeo type. If not a secondary, it has the dublincore schema. -
addSchemaPropertyDefinitions
-
constructBaseDocumentType
protected void constructBaseDocumentType(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable) Constructs the base for aDocumentType
. -
constructBaseSecondaryType
Constructs the base for a secondary type. -
addBasePropertyDefinitions
protected void addBasePropertyDefinitions() -
addFolderPropertyDefinitions
protected static void addFolderPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl t) -
addRelationshipPropertyDefinitions
protected static void addRelationshipPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl t) -
addDocumentPropertyDefinitions
protected void addDocumentPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl t) -
newPropertyDefinition
protected static org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> newPropertyDefinition(String id, String displayName, org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType, org.apache.chemistry.opencmis.commons.enums.Cardinality cardinality, org.apache.chemistry.opencmis.commons.enums.Updatability updatability, boolean inherited, boolean required, boolean queryable, boolean orderable) -
supportsBlobHolder
-
mappedId
Turns a Nuxeo type into a CMIS type. -
getPropertType
protected static org.apache.chemistry.opencmis.commons.enums.PropertyType getPropertType(SimpleType type) -
getBaseTypeId
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentType type) -
getBaseTypeId
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentModel doc)
-