Class NodeTypeDefDiff
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefDiff
-
public class NodeTypeDefDiff extends Object
ANodeTypeDefDiffrepresents the result of the comparison of two node type definitions.The result of the comparison can be categorized as one of the following types:
NONEindicates that there is no modification at all.A
TRIVIALmodification has no impact on the consistency of existing content. The following modifications are consideredTRIVIAL:- changing node type
orderableChildNodesflag - changing node type
primaryItemNamevalue - adding non-
mandatoryproperty/child node - changing property/child node
protectedflag - changing property/child node
onParentVersionvalue - changing property/child node
mandatoryflag tofalse - changing property/child node
autoCreatedflag - changing specific property/child node
nameto* - changing child node
defaultPrimaryType - changing child node
sameNameSiblingsflag totrue - weaken child node
requiredPrimaryTypes(e.g. by removing) - weaken property
valueConstraints(e.g. by removing a constraint or by making a specific constraint less restrictive) - changing property
defaultValues - changing specific property
requiredTypetoundefined - changing property
multipleflag totrue
A
MAJORmodification potentially affects the consistency of existing content. All modifications that are notTRIVIALare consideredMAJOR.- See Also:
getType()
- changing node type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intabstractFlagDiff()static NodeTypeDefDiffcreate(QNodeTypeDefinition oldDef, QNodeTypeDefinition newDef)intgetType()Returns the type of modification as expressed by the following constants:NONE: no modification at allTRIVIAL: does not affect consistency of existing contentMAJOR: does affect consistency of existing contentbooleanisMajor()booleanisModified()booleanisTrivial()intmixinFlagDiff()intsupertypesDiff()StringtoString()
-
-
-
Field Detail
-
NONE
public static final int NONE
no modification- See Also:
- Constant Field Values
-
TRIVIAL
public static final int TRIVIAL
trivial modification: does not affect consistency of existing content- See Also:
- Constant Field Values
-
MAJOR
public static final int MAJOR
major modification: does affect consistency of existing content- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static NodeTypeDefDiff create(QNodeTypeDefinition oldDef, QNodeTypeDefinition newDef)
- Parameters:
oldDef- old definitionnewDef- new definition- Returns:
- the diff
-
isModified
public boolean isModified()
- Returns:
trueif modified
-
isTrivial
public boolean isTrivial()
- Returns:
trueif trivial
-
isMajor
public boolean isMajor()
- Returns:
trueif major
-
getType
public int getType()
Returns the type of modification as expressed by the following constants:NONE: no modification at allTRIVIAL: does not affect consistency of existing contentMAJOR: does affect consistency of existing content
- Returns:
- the type of modification
-
mixinFlagDiff
public int mixinFlagDiff()
- Returns:
trueif mixin flag diff
-
abstractFlagDiff
public int abstractFlagDiff()
- Returns:
trueif abstract flag diff
-
supertypesDiff
public int supertypesDiff()
- Returns:
trueif supertypes diff
-
-