if (typeDefC == null) {
throw new CmisInvalidArgumentException("Cannot create object, a type with id " + typeId + " is unknown");
}
// check if the given type is a document type
BaseTypeId typeBaseId = typeDefC.getTypeDefinition().getBaseTypeId();
StoredObject so = null;
if (typeBaseId.equals(InMemoryDocumentTypeDefinition.getRootDocumentType().getBaseTypeId())) {
so = createDocumentIntern(context, repositoryId, properties, folderId, contentStream, versioningState, null, null,
null, null);
} else if (typeBaseId.equals(InMemoryFolderTypeDefinition.getRootFolderType().getBaseTypeId())) {
so = createFolderIntern(context, repositoryId, properties, folderId, null, null, null, null);
} else if (typeBaseId.equals(InMemoryPolicyTypeDefinition.getRootPolicyType().getBaseTypeId())) {
so = createPolicyIntern(context, repositoryId, properties, folderId, null, null, null, null);
} else if (typeBaseId.equals(InMemoryRelationshipTypeDefinition.getRootRelationshipType().getBaseTypeId())) {
so = createRelationshipIntern(context, repositoryId, properties, null, null, null, null);
} else {
LOG.error("The type contains an unknown base object id, object can't be created");
}