public class TypeEditor extends DefaultEditor
| Modifier and Type | Class and Description |
|---|---|
static interface |
TypeEditor.ConstraintViolationCallback
Extension point that allows pluggable handling of constraint violations
|
| Modifier and Type | Field and Description |
|---|---|
static TypeEditor.ConstraintViolationCallback |
THROW_ON_CONSTRAINT_VIOLATION |
static TypeEditor.ConstraintViolationCallback |
WARN_ON_CONSTRAINT_VIOLATION |
INSTANCE| Modifier and Type | Method and Description |
|---|---|
Editor |
childNodeAdded(String name,
NodeState after)
Processes an added child node.
|
TypeEditor |
childNodeChanged(String name,
NodeState before,
NodeState after)
Processes a changed child node.
|
Editor |
childNodeDeleted(String name,
NodeState before)
Processes a deleted child node.
|
static TypeEditor |
create(@NotNull TypeEditor.ConstraintViolationCallback callback,
Set<String> typesToCheck,
@NotNull NodeState types,
String primary,
Iterable<String> mixins,
@NotNull NodeBuilder builder)
Creates a new TypeEditor instance
|
void |
enter(NodeState before,
NodeState after)
Called before the given before and after states are compared.
|
void |
propertyAdded(PropertyState after)
Processes an added property.
|
void |
propertyChanged(PropertyState before,
PropertyState after)
Processes a changed property.
|
void |
propertyDeleted(PropertyState before)
Processes a removed property.
|
leavepublic static final TypeEditor.ConstraintViolationCallback THROW_ON_CONSTRAINT_VIOLATION
public static final TypeEditor.ConstraintViolationCallback WARN_ON_CONSTRAINT_VIOLATION
public static TypeEditor create(@NotNull @NotNull TypeEditor.ConstraintViolationCallback callback, Set<String> typesToCheck, @NotNull @NotNull NodeState types, String primary, Iterable<String> mixins, @NotNull @NotNull NodeBuilder builder) throws CommitFailedException
callback - the callback to use when a constraint violation is found. The client must
check the results of the callback invocations if the specified callback does not
immediately propagate constraint violations as checked exceptions.typesToCheck - the types to check for. If null, this node is checked. Otherwise
it is checked if its primary type or one of it's mixin types is contained in this parameterstypes - the /jcr:system/jcr:nodeTypes nodeprimary - the node's primary typemixins - the node's mixinsbuilder - a builder containing the current state of the node to check. May be used to set
a default primary type if none is setCommitFailedException - when the primary type of mixin definition is incorrectpublic void propertyAdded(PropertyState after) throws CommitFailedException
EditorpropertyAdded in interface EditorpropertyAdded in class DefaultEditorafter - the added propertyCommitFailedException - if processing failedpublic void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException
EditorpropertyChanged in interface EditorpropertyChanged in class DefaultEditorbefore - the original propertyafter - the changed propertyCommitFailedException - if processing failedpublic void propertyDeleted(PropertyState before) throws CommitFailedException
EditorpropertyDeleted in interface EditorpropertyDeleted in class DefaultEditorbefore - the removed propertyCommitFailedException - if processing failedpublic void enter(NodeState before, NodeState after) throws CommitFailedException
Editorenter in interface Editorenter in class DefaultEditorbefore - before state, non-existent if this node was addedafter - after state, non-existent if this node was removedCommitFailedException - if this commit should be rejectedpublic Editor childNodeAdded(String name, NodeState after) throws CommitFailedException
EditorchildNodeAdded in interface EditorchildNodeAdded in class DefaultEditorname - name of the added nodeafter - the added child nodenull if the subtree does not need processingCommitFailedException - if processing failedpublic TypeEditor childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException
EditorchildNodeChanged in interface EditorchildNodeChanged in class DefaultEditorname - name of the changed nodebefore - child node before the changeafter - child node after the changenull if the subtree does not need processingCommitFailedException - if processing failedpublic Editor childNodeDeleted(String name, NodeState before) throws CommitFailedException
EditorchildNodeDeleted in interface EditorchildNodeDeleted in class DefaultEditorname - name of the deleted nodebefore - the deleted child nodenull if the subtree does not need processingCommitFailedException - if processing failedCopyright © 2010 - 2020 Adobe. All Rights Reserved