if (type.isFileable() != null) {
f = createResult(FAILURE, "Folder types must be fileable!");
addResult(results, assertIsTrue(type.isFileable(), null, f));
}
} else if (BaseTypeId.CMIS_RELATIONSHIP.equals(type.getBaseTypeId())) {
RelationshipTypeDefinition relType = (RelationshipTypeDefinition) type;
f = createResult(FAILURE, "Allowed Source Type Ids are not set!");
addResult(results, assertNotNull(relType.getAllowedSourceTypeIds(), null, f));
if (relType.getAllowedSourceTypeIds() != null) {
for (String typeId : relType.getAllowedSourceTypeIds()) {
try {
session.getTypeDefinition(typeId);
} catch (CmisInvalidArgumentException e) {
addResult(
results,
createResult(WARNING,
"Allowed Source Type Ids contain a type id that doesn't exist: " + typeId));
} catch (CmisObjectNotFoundException e) {
addResult(
results,
createResult(WARNING,
"Allowed Source Type Ids contain a type id that doesn't exist: " + typeId));
}
}
}
f = createResult(FAILURE, "Allowed Target Type Ids are not set!");
addResult(results, assertNotNull(relType.getAllowedTargetTypeIds(), null, f));
if (relType.getAllowedTargetTypeIds() != null) {
for (String typeId : relType.getAllowedTargetTypeIds()) {
try {
session.getTypeDefinition(typeId);
} catch (CmisInvalidArgumentException e) {
addResult(
results,