org.modeshape.repository.sequencer
Class SequencerPathExpression
java.lang.Object
org.modeshape.repository.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 within the
sequencer configurations
and 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
DEFAULT_OUTPUT_EXPRESSION
protected static final String DEFAULT_OUTPUT_EXPRESSION
- See Also:
- Constant Field Values
SequencerPathExpression
protected SequencerPathExpression(PathExpression selectExpression,
String outputExpression)
throws InvalidSequencerPathExpression
- Throws:
InvalidSequencerPathExpression
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
matcher
public SequencerPathExpression.Matcher matcher(String absolutePath)
- Obtain a Matcher that can be used to convert the supplied absolute path (with repository name and workspace name) into an
output repository, and output workspace name, and output path.
- Parameters:
absolutePath
- the path, of the form {repoName}:{workspaceName}:{absPath}
- Returns:
- the matcher; never null
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.