Class OnParentVersionAction

java.lang.Object
javax.jcr.version.OnParentVersionAction

public final class OnParentVersionAction extends Object
The possible actions specified by the onParentVersion attribute in a property definition within a node type definition.

This interface defines the following actions:

  • COPY
  • VERSION
  • INITIALIZE
  • COMPUTE
  • IGNORE
  • ABORT

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 Details

  • Method Details

    • nameFromValue

      public static String nameFromValue(int action)
      Returns the name of the specified action, as used in serialization.
      Parameters:
      action - the on-version action
      Returns:
      the name of the specified action
      Throws:
      IllegalArgumentException - if action is not a valid on-version action.
    • valueFromName

      public static int valueFromName(String name)
      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 - if name is not a valid on-version action name.