Search in sources :

Example 1 with MutableDocumentTypeDefinition

use of org.apache.chemistry.opencmis.commons.definitions.MutableDocumentTypeDefinition in project structr by structr.

the class CMISRepositoryService method getDocumentTypeDefinition.

private MutableDocumentTypeDefinition getDocumentTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {
    final TypeDefinitionFactory factory = TypeDefinitionFactory.newInstance();
    final MutableDocumentTypeDefinition def = factory.createDocumentTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_DOCUMENT.value());
    // content is required for Structr documents
    def.setContentStreamAllowed(ContentStreamAllowed.REQUIRED);
    initializeExtendedType(def, typeId);
    if (!includePropertyDefinitions) {
        def.removeAllPropertyDefinitions();
    }
    return def;
}
Also used : MutableDocumentTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.MutableDocumentTypeDefinition) TypeDefinitionFactory(org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory)

Aggregations

MutableDocumentTypeDefinition (org.apache.chemistry.opencmis.commons.definitions.MutableDocumentTypeDefinition)1 TypeDefinitionFactory (org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory)1