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.portlet.state
Class PersistentPortletStatePersistenceManager

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.portal.jems.as.system.AbstractJBossService
                  org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager

All Implemented Interfaces:
  javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager, RegistrationPersistenceManager, org.jboss.system.Service, org.jboss.system.ServiceMBean

    public class PersistentPortletStatePersistenceManager

extends AbstractJBossService
implements org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager, RegistrationPersistenceManager

Version:
  $Revision: 11068 $
Author:
  Julien Viet

Field Summary
`protected ObjectContextualizer` | `contextualizer` .
`protected org.hibernate.SessionFactory` | `sessionFactory` .
`protected java.lang.String` | `sessionFactoryJNDIName` .

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

Method Summary
`Consumer` | `addConsumerToGroupNamed(java.lang.String consumerId, java.lang.String groupName)`
`Registration` | `addRegistrationFor(java.lang.String consumerId, java.util.Map registrationProperties)`
`java.lang.String` | `cloneState(java.lang.String stateId)`
`java.lang.String` | `cloneState(java.lang.String stateId, org.jboss.portal.portlet.state.PropertyMap propertyMap)`
`Consumer` | `createConsumer(java.lang.String consumerId, java.lang.String consumerName)` Creates a Consumer with the specified identity and name (which might be the same, depending on the policy)
`ConsumerGroup` | `createConsumerGroup(java.lang.String name)` Creates a new ConsumerGroup with the associated name.
`java.lang.String` | `createState(java.lang.String portletId, org.jboss.portal.portlet.state.PropertyMap propertyMap)`
`void` | `destroyState(java.lang.String stateId)`
`Consumer` | `getConsumerById(java.lang.String consumerId)` Return an existing consumer from its id.
`ConsumerGroup` | `getConsumerGroup(java.lang.String name)` Retrieves the ConsumerGroup identified by the specified name.
`java.util.Collection` | `getConsumerGroups()`
`java.util.Collection` | `getConsumers()`
`protected org.hibernate.Session` | `getCurrentSession()`
`Registration` | `getRegistration(java.lang.String registrationId)`
`java.util.Collection` | `getRegistrations()`
`java.lang.String` | `getSessionFactoryJNDIName()`
`org.jboss.portal.portlet.state.producer.PortletStateContext` | `loadState(java.lang.String id)`
`void` | `removeConsumer(java.lang.String consumerId)`
`void` | `removeConsumerGroup(java.lang.String name)`
`void` | `removeRegistration(java.lang.String registrationId)`
`void` | `setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)`
`protected void` | `startService()`
`protected void` | `stopService()`
`void` | `updateState(java.lang.String stateId, org.jboss.portal.portlet.state.PropertyMap propertyMap)`

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

### sessionFactory

    protected org.hibernate.SessionFactory sessionFactory

  .

### sessionFactoryJNDIName

    protected java.lang.String sessionFactoryJNDIName

  .

### contextualizer

    protected ObjectContextualizer contextualizer

  .

Constructor Detail

### PersistentPortletStatePersistenceManager

    public PersistentPortletStatePersistenceManager()

Method Detail

### getSessionFactoryJNDIName

    public java.lang.String getSessionFactoryJNDIName()

### setSessionFactoryJNDIName

    public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)

### loadState

    public org.jboss.portal.portlet.state.producer.PortletStateContext loadState(java.lang.String id)
                                                                          throws org.jboss.portal.portlet.state.InvalidStateIdException,
                                                                                 org.jboss.portal.portlet.state.NoSuchStateException

  Specified by:
    `loadState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`
  Throws:
    `org.jboss.portal.portlet.state.InvalidStateIdException`
    `org.jboss.portal.portlet.state.NoSuchStateException`

### createState

    public java.lang.String createState(java.lang.String portletId,
                                        org.jboss.portal.portlet.state.PropertyMap propertyMap)

  Specified by:
    `createState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`

### cloneState

    public java.lang.String cloneState(java.lang.String stateId,
                                       org.jboss.portal.portlet.state.PropertyMap propertyMap)
                                throws org.jboss.portal.portlet.state.InvalidStateIdException,
                                       org.jboss.portal.portlet.state.NoSuchStateException

  Specified by:
    `cloneState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`
  Throws:
    `org.jboss.portal.portlet.state.InvalidStateIdException`
    `org.jboss.portal.portlet.state.NoSuchStateException`

