org.wamblee.security.authorization
Class RegexpPathCondition

java.lang.Object
  extended by org.wamblee.persistence.AbstractPersistent
      extended by org.wamblee.security.authorization.RegexpPathCondition
All Implemented Interfaces:
Persistent, PathCondition
Direct Known Subclasses:
StartsWithPathCondition

public class RegexpPathCondition
extends AbstractPersistent
implements PathCondition

Condition to check whether a path matches a given regula expression.

Author:
Erik Brakkee

Constructor Summary
protected RegexpPathCondition()
          For OR mapping.
  RegexpPathCondition(java.lang.String aPattern)
          Constructs the condition.
 
Method Summary
protected  java.lang.String getPattern()
           
 boolean matches(java.lang.String aPath)
          Checks if the path matches the condition.
protected  void setPattern(java.lang.String aPattern)
           
 java.lang.String toString()
           
 
Methods inherited from class org.wamblee.persistence.AbstractPersistent
getPersistedVersion, getPrimaryKey, setPersistedVersion, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wamblee.persistence.Persistent
getPersistedVersion, getPrimaryKey, setPersistedVersion, setPrimaryKey
 

Constructor Detail

RegexpPathCondition

public RegexpPathCondition(java.lang.String aPattern)
Constructs the condition.

Parameters:
aPattern - String the path must start with.

RegexpPathCondition

protected RegexpPathCondition()
For OR mapping.

Method Detail

matches

public boolean matches(java.lang.String aPath)
Description copied from interface: PathCondition
Checks if the path matches the condition.

Specified by:
matches in interface PathCondition
Parameters:
aPath - Path to match.
Returns:
True iff the path matches.

getPattern

protected java.lang.String getPattern()
Returns:
Returns the _path.

setPattern

protected void setPattern(java.lang.String aPattern)
Parameters:
aPattern - The _path to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.