org.jboss.portal.core.model.content.spi.handler
Interface ContentHandler

All Known Implementing Classes:
InternalCMSContentProvider, InternalGenericContentProvider, InternalPortletContentProvider

public interface ContentHandler

The content handler act as a factory for Content objects from their state. The interface receives also callbacks of the content lifecycle in order to be able to manage additional resources related to the content.

Version:
$Revision: 1.1 $
Author:
Julien Viet

Method Summary
 void contentCreated(java.lang.String contextId, ContentState state)
          Life cycle method to signal state creation.
 void contentDestroyed(java.lang.String contextId, ContentState state)
          Life cycle method to signal state destruction.
 Content newContent(java.lang.String contextId, ContentState state)
          Factory method that creates an instance of content object.
 

Method Detail

newContent

Content newContent(java.lang.String contextId,
                   ContentState state)
Factory method that creates an instance of content object. This method is called whenever the frameworks needs a runtime representation of the content state which can be used at runtime by content clients.

Parameters:
contextId - the context id in which the state is used
state - the state
Returns:
the content interface implementation

contentCreated

void contentCreated(java.lang.String contextId,
                    ContentState state)
Life cycle method to signal state creation.

Parameters:
contextId - the context id in which the state is created
state - the state

contentDestroyed

void contentDestroyed(java.lang.String contextId,
                      ContentState state)
Life cycle method to signal state destruction.

Parameters:
contextId - the context id in which the state is destroyed
state - the state