### cloneState

    public java.lang.String cloneState(java.lang.String stateId)
                                throws java.lang.IllegalArgumentException,
                                       org.jboss.portal.portlet.state.NoSuchStateException,
                                       org.jboss.portal.portlet.state.InvalidStateIdException

  Specified by:
    `cloneState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`
  Throws:
    `java.lang.IllegalArgumentException`
    `org.jboss.portal.portlet.state.NoSuchStateException`
    `org.jboss.portal.portlet.state.InvalidStateIdException`

### updateState

    public void updateState(java.lang.String stateId,
                            org.jboss.portal.portlet.state.PropertyMap propertyMap)
                     throws org.jboss.portal.portlet.state.InvalidStateIdException,
                            org.jboss.portal.portlet.state.NoSuchStateException

  Specified by:
    `updateState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`
  Throws:
    `org.jboss.portal.portlet.state.InvalidStateIdException`
    `org.jboss.portal.portlet.state.NoSuchStateException`

### destroyState

    public void destroyState(java.lang.String stateId)
                      throws org.jboss.portal.portlet.state.InvalidStateIdException,
                             org.jboss.portal.portlet.state.NoSuchStateException

  Specified by:
    `destroyState` in interface `org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager`
  Throws:
    `org.jboss.portal.portlet.state.InvalidStateIdException`
    `org.jboss.portal.portlet.state.NoSuchStateException`

### 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`

### getCurrentSession

    protected org.hibernate.Session getCurrentSession()

### createConsumer

    public Consumer createConsumer(java.lang.String consumerId,
                                   java.lang.String consumerName)
                            throws RegistrationException

  Description copied from interface: `RegistrationPersistenceManager`
  Creates a Consumer with the specified identity and name (which might be the same, depending on the policy)

  Specified by:
    `createConsumer` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### getConsumerGroup

    public ConsumerGroup getConsumerGroup(java.lang.String name)
                                   throws RegistrationException

  Description copied from interface: `RegistrationPersistenceManager`
  Retrieves the ConsumerGroup identified by the specified name.

  Specified by:
    `getConsumerGroup` in interface `RegistrationPersistenceManager`
  Parameters:
    `name` - the name of the group to be retrieved
  Returns:
    the ConsumerGroup identified by the specified name
  Throws:
    `RegistrationException`

### createConsumerGroup

    public ConsumerGroup createConsumerGroup(java.lang.String name)
                                      throws RegistrationException

  Description copied from interface: `RegistrationPersistenceManager`
  Creates a new ConsumerGroup with the associated name.

  Specified by:
    `createConsumerGroup` in interface `RegistrationPersistenceManager`
  Parameters:
    `name` - the name of the ConsumerGroup to be created
  Returns:
    a new ConsumerGroup with the associated name
  Throws:
    `RegistrationException`

### removeConsumerGroup

    public void removeConsumerGroup(java.lang.String name)
                             throws RegistrationException

  Specified by:
    `removeConsumerGroup` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### removeConsumer

    public void removeConsumer(java.lang.String consumerId)
                        throws RegistrationException

  Specified by:
    `removeConsumer` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### removeRegistration

    public void removeRegistration(java.lang.String registrationId)
                            throws RegistrationException

  Specified by:
    `removeRegistration` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### getConsumerById

    public Consumer getConsumerById(java.lang.String consumerId)
                             throws RegistrationException

  Description copied from interface: `RegistrationPersistenceManager`
  Return an existing consumer from its id.

  Specified by:
    `getConsumerById` in interface `RegistrationPersistenceManager`
  Parameters:
    `consumerId` - the consumer id
  Returns:
    the consumer or null if it does not exist
  Throws:
    `RegistrationException`

### addRegistrationFor

    public Registration addRegistrationFor(java.lang.String consumerId,
                                           java.util.Map registrationProperties)
                                    throws RegistrationException

  Specified by:
    `addRegistrationFor` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### getRegistration

    public Registration getRegistration(java.lang.String registrationId)

  Specified by:
    `getRegistration` in interface `RegistrationPersistenceManager`

### addConsumerToGroupNamed

    public Consumer addConsumerToGroupNamed(java.lang.String consumerId,
                                            java.lang.String groupName)
                                     throws RegistrationException

  Specified by:
    `addConsumerToGroupNamed` in interface `RegistrationPersistenceManager`
  Throws:
    `RegistrationException`

### getConsumerGroups

    public java.util.Collection getConsumerGroups()

  Specified by:
    `getConsumerGroups` in interface `RegistrationPersistenceManager`

### getConsumers

    public java.util.Collection getConsumers()

  Specified by:
    `getConsumers` in interface `RegistrationPersistenceManager`

### getRegistrations

    public java.util.Collection getRegistrations()

  Specified by:
    `getRegistrations` in interface `RegistrationPersistenceManager`

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