if (settableAttributes == null || Boolean.TRUE.equals(settableAttributes.canSetId())) { result.setId(typeId); } else if (settableAttributes != null) { failure = createResult(WARNING, "Flag 'id' in capability NewTypeSettableAttributes is not set!"); addResult(assertNotNull(settableAttributes.canSetId(), null, failure)); if (settableAttributes == null || Boolean.TRUE.equals(settableAttributes.canSetLocalName())) { result.setLocalName("tck:testlocal"); } else if (settableAttributes != null) { failure = createResult(WARNING, "Flag 'localName' in capability NewTypeSettableAttributes is not set!"); addResult(assertNotNull(settableAttributes.canSetLocalName(), null, failure)); if (settableAttributes == null || Boolean.TRUE.equals(settableAttributes.canSetLocalNamespace())) { result.setLocalNamespace("http://tck/testlocalnamespace"); } else if (settableAttributes != null) { failure = createResult(WARNING, "Flag 'localNamespace' in capability NewTypeSettableAttributes is not set!"); addResult(assertNotNull(settableAttributes.canSetLocalNamespace(), null, failure)); if (settableAttributes == null || Boolean.TRUE.equals(settableAttributes.canSetDisplayName())) { result.setDisplayName("TCK Document Type"); } else if (settableAttributes != null) { failure = createResult(WARNING, "Flag 'displayName' in capability NewTypeSettableAttributes is not set!"); addResult(assertNotNull(settableAttributes.canSetDisplayName(), null, failure)); if (settableAttributes == null || Boolean.TRUE.equals(settableAttributes.canSetDescription())) { result.setDescription("This is the TCK document type"); } else if (settableAttributes != null) { failure = createResult(WARNING, "Flag 'description' in capability NewTypeSettableAttributes is not set!"); addResult(assertNotNull(settableAttributes.canSetDescription(), null, failure));
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());
newTypeSettableAttributes.canSetId()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAME, newTypeSettableAttributes.canSetLocalName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAMESPACE, newTypeSettableAttributes.canSetLocalNamespace()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DISPLAYNAME, newTypeSettableAttributes.canSetDisplayName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYNAME, newTypeSettableAttributes.canSetQueryName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DESCRIPTION, newTypeSettableAttributes.canSetDescription()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CREATEABLE, newTypeSettableAttributes.canSetCreatable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FILEABLE, newTypeSettableAttributes.canSetFileable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYABLE, newTypeSettableAttributes.canSetQueryable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FULLTEXTINDEXED, newTypeSettableAttributes.canSetFulltextIndexed()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_INCLUDEDINSUPERTYTPEQUERY, newTypeSettableAttributes.canSetIncludedInSupertypeQuery()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEPOLICY, newTypeSettableAttributes.canSetControllablePolicy()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEACL,
newTypeSettableAttributes.canSetId()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAME, newTypeSettableAttributes.canSetLocalName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAMESPACE, newTypeSettableAttributes.canSetLocalNamespace()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DISPLAYNAME, newTypeSettableAttributes.canSetDisplayName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYNAME, newTypeSettableAttributes.canSetQueryName()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DESCRIPTION, newTypeSettableAttributes.canSetDescription()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CREATEABLE, newTypeSettableAttributes.canSetCreatable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FILEABLE, newTypeSettableAttributes.canSetFileable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYABLE, newTypeSettableAttributes.canSetQueryable()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FULLTEXTINDEXED, newTypeSettableAttributes.canSetFulltextIndexed()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_INCLUDEDINSUPERTYTPEQUERY, newTypeSettableAttributes.canSetIncludedInSupertypeQuery()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEPOLICY, newTypeSettableAttributes.canSetControllablePolicy()); XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEACL,
newTypeSettableAttributes.canSetId()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAME, newTypeSettableAttributes.canSetLocalName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAMESPACE, newTypeSettableAttributes.canSetLocalNamespace()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DISPLAYNAME, newTypeSettableAttributes.canSetDisplayName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYNAME, newTypeSettableAttributes.canSetQueryName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DESCRIPTION, newTypeSettableAttributes.canSetDescription()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CREATEABLE, newTypeSettableAttributes.canSetCreatable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FILEABLE, newTypeSettableAttributes.canSetFileable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYABLE, newTypeSettableAttributes.canSetQueryable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FULLTEXTINDEXED, newTypeSettableAttributes.canSetFulltextIndexed()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_INCLUDEDINSUPERTYTPEQUERY, newTypeSettableAttributes.canSetIncludedInSupertypeQuery()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEPOLICY, newTypeSettableAttributes.canSetControllablePolicy()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEACL, newTypeSettableAttributes.canSetControllableAcl());
newTypeSettableAttributes.canSetId()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAME, newTypeSettableAttributes.canSetLocalName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_LOCALNAMESPACE, newTypeSettableAttributes.canSetLocalNamespace()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DISPLAYNAME, newTypeSettableAttributes.canSetDisplayName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYNAME, newTypeSettableAttributes.canSetQueryName()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_DESCRIPTION, newTypeSettableAttributes.canSetDescription()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CREATEABLE, newTypeSettableAttributes.canSetCreatable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FILEABLE, newTypeSettableAttributes.canSetFileable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_QUERYABLE, newTypeSettableAttributes.canSetQueryable()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_FULLTEXTINDEXED, newTypeSettableAttributes.canSetFulltextIndexed()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_INCLUDEDINSUPERTYTPEQUERY, newTypeSettableAttributes.canSetIncludedInSupertypeQuery()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEPOLICY, newTypeSettableAttributes.canSetControllablePolicy()); newTypeSettableAttributesJson.put(JSON_CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_CONTROLABLEACL, newTypeSettableAttributes.canSetControllableAcl());