站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

SecurityConstraint - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.migration.model22.impl.security
Class SecurityConstraint

java.lang.Object
  extended byorg.jboss.portal.migration.model22.impl.security.SecurityConstraint
All Implemented Interfaces:
java.io.Serializable

public final class SecurityConstraint
extends java.lang.Object
implements java.io.Serializable

Binds a set of roles and a set of actions together. This object is immutable.

A portal resource (portal, page, window, instance, portlet...) is secured via a set of security constraints. each security constraint holds the information about what roles are allowed what actions.

Version:
$Revision: 5449 $
Author:
Martin Holzner, Julien Viet
See Also:
Serialized Form

Field Summary
private  java.util.Set actions
          The set of actions of this constraint.
private  java.lang.String role
          The role of this contraint.
 
Constructor Summary
SecurityConstraint(SecurityConstraint other)
          Copy constructor.
SecurityConstraint(java.util.Set actions, java.lang.String role)
           
SecurityConstraint(java.lang.String actions, java.lang.String role)
          create a new constraint with the provided actions for the provided roles
 
Method Summary
static java.util.Set buildSetFromString(java.lang.String src)
          convert the provided string of comma separated tokens to a set of strings
static java.lang.String buildStringFromSet(java.util.Set set)
          convert the provided set of strings into one string containing a comma separated list of all tokens of the set
 boolean equals(java.lang.Object o)
           
 java.util.Set getActions()
           
 java.lang.String getRole()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

role

private final java.lang.String role
The role of this contraint.


actions

private final java.util.Set actions
The set of actions of this constraint.

Constructor Detail

SecurityConstraint

public SecurityConstraint(java.lang.String actions,
                          java.lang.String role)
create a new constraint with the provided actions for the provided roles

Parameters:
actions - a comma separated list of allowed actions
role - a comma separated list of roles that are allowed the provided actions

SecurityConstraint

public SecurityConstraint(java.util.Set actions,
                          java.lang.String role)

SecurityConstraint

public SecurityConstraint(SecurityConstraint other)
Copy constructor.

Method Detail

getActions

public java.util.Set getActions()
Returns:
a java.util.Set of allowed actions

getRole

public java.lang.String getRole()
Returns:
a java.util.Set of roles of this constraint

toString

public java.lang.String toString()
See Also:
Object.toString()

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

buildSetFromString

public static java.util.Set buildSetFromString(java.lang.String src)
convert the provided string of comma separated tokens to a set of strings

Parameters:
src - the comma separated string
Returns:
the converted set of string tokens

buildStringFromSet

public static java.lang.String buildStringFromSet(java.util.Set set)
convert the provided set of strings into one string containing a comma separated list of all tokens of the set

Parameters:
set - the set to be converted into a comma separated string
Returns:
a comma separated string containing all the string tokes from the provided set