|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.portal.impl.AbstractComponent
org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter
Adapter to use wsrp-portlets as coplets
It provides the wsrp support by initializing wsrp4j
The aspect/adapter can be configured at the portal manager.
Nested Class Summary | |
static class |
WSRPAdapter.FormRewritingHandler
This handler is triggered by a form element. |
Field Summary | |
static String |
ATTRIBUTE_NAME_CONSUMER_MAP
Key to store the consumer map into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_LAYOUT
Key to store the layout for the wsrp portlet into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY
Key to store the portlet instance key into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_PORTLET_KEY
Key to store the portlet key into the coplet instance data objectt as a temporary attribute. |
static String |
ATTRIBUTE_NAME_PORTLET_MODES
Key to store the wsrp modes into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_PORTLET_TITLE
Key to store the wsrp title into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_PORTLET_WINDOWSTATES
Key to store the window states into the coplet instance data object as a temporary attribute. |
static String |
ATTRIBUTE_NAME_USER
Key to store the wsrp user into the coplet instance data object as a temporary attribute. |
static String |
CONSUMER_URL
Unique name of the consumer. |
static String |
consumerAgent
Name of the service. |
protected ConsumerEnvironmentImpl |
consumerEnvironment
The consumer environment implementation. |
protected Context |
context
The avalon context. |
protected ThreadLocal |
copletInstanceData
Stores the current coplet instance data per thread. |
protected boolean |
initialized
Initialized? |
protected ServiceManager |
manager
The service locator. |
protected Parameters |
parameters
The configuration for this adapter. |
protected PortalService |
service
The portal service. |
protected ServletConfig |
servletConfig
The servlet configuration. |
protected UserContextProvider |
userContextProvider
The user context provider. |
protected String |
wsrpConfigLocation
Location of the wsrp configuration. |
protected Configuration |
wsrpConfiguration
The wsrp configuration. |
Fields inherited from class org.apache.cocoon.portal.impl.AbstractComponent |
portalService |
Fields inherited from interface org.apache.cocoon.portal.PortalManagerAspect |
ROLE |
Fields inherited from interface org.apache.cocoon.portal.coplet.adapter.CopletAdapter |
ROLE |
Constructor Summary | |
WSRPAdapter()
|
Method Summary | |
boolean |
addProducer(ProducerDescription desc)
Add a new producer |
protected void |
checkInitialized()
Check if we have read our configuration already. |
void |
contextualize(Context context)
|
Object |
createObject(String className)
Create a component. |
void |
dispose()
Removes all portlets, producers and users out of the consumerEnvironment-registries |
Parameters |
getAdapterConfiguration()
Get the adapter configuration. |
ConsumerEnvironmentImpl |
getConsumerEnvironment()
|
CopletInstanceData |
getCurrentCopletInstanceData()
Return the current coplet instance data |
protected oasis.names.tc.wsrp.v1.types.MarkupContext |
getMarkupContext(org.apache.wsrp4j.consumer.WSRPPortlet portlet,
SimplePortletWindowSession windowSession,
org.apache.wsrp4j.consumer.User user)
Retrieves the markup generated by the portlet. |
protected String |
getPortletInstanceKey(org.apache.wsrp4j.consumer.PortletKey key,
CopletInstanceData coplet,
String userName)
Creates a String consists of the producer-id_portlet-handle_coplet-id_user-name |
SimplePortletWindowSession |
getSimplePortletWindowSession(org.apache.wsrp4j.consumer.WSRPPortlet portlet,
String portletInstanceKey,
org.apache.wsrp4j.consumer.User user)
After getting the userSession and groupSession it performs the getServiceDescription()-call |
Configuration |
getWsrpConfiguration()
Get the wsrp configuration. |
void |
inform(WSRPEvent event,
PortalService service)
Gets all required information like portletKey, portletInstanceKey, userName, portletModes, windowStates, interactionState and the navigationalStat After that it decides with the URL_TYPE to perform the performBlockingInteraction()-call or do some render- alternatively some resource-specific things |
void |
initialize()
Sets the WSRPLogger, the producerConfig and the consumerEnvironment |
void |
login(CopletInstanceData coplet)
Gets the required information of the producer, user, wsrp-portlet, window-states, window-modes and stores its into the copletInstanceData After that it initiates the getServiceDescription()-call |
void |
logout(CopletInstanceData coplet)
Releases all sessions (userSession, groupSession, portletSession) |
void |
parameterize(Parameters params)
|
protected void |
performBlockingInteraction(org.apache.wsrp4j.consumer.WSRPPortlet portlet,
SimplePortletWindowSession windowSession,
org.apache.wsrp4j.consumer.User user,
Request request)
Performs an blocking interaction with the given portlet and session. |
void |
prepare(PortalManagerAspectPrepareContext aspectContext,
PortalService service)
|
void |
render(PortalManagerAspectRenderContext aspectContext,
PortalService service,
ContentHandler ch,
Parameters parameters)
|
void |
service(ServiceManager manager)
|
void |
setCurrentCopletInstanceData(CopletInstanceData coplet)
This sets the current coplet instance data for the thread |
void |
streamContent(CopletInstanceData coplet,
ContentHandler contentHandler)
Checks the values of the portlet-key and the user for current portlet-instance After that all passed the getMarkup()-call will be initiated |
Methods inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter |
destroy, getConfiguration, getConfiguration, init, renderErrorContent, toSAX |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ATTRIBUTE_NAME_CONSUMER_MAP
public static final String ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY
public static final String ATTRIBUTE_NAME_PORTLET_KEY
public static final String ATTRIBUTE_NAME_USER
public static final String ATTRIBUTE_NAME_LAYOUT
public static final String ATTRIBUTE_NAME_PORTLET_TITLE
public static final String ATTRIBUTE_NAME_PORTLET_MODES
public static final String ATTRIBUTE_NAME_PORTLET_WINDOWSTATES
public static final String CONSUMER_URL
public static final String consumerAgent
protected Context context
protected ConsumerEnvironmentImpl consumerEnvironment
protected final ThreadLocal copletInstanceData
protected ServletConfig servletConfig
protected ServiceManager manager
protected PortalService service
protected UserContextProvider userContextProvider
protected String wsrpConfigLocation
protected boolean initialized
protected Configuration wsrpConfiguration
protected Parameters parameters
Constructor Detail |
public WSRPAdapter()
Method Detail |
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
contextualize
in class AbstractComponent
ContextException
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractComponent
ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public void parameterize(Parameters params) throws ParameterException
parameterize
in interface Parameterizable
ParameterException
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)
public void initialize() throws Exception
initialize
in interface Initializable
initialize
in class AbstractComponent
Exception
Initializable.initialize()
public void dispose()
dispose
in interface Disposable
dispose
in class AbstractComponent
Disposable.dispose()
public void login(CopletInstanceData coplet)
login
in interface CopletAdapter
login
in class AbstractCopletAdapter
AbstractCopletAdapter.login(org.apache.cocoon.portal.coplet.CopletInstanceData)
public void streamContent(CopletInstanceData coplet, ContentHandler contentHandler) throws SAXException
streamContent
in class AbstractCopletAdapter
SAXException
AbstractCopletAdapter.streamContent(org.apache.cocoon.portal.coplet.CopletInstanceData, org.xml.sax.ContentHandler)
public void logout(CopletInstanceData coplet)
logout
in interface CopletAdapter
logout
in class AbstractCopletAdapter
AbstractCopletAdapter.logout(org.apache.cocoon.portal.coplet.CopletInstanceData)
public SimplePortletWindowSession getSimplePortletWindowSession(org.apache.wsrp4j.consumer.WSRPPortlet portlet, String portletInstanceKey, org.apache.wsrp4j.consumer.User user) throws org.apache.wsrp4j.exception.WSRPException
portlet
- portletInstanceKey
- user
-
org.apache.wsrp4j.exception.WSRPException
protected void performBlockingInteraction(org.apache.wsrp4j.consumer.WSRPPortlet portlet, SimplePortletWindowSession windowSession, org.apache.wsrp4j.consumer.User user, Request request)
portlet
- The portlet on which this action should be performedwindowSession
- The window session of the portlet on which the action should
be performeduser
- The user on which this action should be performedrequest
- The request with all required information for the callprotected oasis.names.tc.wsrp.v1.types.MarkupContext getMarkupContext(org.apache.wsrp4j.consumer.WSRPPortlet portlet, SimplePortletWindowSession windowSession, org.apache.wsrp4j.consumer.User user) throws org.apache.wsrp4j.exception.WSRPException
portlet
- windowSession
- user
-
org.apache.wsrp4j.exception.WSRPException
protected String getPortletInstanceKey(org.apache.wsrp4j.consumer.PortletKey key, CopletInstanceData coplet, String userName)
key
- includes the essential valuescoplet
- current CopletInstanceData-objectuserName
-
public void inform(WSRPEvent event, PortalService service)
Receiver
public void prepare(PortalManagerAspectPrepareContext aspectContext, PortalService service) throws ProcessingException
prepare
in interface PortalManagerAspect
ProcessingException
PortalManagerAspect.prepare(org.apache.cocoon.portal.PortalManagerAspectPrepareContext, org.apache.cocoon.portal.PortalService)
public void render(PortalManagerAspectRenderContext aspectContext, PortalService service, ContentHandler ch, Parameters parameters) throws SAXException
render
in interface PortalManagerAspect
SAXException
PortalManagerAspect.render(org.apache.cocoon.portal.PortalManagerAspectRenderContext, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler, org.apache.avalon.framework.parameters.Parameters)
public ConsumerEnvironmentImpl getConsumerEnvironment()
public boolean addProducer(ProducerDescription desc)
desc
- The producer description.
public void setCurrentCopletInstanceData(CopletInstanceData coplet)
coplet
- The coplet instance data or null to clear the information.public CopletInstanceData getCurrentCopletInstanceData()
protected void checkInitialized()
public Configuration getWsrpConfiguration()
public Parameters getAdapterConfiguration()
public Object createObject(String className) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |