mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-09 17:45:10 +00:00
Fix AR-540.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3075 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
c01c49fbe3
commit
acab729d1a
@ -181,6 +181,13 @@ public class NodeImpl extends ItemImpl implements Node
|
|||||||
childAssocDef = getNodeTypeChildAssocDefForParent(nodeService, dictionaryService, parentRef, nodeType);
|
childAssocDef = getNodeTypeChildAssocDefForParent(nodeService, dictionaryService, parentRef, nodeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not allow creation of sys:base (it's really an abstract type)
|
||||||
|
// TODO: Consider adding abstract to the content model
|
||||||
|
if (nodeType.equals(ContentModel.TYPE_BASE))
|
||||||
|
{
|
||||||
|
throw new RepositoryException("Node type of node to add is " + nodeType.toPrefixString(session.getNamespaceResolver()) + " which is an abstract type");
|
||||||
|
}
|
||||||
|
|
||||||
// Create node
|
// Create node
|
||||||
// Note: Integrity exception will be thrown when the node is saved
|
// Note: Integrity exception will be thrown when the node is saved
|
||||||
ChildAssociationRef childRef = nodeService.createNode(parentRef, childAssocDef.getName(), nodeName, nodeType);
|
ChildAssociationRef childRef = nodeService.createNode(parentRef, childAssocDef.getName(), nodeName, nodeType);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user