org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl Java Examples
The following examples show how to use
org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypeManager.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private static void addFolderPropertyDefinitions(FolderTypeDefinitionImpl type) { type.addPropertyDefinition(createPropDef(PropertyIds.PARENT_ID, "Parent Id", "Parent Id", PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY, false, false)); type.addPropertyDefinition(createPropDef(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, "Allowed Child Object Type Ids", "Allowed Child Object Type Ids", PropertyType.ID, Cardinality.MULTI, Updatability.READONLY, false, false)); type.addPropertyDefinition(createPropDef(PropertyIds.PATH, "Path", "Path", PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false)); /* * Properties of the LogicalDOC folder */ type.addPropertyDefinition(createPropDef(PROP_DESCRIPTION, "Description", "Description", PropertyType.STRING, Cardinality.SINGLE, Updatability.READWRITE, false, false)); type.addPropertyDefinition(createPropDef(PROP_TYPE, "Type", "Type", PropertyType.INTEGER, Cardinality.SINGLE, Updatability.READONLY, false, false)); }
Example #2
Source File: CmisTypeDefinitionFactoryBean.java From spring-content with Apache License 2.0 | 5 votes |
public MutableFolderTypeDefinition createFolderTypeDefinition(Class<?> entityClass, Class<?> repoClass, CmisFolder metadata, CmisVersion cmisVersion, String parentId) { MutableFolderTypeDefinition folderType = new FolderTypeDefinitionImpl(); folderType.setBaseTypeId(BaseTypeId.CMIS_FOLDER); folderType.setParentTypeId(parentId); folderType.setIsControllableAcl(false); folderType.setIsControllablePolicy(false); folderType.setIsCreatable(repoClass != null); folderType.setDescription("Folder"); folderType.setDisplayName("Folder"); folderType.setIsFileable(isFileable(repoClass)); folderType.setIsFulltextIndexed(false); folderType.setIsIncludedInSupertypeQuery(true); folderType.setLocalName("Folder"); folderType.setLocalNamespace(""); folderType.setIsQueryable(false); folderType.setQueryName("cmis:folder"); folderType.setId(BaseTypeId.CMIS_FOLDER.value()); if (cmisVersion != CmisVersion.CMIS_1_0) { TypeMutabilityImpl typeMutability = new TypeMutabilityImpl(); typeMutability.setCanCreate(false); typeMutability.setCanUpdate(false); typeMutability.setCanDelete(false); folderType.setTypeMutability(typeMutability); } this.addBasePropertyDefinitions(folderType, entityClass, cmisVersion, parentId != null); this.addFolderPropertyDefinitions(folderType, cmisVersion, parentId != null); return folderType; }
Example #3
Source File: FolderTypeDefintionWrapper.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 4 votes |
public FolderTypeDefintionWrapper(CMISMapping cmisMapping, PropertyAccessorMapping accessorMapping, PropertyLuceneBuilderMapping luceneBuilderMapping, String typeId, DictionaryService dictionaryService, ClassDefinition cmisClassDef) { this.dictionaryService = dictionaryService; alfrescoName = cmisClassDef.getName(); alfrescoClass = cmisMapping.getAlfrescoClass(alfrescoName); typeDef = new FolderTypeDefinitionImpl(); typeDef.setBaseTypeId(BaseTypeId.CMIS_FOLDER); typeDef.setId(typeId); typeDef.setLocalName(alfrescoName.getLocalName()); typeDef.setLocalNamespace(alfrescoName.getNamespaceURI()); boolean isSystemFolder = false; if (BaseTypeId.CMIS_FOLDER.value().equals(typeId)) { typeDef.setQueryName(ISO9075.encodeSQL(typeId)); typeDef.setParentTypeId(null); } else { typeDef.setQueryName(ISO9075.encodeSQL(cmisMapping.buildPrefixEncodedString(alfrescoName))); QName parentQName = cmisMapping.getCmisType(cmisClassDef.getParentName()); if (cmisMapping.isValidCmisFolder(parentQName)) { typeDef.setParentTypeId(cmisMapping.getCmisTypeId(BaseTypeId.CMIS_FOLDER, parentQName)); } if (alfrescoName.equals(ContentModel.TYPE_SYSTEM_FOLDER) || cmisMapping.getDictionaryService().isSubClass(alfrescoName, ContentModel.TYPE_SYSTEM_FOLDER)) { isSystemFolder = true; } } typeDef.setDisplayName(null); typeDef.setDescription(null); typeDef.setIsCreatable(!isSystemFolder); typeDef.setIsQueryable(true); typeDef.setIsFulltextIndexed(true); typeDef.setIsControllablePolicy(false); typeDef.setIsControllableAcl(true); typeDef.setIsIncludedInSupertypeQuery(cmisClassDef.getIncludedInSuperTypeQuery()); typeDef.setIsFileable(true); typeDefInclProperties = CMISUtils.copy(typeDef); setTypeDefinition(typeDef, typeDefInclProperties); createOwningPropertyDefinitions(cmisMapping, accessorMapping, luceneBuilderMapping, dictionaryService, cmisClassDef); createActionEvaluators(accessorMapping, BaseTypeId.CMIS_FOLDER); }