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

JBossSecurityProviderImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.security.impl.jacc
Class JBossSecurityProviderImpl

java.lang.Object
  extended byorg.jboss.portal.security.impl.jacc.JBossSecurityProviderImpl
All Implemented Interfaces:
JBossSecurityProvider, SecurityProvider

public final class JBossSecurityProviderImpl
extends java.lang.Object
implements JBossSecurityProvider

Security provider service.

This service reads the configured Policy Service and portal server config at start time, and uses those to provide a single access point for all security policy operations (configuration and access check). This implementation of the JBossSecurityProvider uses a jacc based security provider (based on the default jacc implementations of the appserver) to provide the required functionality.

See Also:
JBossSecurityProvider, PolicyConfigurationFactory, Policy, PortalPolicyConfigurationFactory, PortalJaccPolicy

Constructor Summary
JBossSecurityProviderImpl()
           
 
Method Summary
 javax.management.ObjectName getConfig()
           
 javax.management.MBeanServer getMBeanServer()
           
 java.security.Policy getPolicy()
          Get the active security policy that allows security checks
 java.lang.String getPolicyAttributeName()
           
 javax.security.jacc.PolicyConfiguration getPolicyConfiguration(java.lang.String policyContextID, boolean remove)
          Get the policy configuration interface that allows to configure the policy
 javax.management.ObjectName getPolicyName()
           
 ServerConfig getServerConfig()
          Get the server configuration
 boolean inService(java.lang.String policyContextID)
          Test if the provided context id has an active policy configuration.
 void setConfig(javax.management.ObjectName policyName)
           
 void setMBeanServer(javax.management.MBeanServer server)
           
 void setPolicyAttributeName(java.lang.String policyAttributeName)
           
 void setPolicyName(javax.management.ObjectName policyName)
           
 void start()
          read the mbean descriptor and get the policy via the defined attribute, the server config via the defined attribute name, and the policy configuration factory via the type (class) of the configured policy.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossSecurityProviderImpl

public JBossSecurityProviderImpl()
Method Detail

start

public void start()
           throws java.lang.Exception
read the mbean descriptor and get the policy via the defined attribute, the server config via the defined attribute name, and the policy configuration factory via the type (class) of the configured policy.

Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

getConfig

public javax.management.ObjectName getConfig()

setConfig

public void setConfig(javax.management.ObjectName policyName)

getServerConfig

public ServerConfig getServerConfig()
Description copied from interface: JBossSecurityProvider
Get the server configuration

Specified by:
getServerConfig in interface JBossSecurityProvider
Returns:
the portal server config

getPolicyName

public javax.management.ObjectName getPolicyName()

setPolicyName

public void setPolicyName(javax.management.ObjectName policyName)

getPolicyAttributeName

public java.lang.String getPolicyAttributeName()

setPolicyAttributeName

public void setPolicyAttributeName(java.lang.String policyAttributeName)

getMBeanServer

public javax.management.MBeanServer getMBeanServer()

setMBeanServer

public void setMBeanServer(javax.management.MBeanServer server)

inService

public boolean inService(java.lang.String policyContextID)
                  throws javax.security.jacc.PolicyContextException
Test if the provided context id has an active policy configuration.

Specified by:
inService in interface SecurityProvider
Parameters:
policyContextID - the identifier of the policy context to test
Returns:
true if there is a policy context for the provided id
Throws:
javax.security.jacc.PolicyContextException

getPolicyConfiguration

public javax.security.jacc.PolicyConfiguration getPolicyConfiguration(java.lang.String policyContextID,
                                                                      boolean remove)
                                                               throws javax.security.jacc.PolicyContextException
Get the policy configuration interface that allows to configure the policy

Specified by:
getPolicyConfiguration in interface SecurityProvider
Parameters:
policyContextID - the policy context identifier
remove - true, if the policy configuration should be removed from the policy
Returns:
a policy configuration for the provided context id
Throws:
javax.security.jacc.PolicyContextException

getPolicy

public java.security.Policy getPolicy()
Get the active security policy that allows security checks

Specified by:
getPolicy in interface SecurityProvider
Returns:
the active security policy