Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.core.impl.model.instance
Class InstanceContainerImpl

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.portal.jems.as.system.AbstractJBossService
                  org.jboss.portal.core.impl.model.instance.InstanceContainerImpl

All Implemented Interfaces:
  javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, InstanceContainer, AuthorizationDomain, DomainConfigurator, PermissionFactory, PermissionRepository, org.jboss.system.Service, org.jboss.system.ServiceMBean

    public class InstanceContainerImpl

extends AbstractJBossService
implements InstanceContainer, AuthorizationDomain, DomainConfigurator, PermissionRepository, PermissionFactory

Instance Container that is persistent

Version:
  $Revision: 8786 $
Author:
  Julien Viet, Anil.Saldhana@jboss.org

Field Summary
`protected JBossAuthorizationDomainRegistry` | `authorizationDomainRegistry` .
`protected boolean` | `cloneOnCreate` If true clone the portlet on an instance creation.
`protected JBossInstanceContainerContext` | `containerContext` The container context.
`protected InvocationHandler` | `handler` .
`protected boolean` | `performSecurityChecks` Used to bypass security checks for testing.
`protected PortalAuthorizationManagerFactory` | `portalAuthorizationManagerFactory` .
`protected PortletInvoker` | `portletInvoker` .
`protected InterceptorStackFactory` | `stackFactory` .

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
`InstanceContainerImpl()`

Method Summary
`InstanceDefinition` | `createDefinition(InstanceMetaData instanceMD)` Create a new instance of the specified portlet.
`InstanceDefinition` | `createDefinition(java.lang.String id, java.lang.String portletId)` Create a new instance of the specified portlet.
`InstanceDefinition` | `createDefinition(java.lang.String id, java.lang.String portletId, boolean clone)` Create a new instance of the specified portlet.
`PortalPermission` | `createPermission(java.lang.String uri, java.util.Collection actions)`
`PortalPermission` | `createPermission(java.lang.String uri, java.lang.String action)`
`PortalPermission` | `createPermissionContainer(PortalPermissionCollection collection)`
`void` | `destroyDefinition(java.lang.String id)` Destroy the specified instance.
`AuthorizationDomain` | `getAuthorizationDomain()` Return the AuthorizationDomain
`JBossAuthorizationDomainRegistry` | `getAuthorizationDomainRegistry()`
`boolean` | `getCloneOnCreate()`
`DomainConfigurator` | `getConfigurator()` The domain configurator.
`JBossInstanceContainerContext` | `getContainerContext()`
`InstanceDefinition` | `getDefinition(java.lang.String id)` Return the specified instance from its id or null if it does not exist.
`java.util.Collection` | `getDefinitions()` Return all the instances in the container.
`boolean` | `getPerformSecurityChecks()`
`PortalPermission` | `getPermission(java.lang.String roleName, java.lang.String uri)` Load a permission from the repository.
`PermissionFactory` | `getPermissionFactory()` The permission repository.
`PermissionRepository` | `getPermissionRepository()` The permission factory.
`PortalAuthorizationManagerFactory` | `getPortalAuthorizationManagerFactory()`
`PortletInvoker` | `getPortletInvoker()` Return the underlying portlet invoker for the instance container.
`java.util.Set` | `getSecurityBindings(java.lang.String uri)` Return the set of constraints for the given uri.
`InterceptorStackFactory` | `getStackFactory()`
`java.lang.String` | `getType()` The domain type.
`void` | `removeSecurityBindings(java.lang.String uri)` Remove the contstraints for the provided uri
`void` | `setAuthorizationDomainRegistry(JBossAuthorizationDomainRegistry authorizationDomainRegistry)`
`void` | `setCloneOnCreate(boolean cloneOnCreate)`
`void` | `setContainerContext(JBossInstanceContainerContext containerContext)`
`void` | `setPerformSecurityChecks(boolean performSecurityChecks)`
`void` | `setPortalAuthorizationManagerFactory(PortalAuthorizationManagerFactory portalAuthorizationManagerFactory)`
`void` | `setPortletInvoker(PortletInvoker portletInvoker)`
`void` | `setSecurityBindings(java.lang.String uri, java.util.Set securityBindings)` Add the provided constraints to this policy configuration
`void` | `setStackFactory(InterceptorStackFactory stackFactory)`
`protected void` | `startService()`
`protected void` | `stopService()`

