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

SeamSecurityManager (JBoss Seam API Documentation) - JBoss Seam 1.1.0 API 英文版文档


org.jboss.seam.security
Class SeamSecurityManager

java.lang.Object
  extended by org.jboss.seam.security.SeamSecurityManager

@Scope(value=APPLICATION)
@Name(value="org.jboss.seam.securityManager")
@Install(value=false,
         precedence=0)
@Intercept(value=NEVER)
public class SeamSecurityManager
extends Object

Holds configuration settings and provides functionality for the security API

Author:
Shane Bryzak

Constructor Summary
SeamSecurityManager()
           
 
Method Summary
 boolean evaluateExpression(String expr)
          Evaluates the specified security expression, which must return a boolean value.
static boolean hasPermission(String name, String action, Object... args)
          Performs a permission check for the specified name and action
static boolean hasRole(String name)
          Checks if the authenticated Identity is a member of the specified role.
 void initSecurityManager()
          Initialise the security manager
static SeamSecurityManager instance()
          Returns the application-scoped instance of the security manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeamSecurityManager

public SeamSecurityManager()
Method Detail

initSecurityManager

@Create
public void initSecurityManager()
                         throws Exception
Initialise the security manager

Throws:
Exception

instance

public static SeamSecurityManager instance()
Returns the application-scoped instance of the security manager

Returns:
SeamSecurityManager

evaluateExpression

public boolean evaluateExpression(String expr)
Evaluates the specified security expression, which must return a boolean value.

Parameters:
expr - String
Returns:
boolean

hasRole

public static boolean hasRole(String name)
Checks if the authenticated Identity is a member of the specified role.

Parameters:
name - String
Returns:
boolean

hasPermission

public static boolean hasPermission(String name,
                                    String action,
                                    Object... args)
Performs a permission check for the specified name and action

Parameters:
name - String
action - String
args - Object[]
Returns:
boolean