info.magnolia.voting.voters
Class ResponseContentTypeVoter

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

public class ResponseContentTypeVoter
extends AbstractBoolVoter

A voter which checks the content type set on the response object against a list of allowed and/or rejected content types.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
ResponseContentTypeVoter()
           
 
Method Summary
 void addAllowed(String contentType)
           
 void addRejected(String contentType)
           
protected  boolean boolVote(Object value)
           
 List<String> getAllowed()
           
 List<String> 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

ResponseContentTypeVoter

public ResponseContentTypeVoter()
Method Detail

getAllowed

public List<String> getAllowed()

addAllowed

public void addAllowed(String contentType)

getRejected

public List<String> getRejected()

addRejected

public void addRejected(String contentType)

boolVote

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


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