Search in sources :

Example 1 with MutablePolicyTypeDefinition

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

the class CMISRepositoryService method getPolicyTypeDefinition.

private MutablePolicyTypeDefinition getPolicyTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {
    final TypeDefinitionFactory factory = TypeDefinitionFactory.newInstance();
    final MutablePolicyTypeDefinition def = factory.createPolicyTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_POLICY.value());
    def.setIsCreatable(false);
    initializeExtendedType(def, typeId);
    if (!includePropertyDefinitions) {
        def.removeAllPropertyDefinitions();
    }
    return def;
}
Also used : TypeDefinitionFactory(org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory) MutablePolicyTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.MutablePolicyTypeDefinition)

Aggregations

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