Package javax.jcr.version
Class OnParentVersionAction
java.lang.Object
javax.jcr.version.OnParentVersionAction
The possible actions specified by the
onParentVersion attribute
in a property definition within a node type definition.
This interface defines the following actions:
COPYVERSIONINITIALIZECOMPUTEIGNOREABORT
Every item (node or property) in the repository has a status indicator that
governs what happens to that item when its parent node is versioned. This
status is defined by the onParentVersion attribute in the
PropertyDefinition or NodeDefinition that applies
to the item in question.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringstatic final StringThe names of the defined on-version actions, as used in serialization.static final Stringstatic final Stringstatic final Stringstatic final intstatic final intThe action constants.static final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic StringnameFromValue(int action) Returns the name of the specifiedaction, as used in serialization.static intvalueFromName(String name) Returns the numeric constant value of the on-version action with the specified name.
-
Field Details
-
COPY
public static final int COPYThe action constants.- See Also:
-
VERSION
public static final int VERSION- See Also:
-
INITIALIZE
public static final int INITIALIZE- See Also:
-
COMPUTE
public static final int COMPUTE- See Also:
-
IGNORE
public static final int IGNORE- See Also:
-
ABORT
public static final int ABORT- See Also:
-
ACTIONNAME_COPY
The names of the defined on-version actions, as used in serialization.- See Also:
-
ACTIONNAME_VERSION
- See Also:
-
ACTIONNAME_INITIALIZE
- See Also:
-
ACTIONNAME_COMPUTE
- See Also:
-
ACTIONNAME_IGNORE
- See Also:
-
ACTIONNAME_ABORT
- See Also:
-
-
Method Details
-
nameFromValue
Returns the name of the specifiedaction, as used in serialization.- Parameters:
action- the on-version action- Returns:
- the name of the specified
action - Throws:
IllegalArgumentException- ifactionis not a valid on-version action.
-
valueFromName
Returns the numeric constant value of the on-version action with the specified name.- Parameters:
name- the name of the on-version action- Returns:
- the numeric constant value
- Throws:
IllegalArgumentException- ifnameis not a valid on-version action name.
-