Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.sequencer
Class SequencerPathExpression

    java.lang.Object
      org.modeshape.jcr.sequencer.SequencerPathExpression

All Implemented Interfaces:
  Serializable

    @Immutable
    public class SequencerPathExpression

extends Object
implements Serializable

An expression that defines a selection of some change in the repository that signals a sequencing operation should be run, and the location where the sequencing output should be placed. Sequencer path expressions are used to determine whether information in the repository needs to be sequenced.

A simple example is the following:

         /a/b/c@title => /d/e/f

which means that a sequencer (that uses this expression in its configuration) should be run any time there is a new or modified `title` property on the `/a/b/c` node, and that the output of the sequencing should be placed at `/d/e/f`.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `SequencerPathExpression.Matcher`

Field Summary
`protected static String` | `DEFAULT_OUTPUT_EXPRESSION`

Constructor Summary
`protected` | `SequencerPathExpression(PathExpression selectExpression, String outputExpression)`

Method Summary
`boolean` | `appliesToWorkspace(String workspaceName)` Determine if this path expression applies to content within the supplied workspace name.
`static SequencerPathExpression` | `compile(String expression)` Compile the supplied expression and return the resulting SequencerPathExpression instance.
`boolean` | `equals(Object obj)`
`String` | `getOutputExpression()`
`String` | `getSelectExpression()`
`int` | `hashCode()`
`SequencerPathExpression.Matcher` | `matcher(String absolutePath)` Obtain a Matcher that can be used to convert the supplied workspace key and absolute path into an output workspace name and and output path.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_OUTPUT_EXPRESSION

    protected static final String DEFAULT_OUTPUT_EXPRESSION

See Also:
  Constant Field Values

Constructor Detail

### SequencerPathExpression

    protected SequencerPathExpression(PathExpression selectExpression,
                                      String outputExpression)

Method Detail

### compile

    public static final SequencerPathExpression compile(String expression)
                                                 throws InvalidSequencerPathExpression

  Compile the supplied expression and return the resulting SequencerPathExpression instance.

  Parameters:
    `expression` - the expression
  Returns:
    the path expression; never null
  Throws:
    `IllegalArgumentException` - if the expression is null
    `InvalidSequencerPathExpression` - if the expression is blank or is not a valid expression

### getSelectExpression

    public String getSelectExpression()

  Returns:
    selectExpression

### getOutputExpression

    public String getOutputExpression()

  Returns:
    outputExpression

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### appliesToWorkspace

    public final boolean appliesToWorkspace(String workspaceName)

  Determine if this path expression applies to content within the supplied workspace name.

  Parameters:
    `workspaceName` - the name of the workspace; may not be null
  Returns:
    true if this path expression matches the workspace name, or false otherwise

### matcher

    public SequencerPathExpression.Matcher matcher(String absolutePath)

  Obtain a Matcher that can be used to convert the supplied workspace key and absolute path into an output workspace name and and output path.

  Parameters:
    `absolutePath` - the path in the workspace; may not be null
  Returns:
    the matcher; never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.