public class Constraint extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
__BASIC_AUTH |
static String |
__CERT_AUTH |
static String |
__CERT_AUTH2 |
static String |
__DIGEST_AUTH |
static String |
__FORM_AUTH |
static String |
__NEGOTIATE_AUTH |
static String |
__SPNEGO_AUTH |
static String |
ANY_AUTH |
static String |
ANY_ROLE |
static int |
DC_CONFIDENTIAL |
static int |
DC_FORBIDDEN |
static int |
DC_INTEGRAL |
static int |
DC_NONE |
static int |
DC_UNSET |
static String |
NONE |
Constructor and Description |
---|
Constraint()
Constructor.
|
Constraint(String name,
String role)
Conveniance Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
getAuthenticate() |
int |
getDataConstraint() |
String |
getName() |
String[] |
getRoles() |
boolean |
hasDataConstraint() |
boolean |
hasRole(String role) |
boolean |
isAnyAuth()
Servlet Spec 3.1, pg 140
|
boolean |
isAnyRole() |
boolean |
isForbidden() |
void |
setAuthenticate(boolean authenticate) |
void |
setDataConstraint(int c) |
void |
setName(String name) |
void |
setRoles(String[] roles) |
String |
toString() |
static boolean |
validateMethod(String method) |
public static final String __BASIC_AUTH
public static final String __FORM_AUTH
public static final String __DIGEST_AUTH
public static final String __CERT_AUTH
public static final String __CERT_AUTH2
public static final String __SPNEGO_AUTH
public static final String __NEGOTIATE_AUTH
public static final int DC_UNSET
public static final int DC_NONE
public static final int DC_INTEGRAL
public static final int DC_CONFIDENTIAL
public static final int DC_FORBIDDEN
public static final String NONE
public static final String ANY_ROLE
public static final String ANY_AUTH
public static boolean validateMethod(String method)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void setName(String name)
name
- public String getName()
public void setRoles(String[] roles)
public boolean isAnyRole()
public boolean isAnyAuth()
public String[] getRoles()
public boolean hasRole(String role)
role
- public void setAuthenticate(boolean authenticate)
authenticate
- True if users must be authenticatedpublic boolean getAuthenticate()
public boolean isForbidden()
public void setDataConstraint(int c)
c
- Data constrain indicator: 0=DC+NONE, 1=DC_INTEGRAL &
2=DC_CONFIDENTIALpublic int getDataConstraint()
public boolean hasDataConstraint()
Copyright © 1995-2015 Webtide. All Rights Reserved.