TypeDefinitionFactory { private TypeDefinitionFactory() { documentTypeDefinitionClass = DocumentTypeDefinitionImpl.class; folderTypeDefinitionClass = FolderTypeDefinitionImpl.class; policyTypeDefinitionClass = PolicyTypeDefinitionImpl.class; relationshipTypeDefinitionClass = RelationshipTypeDefinitionImpl.class; itemTypeDefinitionClass = ItemTypeDefinitionImpl.class; secondaryTypeDefinitionClass = SecondaryTypeDefinitionImpl.class; defaultNamespace = null; defaultControllableAcl = false; defaultControllablePolicy = false; defaultQueryable = true; defaultFulltextIndexed = false; TypeMutabilityImpl typeMutability = new TypeMutabilityImpl(); typeMutability.setCanCreate(false); typeMutability.setCanUpdate(false); typeMutability.setCanDelete(false); defaultTypeMutability = typeMutability; } private  TypeDefinitionFactory(); static TypeDefinitionFactory newInstance(); Class<? extends MutableDocumentTypeDefinition> getDocumentTypeDefinitionClass(); void setDocumentTypeDefinitionClass(
            Class<? extends MutableDocumentTypeDefinition> documentTypeDefinitionClass); Class<? extends MutableFolderTypeDefinition> getFolderTypeDefinitionClass(); void setFolderTypeDefinitionClass(Class<? extends MutableFolderTypeDefinition> folderTypeDefinitionClass); Class<? extends MutablePolicyTypeDefinition> getPolicyTypeDefinitionClass(); void setPolicyTypeDefinitionClass(Class<? extends MutablePolicyTypeDefinition> policyTypeDefinitionClass); Class<? extends MutableRelationshipTypeDefinition> getRelationshipTypeDefinitionClass(); void setRelationshipTypeDefinitionClass(
            Class<? extends MutableRelationshipTypeDefinition> relationshipTypeDefinitionClass); Class<? extends MutableItemTypeDefinition> getItemTypeDefinitionClass(); void setItemTypeDefinitionClass(Class<? extends MutableItemTypeDefinition> itemTypeDefinitionClass); Class<? extends MutableSecondaryTypeDefinition> getSecondaryTypeDefinitionClass(); void setSecondaryTypeDefinitionClass(
            Class<? extends MutableSecondaryTypeDefinition> secondaryTypeDefinitionClass); String getDefaultNamespace(); void setDefaultNamespace(String defaultNamespace); boolean getDefaultIsFulltextIndexed(); void setDefaultIsFulltextIndexed(boolean defaultIsFullTextIndexed); boolean getDefaultControllableAcl(); void setDefaultControllableAcl(boolean defaultControllableAcl); boolean getDefaultControllablePolicy(); void setDefaultControllablePolicy(boolean defaultControllablePolicy); boolean getDefaultQueryable(); void setDefaultQueryable(boolean defaultQueryable); boolean getDefaultFulltextIndexed(); void setDefaultFulltextIndexed(boolean defaultFulltextIndexed); TypeMutability getDefaultTypeMutability(); void setDefaultTypeMutability(TypeMutability defaultTypeMutability); TypeMutability createTypeMutability(Boolean canCreate, Boolean canUpdate, Boolean canDelete); MutableDocumentTypeDefinition createBaseDocumentTypeDefinition(CmisVersion cmisVersion); MutableDocumentTypeDefinition createDocumentTypeDefinition(CmisVersion cmisVersion, String parentId); MutableFolderTypeDefinition createBaseFolderTypeDefinition(CmisVersion cmisVersion); MutableFolderTypeDefinition createFolderTypeDefinition(CmisVersion cmisVersion, String parentId); MutablePolicyTypeDefinition createBasePolicyTypeDefinition(CmisVersion cmisVersion); MutablePolicyTypeDefinition createPolicyTypeDefinition(CmisVersion cmisVersion, String parentId); MutableRelationshipTypeDefinition createBaseRelationshipTypeDefinition(CmisVersion cmisVersion); MutableRelationshipTypeDefinition createRelationshipTypeDefinition(CmisVersion cmisVersion,
            String parentId); MutableItemTypeDefinition createBaseItemTypeDefinition(CmisVersion cmisVersion); MutableItemTypeDefinition createItemTypeDefinition(CmisVersion cmisVersion, String parentId); MutableSecondaryTypeDefinition createBaseSecondaryTypeDefinition(CmisVersion cmisVersion); MutableSecondaryTypeDefinition createSecondaryTypeDefinition(CmisVersion cmisVersion, String parentId); MutableTypeDefinition createChildTypeDefinition(TypeDefinition parentTypeDefinition, String id); MutableTypeDefinition createChildTypeDefinition(TypeDefinition parentTypeDefinition, String id,
            String localName, String queryName, String displayName, String description,
            boolean includePropertyDefinitions, CmisVersion cmisVersion); MutablePropertyDefinition<?> createPropertyDefinition(String id, String displayName, String description,
            PropertyType datatype, Cardinality cardinality, Updatability updateability, boolean inherited,
            boolean required, boolean queryable, boolean orderable); Choice<T> createChoice(String displayName, T value); Choice<T> createChoice(String displayName, List<T> value); Choice<T> createChoiceWithSubChoices(String displayName, List<Choice<T>> subChoice); TypeDefinitionList createTypeDefinitionList(List<TypeDefinition> list, boolean hasMoreItems,
            BigInteger numItems); TypeDefinitionList createTypeDefinitionList(Map<String, TypeDefinition> allTypes, String typeId,
            Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount); TypeDefinitionList createTypeDefinitionList(Map<String, TypeDefinition> allTypes, String typeId,
            Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, CmisVersion cmisVersion); TypeDefinitionContainer createTypeDefinitionContainer(TypeDefinition typeDef,
            List<TypeDefinitionContainer> children); List<TypeDefinitionContainer> createTypeDescendants(Map<String, TypeDefinition> allTypes, String typeId,
            BigInteger depth, Boolean includePropertyDefinitions); List<TypeDefinitionContainer> createTypeDescendants(Map<String, TypeDefinition> allTypes, String typeId,
            BigInteger depth, Boolean includePropertyDefinitions, CmisVersion cmisVersion); MutableTypeDefinition copy(TypeDefinition sourceTypeDefintion, boolean includePropertyDefinitions); MutableTypeDefinition copy(TypeDefinition sourceTypeDefintion, boolean includePropertyDefinitions,
            CmisVersion cmisVersion); MutablePropertyDefinition<?> copy(PropertyDefinition<?> sourcePropertyDefinition);  }
@Test public void testTypeDefinitionFactory() { TypeDefinitionFactory tdf = TypeDefinitionFactory.newInstance(); assertNotNull(tdf); assertNotNull(tdf.getDocumentTypeDefinitionClass()); assertNotNull(tdf.getFolderTypeDefinitionClass()); assertNotNull(tdf.getPolicyTypeDefinitionClass()); assertNotNull(tdf.getRelationshipTypeDefinitionClass()); assertNotNull(tdf.getItemTypeDefinitionClass()); assertNotNull(tdf.getSecondaryTypeDefinitionClass()); }