org.wamblee.security.authorization
Class RegexpPathCondition

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

@Entity
public class RegexpPathCondition
extends AbstractPathCondition

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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.

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 © 2022. All Rights Reserved.