if (cmisVersion != CmisVersion.CMIS_1_0) {
if (capabilities.getCreatablePropertyTypes() != null) {
CreatablePropertyTypes creatablePropertyTypes = capabilities.getCreatablePropertyTypes();
CmisCreatablePropertyTypesType target = new CmisCreatablePropertyTypesType();
result.setCapabilityCreatablePropertyTypes(target);
if (creatablePropertyTypes.canCreate() != null) {
for (PropertyType pt : creatablePropertyTypes.canCreate()) {
target.getCanCreate().add(convert(EnumPropertyType.class, pt));
}
}
convertExtension(creatablePropertyTypes, target);
}
if (capabilities.getNewTypeSettableAttributes() != null) {
NewTypeSettableAttributes newTypeSettableAttributes = capabilities.getNewTypeSettableAttributes();
CmisNewTypeSettableAttributes target = new CmisNewTypeSettableAttributes();
result.setCapabilityNewTypeSettableAttributes(target);
target.setId(newTypeSettableAttributes.canSetId() == null ? true : newTypeSettableAttributes.canSetId());
target.setLocalName(newTypeSettableAttributes.canSetLocalName() == null ? true
: newTypeSettableAttributes.canSetLocalName());
target.setLocalNamespace(newTypeSettableAttributes.canSetLocalNamespace() == null ? true
: newTypeSettableAttributes.canSetLocalNamespace());
target.setDisplayName(newTypeSettableAttributes.canSetDisplayName() == null ? true
: newTypeSettableAttributes.canSetDisplayName());
target.setQueryName(newTypeSettableAttributes.canSetQueryName() == null ? true
: newTypeSettableAttributes.canSetQueryName());
target.setDescription(newTypeSettableAttributes.canSetDescription() == null ? true
: newTypeSettableAttributes.canSetDescription());
target.setCreatable(newTypeSettableAttributes.canSetCreatable() == null ? true
: newTypeSettableAttributes.canSetCreatable());
target.setFileable(newTypeSettableAttributes.canSetFileable() == null ? true
: newTypeSettableAttributes.canSetFileable());
target.setQueryable(newTypeSettableAttributes.canSetQueryable() == null ? true
: newTypeSettableAttributes.canSetQueryable());
target.setFulltextIndexed(newTypeSettableAttributes.canSetFulltextIndexed() == null ? true
: newTypeSettableAttributes.canSetFulltextIndexed());
target.setIncludedInSupertypeQuery(newTypeSettableAttributes.canSetIncludedInSupertypeQuery() == null ? true
: newTypeSettableAttributes.canSetIncludedInSupertypeQuery());
target.setControllablePolicy(newTypeSettableAttributes.canSetControllablePolicy() == null ? true
: newTypeSettableAttributes.canSetControllablePolicy());
target.setControllableACL(newTypeSettableAttributes.canSetControllableAcl() == null ? true
: newTypeSettableAttributes.canSetControllableAcl());
convertExtension(newTypeSettableAttributes, target);
}
}