public class NuxeoTypeHelper extends Object
Maps Nuxeo types to CMIS types using the following rules:
Modifier | Constructor and Description |
---|---|
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 a
DocumentType . |
protected |
NuxeoTypeHelper(String id,
String nuxeoTypeId,
org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion)
Helper to construct one CMIS type from a secondary type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addBasePropertyDefinitions() |
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 a
DocumentType . |
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 |
getBaseTypeId(DocumentModel doc) |
static org.apache.chemistry.opencmis.commons.enums.BaseTypeId |
getBaseTypeId(DocumentType type) |
static String |
getParentTypeId(DocumentType documentType)
Gets the remapped parent type id, or
null if the type is to be ignored. |
protected static org.apache.chemistry.opencmis.commons.enums.PropertyType |
getPropertType(SimpleType type) |
protected static boolean |
isComplexPropertiesEnabled() |
protected static String |
mappedId(String id)
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) |
public static final String NUXEO_DOCUMENT
public static final String NUXEO_FOLDER
public static final String NUXEO_RELATION
public static final String NUXEO_RELATION_DEFAULT
public static final String NUXEO_FILE
public static final String NUXEO_ORDERED_FOLDER
public static final String FACET_TYPE_PREFIX
public static final String NX_DUBLINCORE
public static final String NX_DC_TITLE
public static final String NX_DC_DESCRIPTION
public static final String NX_DC_CREATED
public static final String NX_DC_CREATOR
public static final String NX_DC_MODIFIED
public static final String NX_DC_LAST_CONTRIBUTOR
public static final String NX_ICON
public static final String NX_REL_SOURCE
public static final String NX_REL_TARGET
public static final String NX_DIGEST
public static final String NX_ISVERSION
public static final String NX_ISCHECKEDIN
public static final String NX_FACETS
public static final String NX_LIFECYCLE_STATE
public static final String NX_PARENT_ID
public static final String NX_PATH_SEGMENT
public static final String ENABLE_COMPLEX_PROPERTIES
public static final String NX_POS
protected org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition t
protected Map<String,String> propertyToSchema
protected org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion
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)
DocumentType
.protected NuxeoTypeHelper(String id, String nuxeoTypeId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion)
protected static boolean isComplexPropertiesEnabled()
public static String getParentTypeId(DocumentType documentType)
null
if the type is to be ignored.public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructDocumentType(DocumentType documentType, String parentId, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion)
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructSecondaryType(CompositeType type, org.apache.chemistry.opencmis.commons.enums.CmisVersion cmisVersion)
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)
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)
DocumentType
.protected void constructBaseSecondaryType(String id, String nuxeoTypeId)
protected void addBasePropertyDefinitions()
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 addDocumentPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl t)
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)
protected static org.apache.chemistry.opencmis.commons.enums.PropertyType getPropertType(SimpleType type)
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentType type)
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentModel doc)
Copyright © 2015 Nuxeo SA. All rights reserved.