org.eclipse.jetty.util.security
类 Constraint

java.lang.Object
  继承者 org.eclipse.jetty.util.security.Constraint
所有已实现的接口:
Serializable, Cloneable

public class Constraint
extends Object
implements Cloneable, Serializable

Describe an auth and/or data constraint.

另请参见:
序列化表格

字段摘要
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_ROLE
           
static int DC_CONFIDENTIAL
           
static int DC_FORBIDDEN
           
static int DC_INTEGRAL
           
static int DC_NONE
           
static int DC_UNSET
           
static String NONE
           
 
构造方法摘要
Constraint()
          Constructor.
Constraint(String name, String role)
          Conveniance Constructor.
 
方法摘要
 Object clone()
           
 boolean getAuthenticate()
           
 int getDataConstraint()
           
 String[] getRoles()
           
 boolean hasDataConstraint()
           
 boolean hasRole(String role)
           
 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)
           
 
从类 java.lang.Object 继承的方法
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

__BASIC_AUTH

public static final String __BASIC_AUTH
另请参见:
常量字段值

__FORM_AUTH

public static final String __FORM_AUTH
另请参见:
常量字段值

__DIGEST_AUTH

public static final String __DIGEST_AUTH
另请参见:
常量字段值

__CERT_AUTH

public static final String __CERT_AUTH
另请参见:
常量字段值

__CERT_AUTH2

public static final String __CERT_AUTH2
另请参见:
常量字段值

__SPNEGO_AUTH

public static final String __SPNEGO_AUTH
另请参见:
常量字段值

__NEGOTIATE_AUTH

public static final String __NEGOTIATE_AUTH
另请参见:
常量字段值

DC_UNSET

public static final int DC_UNSET
另请参见:
常量字段值

DC_NONE

public static final int DC_NONE
另请参见:
常量字段值

DC_INTEGRAL

public static final int DC_INTEGRAL
另请参见:
常量字段值

DC_CONFIDENTIAL

public static final int DC_CONFIDENTIAL
另请参见:
常量字段值

DC_FORBIDDEN

public static final int DC_FORBIDDEN
另请参见:
常量字段值

NONE

public static final String NONE
另请参见:
常量字段值

ANY_ROLE

public static final String ANY_ROLE
另请参见:
常量字段值
构造方法详细信息

Constraint

public Constraint()
Constructor.


Constraint

public Constraint(String name,
                  String role)
Conveniance Constructor.

参数:
name -
role -
方法详细信息

validateMethod

public static boolean validateMethod(String method)

clone

public Object clone()
             throws CloneNotSupportedException
覆盖:
Object 中的 clone
抛出:
CloneNotSupportedException

setName

public void setName(String name)
参数:
name -

setRoles

public void setRoles(String[] roles)

isAnyRole

public boolean isAnyRole()
返回:
True if any user role is permitted.

getRoles

public String[] getRoles()
返回:
List of roles for this constraint.

hasRole

public boolean hasRole(String role)
参数:
role -
返回:
True if the constraint contains the role.

setAuthenticate

public void setAuthenticate(boolean authenticate)
参数:
authenticate - True if users must be authenticated

getAuthenticate

public boolean getAuthenticate()
返回:
True if the constraint requires request authentication

isForbidden

public boolean isForbidden()
返回:
True if authentication required but no roles set

setDataConstraint

public void setDataConstraint(int c)
参数:
c - Data constrain indicator: 0=DC+NONE, 1=DC_INTEGRAL & 2=DC_CONFIDENTIAL

getDataConstraint

public int getDataConstraint()
返回:
Data constrain indicator: 0=DC+NONE, 1=DC_INTEGRAL & 2=DC_CONFIDENTIAL

hasDataConstraint

public boolean hasDataConstraint()
返回:
True if a data constraint has been set.

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2013. All Rights Reserved.