info.magnolia.voting.voters
Class UserAgentVoter

java.lang.Object
  extended by info.magnolia.voting.voters.BaseVoterImpl
      extended by info.magnolia.voting.voters.AbstractBoolVoter
          extended by info.magnolia.voting.voters.UserAgentVoter
All Implemented Interfaces:
Voter

public class UserAgentVoter
extends AbstractBoolVoter

A voter which checks the user agent header in request object against a list of allowed and/or rejected user agents.

Version:
$Revision: $ ($Author: $)
Author:
had

Constructor Summary
UserAgentVoter()
           
 
Method Summary
 void addAllowed(java.lang.String contentType)
           
 void addRejected(java.lang.String contentType)
           
protected  boolean boolVote(java.lang.Object value)
           
 java.util.List getAllowed()
           
 java.util.List getRejected()
           
 
Methods inherited from class info.magnolia.voting.voters.AbstractBoolVoter
getFalseValue, getLevel, getTrueValue, isNot, setFalseValue, setLevel, setNot, setTrueValue, toString, 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

UserAgentVoter

public UserAgentVoter()
Method Detail

getAllowed

public java.util.List getAllowed()

addAllowed

public void addAllowed(java.lang.String contentType)

getRejected

public java.util.List getRejected()

addRejected

public void addRejected(java.lang.String contentType)

boolVote

protected boolean boolVote(java.lang.Object value)
Specified by:
boolVote in class AbstractBoolVoter


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