com.caucho.server.rewrite
Class UserInRoleCondition
java.lang.Object
com.caucho.server.rewrite.AbstractCondition
com.caucho.server.rewrite.UserInRoleCondition
- All Implemented Interfaces:
- Condition
public class UserInRoleCondition
- extends AbstractCondition
A rewrite condition that passes if the client has been authenticated
and the user is in the specified role, as determined by
HttpServletRequest.isUserInRole(String)
Method Summary |
java.lang.String |
getTagName()
Returns a descriptive name for the tag, for logging and for
error messages. |
boolean |
isMatch(HttpServletRequest request,
HttpServletResponse response)
Returns true if the condition passes. |
void |
setSendVary(boolean sendVary)
If true, send a Vary: Cookie in response, default is true. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserInRoleCondition
public UserInRoleCondition(java.lang.String role)
getTagName
public java.lang.String getTagName()
- Description copied from interface:
Condition
- Returns a descriptive name for the tag, for logging and for
error messages.
- Specified by:
getTagName
in interface Condition
- Overrides:
getTagName
in class AbstractCondition
setSendVary
public void setSendVary(boolean sendVary)
- If true, send a
Vary: Cookie
in response, default is true.
isMatch
public boolean isMatch(HttpServletRequest request,
HttpServletResponse response)
- Description copied from interface:
Condition
- Returns true if the condition passes.