info.magnolia.voting.voters
Class BasePatternVoter

java.lang.Object
  extended by info.magnolia.voting.voters.BaseVoterImpl
      extended by info.magnolia.voting.voters.AbstractBoolVoter
          extended by info.magnolia.voting.voters.BasePatternVoter
All Implemented Interfaces:
Voter
Direct Known Subclasses:
URIPatternVoter, URIRegexVoter, URIStartsWithVoter

public abstract class BasePatternVoter
extends AbstractBoolVoter

Voters which uses the urls to match against the pattern. The returned vote is the length of the pattern. This allows overstearing less precise votes (like allow /something/* but deny /somthing/otherthing/*). You can use the inverse property which will then return the negative value on a match. This is not the same thing as using the not property which will then vote if the pattern does not match at all.

Version:
$Id$
Author:
philipp

Constructor Summary
BasePatternVoter()
           
 
Method Summary
 String getPattern()
           
 void init()
           
 boolean isInverse()
           
protected  String resolveURIFromValue(Object value)
           
 void setInverse(boolean inverse)
           
 void setPattern(String pattern)
           
 void setTrueValue(int positiveVoteValue)
           
 String toString()
           
 
Methods inherited from class info.magnolia.voting.voters.AbstractBoolVoter
boolVote, getFalseValue, getLevel, getTrueValue, isNot, setFalseValue, setLevel, setNot, vote
 
Methods inherited from class info.magnolia.voting.voters.BaseVoterImpl
getName, isEnabled, setEnabled, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasePatternVoter

public BasePatternVoter()
Method Detail

init

public void init()

setTrueValue

public void setTrueValue(int positiveVoteValue)
Overrides:
setTrueValue in class AbstractBoolVoter

getPattern

public String getPattern()

setPattern

public void setPattern(String pattern)

isInverse

public boolean isInverse()

setInverse

public void setInverse(boolean inverse)

resolveURIFromValue

protected String resolveURIFromValue(Object value)

toString

public String toString()
Overrides:
toString in class AbstractBoolVoter


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.