Methods inherited from class org.jboss.portal.jems.as.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`

Field Detail

### stackFactory

    protected InterceptorStackFactory stackFactory

  .

### portletInvoker

    protected PortletInvoker portletInvoker

  .

### portalAuthorizationManagerFactory

    protected PortalAuthorizationManagerFactory portalAuthorizationManagerFactory

  .

### authorizationDomainRegistry

    protected JBossAuthorizationDomainRegistry authorizationDomainRegistry

  .

### handler

    protected InvocationHandler handler

  .

### performSecurityChecks

    protected boolean performSecurityChecks

  Used to bypass security checks for testing.

### cloneOnCreate

    protected boolean cloneOnCreate

  If true clone the portlet on an instance creation.

### containerContext

    protected JBossInstanceContainerContext containerContext

  The container context.

Constructor Detail

### InstanceContainerImpl

    public InstanceContainerImpl()

Method Detail

### getStackFactory

    public InterceptorStackFactory getStackFactory()

### setStackFactory

    public void setStackFactory(InterceptorStackFactory stackFactory)

### getPortletInvoker

    public PortletInvoker getPortletInvoker()

  Description copied from interface: `InstanceContainer`
  Return the underlying portlet invoker for the instance container.

  Specified by:
    `getPortletInvoker` in interface `InstanceContainer`
  Returns:
    the portlet invoker

### setPortletInvoker

    public void setPortletInvoker(PortletInvoker portletInvoker)

### getAuthorizationDomainRegistry

    public JBossAuthorizationDomainRegistry getAuthorizationDomainRegistry()

### setAuthorizationDomainRegistry

    public void setAuthorizationDomainRegistry(JBossAuthorizationDomainRegistry authorizationDomainRegistry)

### getPortalAuthorizationManagerFactory

    public PortalAuthorizationManagerFactory getPortalAuthorizationManagerFactory()

### setPortalAuthorizationManagerFactory

    public void setPortalAuthorizationManagerFactory(PortalAuthorizationManagerFactory portalAuthorizationManagerFactory)

### startService

    protected void startService()
                         throws java.lang.Exception

  Overrides:
    `startService` in class `org.jboss.system.ServiceMBeanSupport`
  Throws:
    `java.lang.Exception`

### stopService

    protected void stopService()
                        throws java.lang.Exception

  Overrides:
    `stopService` in class `org.jboss.system.ServiceMBeanSupport`
  Throws:
    `java.lang.Exception`

### createPermissionContainer

    public PortalPermission createPermissionContainer(PortalPermissionCollection collection)
                                               throws PortalSecurityException

  Specified by:
    `createPermissionContainer` in interface `PermissionFactory`
  Throws:
    `PortalSecurityException`

### createPermission

    public PortalPermission createPermission(java.lang.String uri,
                                             java.lang.String action)
                                      throws PortalSecurityException

  Specified by:
    `createPermission` in interface `PermissionFactory`
  Throws:
    `PortalSecurityException`

### createPermission

    public PortalPermission createPermission(java.lang.String uri,
                                             java.util.Collection actions)
                                      throws PortalSecurityException

  Specified by:
    `createPermission` in interface `PermissionFactory`
  Throws:
    `PortalSecurityException`

### getAuthorizationDomain

    public AuthorizationDomain getAuthorizationDomain()

  Description copied from interface: `InstanceContainer`
  Return the AuthorizationDomain

  Specified by:
    `getAuthorizationDomain` in interface `InstanceContainer`
  Returns:
    the authorization domain

### getCloneOnCreate

    public boolean getCloneOnCreate()

### setCloneOnCreate

    public void setCloneOnCreate(boolean cloneOnCreate)

### getPerformSecurityChecks

    public boolean getPerformSecurityChecks()

### setPerformSecurityChecks

    public void setPerformSecurityChecks(boolean performSecurityChecks)

### getContainerContext

    public JBossInstanceContainerContext getContainerContext()

### setContainerContext

    public void setContainerContext(JBossInstanceContainerContext containerContext)

### getDefinition

    public InstanceDefinition getDefinition(java.lang.String id)

  Description copied from interface: `InstanceContainer`
  Return the specified instance from its id or null if it does not exist.

  Specified by:
    `getDefinition` in interface `InstanceContainer`
  Parameters:
    `id` - the instance id

### createDefinition

    public InstanceDefinition createDefinition(java.lang.String id,
                                               java.lang.String portletId)
                                        throws DuplicateInstanceException,
                                               java.lang.IllegalArgumentException,
                                               PortletInvokerException

  Description copied from interface: `InstanceContainer`
  Create a new instance of the specified portlet.

  Specified by:
    `createDefinition` in interface `InstanceContainer`
    `portletId` - the portlet id
  Returns:
    the newly created instance
  Throws:
    `DuplicateInstanceException` - if the instance already exist
    `java.lang.IllegalArgumentException` - if the instance id is null
    `PortletInvokerException`

### createDefinition

    public InstanceDefinition createDefinition(InstanceMetaData instanceMD)
                                        throws DuplicateInstanceException,
                                               java.lang.IllegalArgumentException,
                                               PortletInvokerException

  Description copied from interface: `InstanceContainer`
  Create a new instance of the specified portlet.

  Specified by:
    `createDefinition` in interface `InstanceContainer`
  Parameters:
    `instanceMD` - the instance Metadata
  Returns:
    the newly created instance
  Throws:
    `DuplicateInstanceException` - if the instance already exist
    `java.lang.IllegalArgumentException` - if the instance id is null
    `PortletInvokerException`

### createDefinition

    public InstanceDefinition createDefinition(java.lang.String id,
                                               java.lang.String portletId,
                                               boolean clone)
                                        throws DuplicateInstanceException,
                                               PortletInvokerException

  Description copied from interface: `InstanceContainer`
  Create a new instance of the specified portlet.

  Specified by:
    `createDefinition` in interface `InstanceContainer`
    `portletId` - the portlet id
    `clone` - force a clone of the portlet
  Returns:
    the newly created instance
  Throws:
    `DuplicateInstanceException` - if the instance already exist
    `PortletInvokerException`

### destroyDefinition

    public void destroyDefinition(java.lang.String id)
                           throws PortletInvokerException,
                                  NoSuchInstanceException

  Description copied from interface: `InstanceContainer`
  Destroy the specified instance.

  Specified by:
    `destroyDefinition` in interface `InstanceContainer`
  Throws:
    `PortletInvokerException`
    `NoSuchInstanceException`

### getDefinitions

    public java.util.Collection getDefinitions()

  Description copied from interface: `InstanceContainer`
  Return all the instances in the container.

  Specified by:
    `getDefinitions` in interface `InstanceContainer`
  Returns:
    a collection containing the instances in the container

### getType

    public java.lang.String getType()

  Description copied from interface: `AuthorizationDomain`
  The domain type.

  Specified by:
    `getType` in interface `AuthorizationDomain`

### getConfigurator

    public DomainConfigurator getConfigurator()

  Description copied from interface: `AuthorizationDomain`
  The domain configurator.

  Specified by:
    `getConfigurator` in interface `AuthorizationDomain`

### getPermissionRepository

    public PermissionRepository getPermissionRepository()

  Description copied from interface: `AuthorizationDomain`
  The permission factory.

  Specified by:
    `getPermissionRepository` in interface `AuthorizationDomain`

### getPermissionFactory

    public PermissionFactory getPermissionFactory()

  Description copied from interface: `AuthorizationDomain`
  The permission repository.

  Specified by:
    `getPermissionFactory` in interface `AuthorizationDomain`

### getSecurityBindings

    public java.util.Set getSecurityBindings(java.lang.String uri)

  Description copied from interface: `DomainConfigurator`
  Return the set of constraints for the given uri.

  Specified by:
    `getSecurityBindings` in interface `DomainConfigurator`
  Returns:
    a set of SecurityConstraint containing the roles and actions allowed for the resource

### setSecurityBindings

    public void setSecurityBindings(java.lang.String uri,
                                    java.util.Set securityBindings)
                             throws SecurityConfigurationException

  Description copied from interface: `DomainConfigurator`
  Add the provided constraints to this policy configuration

  Specified by:
    `setSecurityBindings` in interface `DomainConfigurator`
  Throws:
    `SecurityConfigurationException`

### removeSecurityBindings

    public void removeSecurityBindings(java.lang.String uri)
                                throws SecurityConfigurationException

  Description copied from interface: `DomainConfigurator`
  Remove the contstraints for the provided uri

  Specified by:
    `removeSecurityBindings` in interface `DomainConfigurator`
  Parameters:
    `uri` - the identifier of the secured resource
  Throws:
    `SecurityConfigurationException`

### getPermission

    public PortalPermission getPermission(java.lang.String roleName,
                                          java.lang.String uri)
                                   throws PortalSecurityException

  Description copied from interface: `PermissionRepository`
  Load a permission from the repository.

  Specified by:
    `getPermission` in interface `PermissionRepository`
  Returns:
    a portam permission
  Throws:
    `PortalSecurityException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD