public static interface NodeTypes.NodeDefinitionSet
Modifier and Type | Method and Description |
---|---|
void |
determineReasonForMismatch(Name childName,
Name childPrimaryType,
boolean skipProtected,
SiblingCounter siblingCounter,
Name parentPrimaryType,
Set<Name> parentMixinTypes,
Path parentPath,
String workspaceName,
String repositoryName,
ExecutionContext context)
Method that can be called after
findBestDefinitionForChild(Name, Name, boolean, SiblingCounter) returns null
to throw an appropriate exception for why each of the parent's child node definition are not applicable for the
proposed child. |
org.modeshape.jcr.JcrNodeDefinition |
findBestDefinitionForChild(Name childName,
Name childPrimaryType,
boolean skipProtected,
SiblingCounter siblingCounter)
Find the best child node definition for creating a new child with the given name and primary type.
|
org.modeshape.jcr.JcrNodeDefinition findBestDefinitionForChild(Name childName, Name childPrimaryType, boolean skipProtected, SiblingCounter siblingCounter)
determineReasonForMismatch(org.modeshape.jcr.value.Name, org.modeshape.jcr.value.Name, boolean, org.modeshape.jcr.cache.SiblingCounter, org.modeshape.jcr.value.Name, java.util.Set<org.modeshape.jcr.value.Name>, org.modeshape.jcr.value.Path, java.lang.String, java.lang.String, org.modeshape.jcr.ExecutionContext)
for an appropriate exception.childName
- the name of the proposed child; may be null if the child name is to be determined by the definitionchildPrimaryType
- the primary type of the proposed child; may be null if the default type is to be usedskipProtected
- true if this method should not consider any of the parent's child node definitions that are
protected, or false if it should consider all child node definitionssiblingCounter
- a function that this method can call to determine how many siblings with the child's name already
exist under the parentvoid determineReasonForMismatch(Name childName, Name childPrimaryType, boolean skipProtected, SiblingCounter siblingCounter, Name parentPrimaryType, Set<Name> parentMixinTypes, Path parentPath, String workspaceName, String repositoryName, ExecutionContext context) throws ConstraintViolationException, ItemExistsException
findBestDefinitionForChild(Name, Name, boolean, SiblingCounter)
returns null
to throw an appropriate exception for why each of the parent's child node definition are not applicable for the
proposed child.childName
- the name of the proposed child; may be null if the child name is to be determined by the definitionchildPrimaryType
- the primary type of the proposed child; may be null if the default type is to be usedskipProtected
- true if this method should not consider any of the parent's child node definitions that are
protected, or false if it should consider all child node definitionssiblingCounter
- a function that this method can call to determine how many siblings with the child's name already
exist under the parentparentPrimaryType
- the primary type of the parent node; may not be nullparentMixinTypes
- the mixin types of the parent nodeparentPath
- workspaceName
- repositoryName
- context
- ConstraintViolationException
ItemExistsException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.