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

JBossPortalPermissionFactory - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.security.impl
Class JBossPortalPermissionFactory

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.portal.common.system.AbstractJBossService
              extended byorg.jboss.portal.security.impl.JBossPortalPermissionFactory
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, PortalPermissionFactory, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class JBossPortalPermissionFactory
extends AbstractJBossService
implements PortalPermissionFactory

MBean to allow access to permissions and permission checks.

See Also:
PortalPermissionFactory

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
JBossPortalPermissionFactory()
           
 
Method Summary
 boolean checkPermission(java.lang.String type, java.lang.String uri, java.lang.String actions)
          Check for authorization to access the provided portal object (handle) with the provided actions.
 PortalPermission createPermission(java.lang.String type, java.lang.String uri, java.lang.String actions)
          Create a permission for the provided handle and actions, based on the current permission configuration.
 java.util.Properties getConfig()
           
 void setConfig(java.util.Properties config)
           
protected  void startService()
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.portal.common.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossPortalPermissionFactory

public JBossPortalPermissionFactory()
Method Detail

getConfig

public java.util.Properties getConfig()

setConfig

public void setConfig(java.util.Properties config)

createPermission

public PortalPermission createPermission(java.lang.String type,
                                         java.lang.String uri,
                                         java.lang.String actions)
                                  throws PortalPolicyException
Description copied from interface: PortalPermissionFactory
Create a permission for the provided handle and actions, based on the current permission configuration.

The created permission is usually used to configure a policy context with the allowed permissions

Specified by:
createPermission in interface PortalPermissionFactory
Parameters:
type -
uri - the resource identifier
actions - a comma separated list of actions to allow (the actions the permission will contain)
Returns:
the created permission class
Throws:
PortalPolicyException
See Also:
PortalPermissionFactory.createPermission(String,String,String)

checkPermission

public boolean checkPermission(java.lang.String type,
                               java.lang.String uri,
                               java.lang.String actions)
                        throws PortalPolicyException
Description copied from interface: PortalPermissionFactory
Check for authorization to access the provided portal object (handle) with the provided actions.

Specified by:
checkPermission in interface PortalPermissionFactory
Parameters:
type -
uri -
actions - a comma separated list of actions to check authorization for
Returns:
true if the current PortalSubject is allowed to access the handle with the actions
Throws:
PortalPolicyException
See Also:
PortalPermissionFactory.checkPermission(String,String,String)

startService

protected void startService()
                     throws java.lang.Exception
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Throws:
java.lang.Exception