info.magnolia.voting.voters
Class AbstractBoolVoter

java.lang.Object
  extended by info.magnolia.voting.voters.BaseVoterImpl
      extended by info.magnolia.voting.voters.AbstractBoolVoter
All Implemented Interfaces:
Voter
Direct Known Subclasses:
AuthenticatedVoter, BasePatternVoter, DelegateVoter, DomainNameRegexVoter, DontDispatchOnForwardAttributeVoter, ExtensionVoter, FalseVoter, ForwardVoter, NotVoter, OnAdminVoter, PropertyVoter, RequestHasParametersVoter, ResponseContentTypeVoter, TrueVoter, UserAgentVoter

public abstract class AbstractBoolVoter
extends BaseVoterImpl

Used to create boolean voters which can't return integer values. You can stear the returned values by setting the trueValue and falseValue. To inverse the result of the boolVote method use the not property.

Version:
$Id$
Author:
philipp

Constructor Summary
AbstractBoolVoter()
           
 
Method Summary
protected abstract  boolean boolVote(Object value)
           
 int getFalseValue()
           
 int getLevel()
           
 int getTrueValue()
           
 boolean isNot()
           
 void setFalseValue(int negativeVoteValue)
           
 void setLevel(int level)
           
 void setNot(boolean not)
           
 void setTrueValue(int positiveVoteValue)
           
 String toString()
           
 int vote(Object value)
           
 
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

AbstractBoolVoter

public AbstractBoolVoter()
Method Detail

vote

public int vote(Object value)

getFalseValue

public int getFalseValue()

setFalseValue

public void setFalseValue(int negativeVoteValue)

getTrueValue

public int getTrueValue()

setTrueValue

public void setTrueValue(int positiveVoteValue)

boolVote

protected abstract boolean boolVote(Object value)

isNot

public boolean isNot()

setNot

public void setNot(boolean not)

toString

public String toString()
Overrides:
toString in class BaseVoterImpl

getLevel

public int getLevel()

setLevel

public void setLevel(int level)


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