|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectServiceMBeanSupport
org.jboss.portal.jems.as.system.AbstractJBossService
org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager
public class PersistentPortletStatePersistenceManager
Field Summary | |
---|---|
protected ObjectContextualizer |
contextualizer
. |
protected SessionFactory |
sessionFactory
. |
protected java.lang.String |
sessionFactoryJNDIName
. |
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)
Clone an existing state. |
java.lang.String |
cloneState(java.lang.String stateId,
PropertyMap propertyMap)
Clone an existing state. |
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,
PropertyMap propertyMap)
Create the initial state. |
void |
destroyState(java.lang.String stateId)
Destroy the state. |
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 Session |
getCurrentSession()
|
Registration |
getRegistration(java.lang.String registrationId)
|
java.util.Collection |
getRegistrations()
|
java.lang.String |
getSessionFactoryJNDIName()
|
PortletStateContext |
loadState(java.lang.String id)
Load the state. |
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,
PropertyMap propertyMap)
Update the state. |
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
---|
create, destroy, getState, getStateString, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SessionFactory sessionFactory
protected java.lang.String sessionFactoryJNDIName
protected ObjectContextualizer contextualizer
Constructor Detail |
---|
public PersistentPortletStatePersistenceManager()
Method Detail |
---|
public java.lang.String getSessionFactoryJNDIName()
public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
public PortletStateContext loadState(java.lang.String id) throws InvalidStateIdException, NoSuchStateException
PortletStatePersistenceManager
loadState
in interface PortletStatePersistenceManager
id
- the state id
InvalidStateIdException
- if the state id is not valid
NoSuchStateException
- is the specified state does not existpublic java.lang.String createState(java.lang.String portletId, PropertyMap propertyMap)
PortletStatePersistenceManager
createState
in interface PortletStatePersistenceManager
portletId
- the id that this state refers to
public java.lang.String cloneState(java.lang.String stateId, PropertyMap propertyMap) throws InvalidStateIdException, NoSuchStateException
PortletStatePersistenceManager
cloneState
in interface PortletStatePersistenceManager
stateId
- the id that this state refers topropertyMap
- the values of the cloned state
InvalidStateIdException
- if the state id is not valid
NoSuchStateException
- is the specified state does not existpublic java.lang.String cloneState(java.lang.String stateId) throws java.lang.IllegalArgumentException, NoSuchStateException, InvalidStateIdException
PortletStatePersistenceManager
cloneState
in interface PortletStatePersistenceManager
stateId
- the id that this state refers to
java.lang.IllegalArgumentException
- if the state id is null
NoSuchStateException
- is the specified state does not exist
InvalidStateIdException
- if the state id is not validpublic void updateState(java.lang.String stateId, PropertyMap propertyMap) throws InvalidStateIdException, NoSuchStateException
PortletStatePersistenceManager
updateState
in interface PortletStatePersistenceManager
propertyMap
- the updated state
InvalidStateIdException
- if the state id is not valid
NoSuchStateException
- is the specified state does not existpublic void destroyState(java.lang.String stateId) throws InvalidStateIdException, NoSuchStateException
PortletStatePersistenceManager
destroyState
in interface PortletStatePersistenceManager
InvalidStateIdException
- if the state id is not valid
NoSuchStateException
- is the specified state does not existprotected void startService() throws java.lang.Exception
java.lang.Exception
protected void stopService() throws java.lang.Exception
java.lang.Exception
protected Session getCurrentSession()
public Consumer createConsumer(java.lang.String consumerId, java.lang.String consumerName) throws RegistrationException
RegistrationPersistenceManager
createConsumer
in interface RegistrationPersistenceManager
RegistrationException
public ConsumerGroup getConsumerGroup(java.lang.String name) throws RegistrationException
RegistrationPersistenceManager
getConsumerGroup
in interface RegistrationPersistenceManager
name
- the name of the group to be retrieved
RegistrationException
public ConsumerGroup createConsumerGroup(java.lang.String name) throws RegistrationException
RegistrationPersistenceManager
createConsumerGroup
in interface RegistrationPersistenceManager
name
- the name of the ConsumerGroup to be created
RegistrationException
public void removeConsumerGroup(java.lang.String name) throws RegistrationException
removeConsumerGroup
in interface RegistrationPersistenceManager
RegistrationException
public void removeConsumer(java.lang.String consumerId) throws RegistrationException
removeConsumer
in interface RegistrationPersistenceManager
RegistrationException
public void removeRegistration(java.lang.String registrationId) throws RegistrationException
removeRegistration
in interface RegistrationPersistenceManager
RegistrationException
public Consumer getConsumerById(java.lang.String consumerId) throws RegistrationException
RegistrationPersistenceManager
getConsumerById
in interface RegistrationPersistenceManager
consumerId
- the consumer id
RegistrationException
public Registration addRegistrationFor(java.lang.String consumerId, java.util.Map registrationProperties) throws RegistrationException
addRegistrationFor
in interface RegistrationPersistenceManager
RegistrationException
public Registration getRegistration(java.lang.String registrationId)
getRegistration
in interface RegistrationPersistenceManager
public Consumer addConsumerToGroupNamed(java.lang.String consumerId, java.lang.String groupName) throws RegistrationException
addConsumerToGroupNamed
in interface RegistrationPersistenceManager
RegistrationException
public java.util.Collection getConsumerGroups()
getConsumerGroups
in interface RegistrationPersistenceManager
public java.util.Collection getConsumers()
getConsumers
in interface RegistrationPersistenceManager
public java.util.Collection getRegistrations()
getRegistrations
in interface RegistrationPersistenceManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |