org.apache.cocoon.portal.wsrp.consumer
Class URLTemplateComposerImpl

java.lang.Object
  extended byorg.apache.cocoon.portal.wsrp.consumer.URLTemplateComposerImpl
All Implemented Interfaces:
RequiresWSRPAdapter, org.apache.wsrp4j.consumer.URLTemplateComposer

public class URLTemplateComposerImpl
extends Object
implements org.apache.wsrp4j.consumer.URLTemplateComposer, RequiresWSRPAdapter

Implements the URLTemplateComposer interface providing methods to generate URL templates.
The generated templates will be transmitted to producers (or respectively portlets) that are willing to properly write URLs for a consumer. (With templates the consumer indicates how it needs URLs formatted in order to process them properly.)

Version:
$Id: URLTemplateComposerImpl.java 322475 2005-10-16 14:26:44Z cziegeler $

Field Summary
protected  WSRPAdapter adapter
          The wsrp adapter.
protected  org.apache.wsrp4j.consumer.URLGenerator urlGenerator
          The url generator.
 
Constructor Summary
URLTemplateComposerImpl()
           
 
Method Summary
 String createBlockingActionTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createDefaultTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createRenderTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createResourceTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createSecureBlockingActionTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createSecureDefaultTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createSecureRenderTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
 String createSecureResourceTemplate(boolean includePortletHandle, boolean includeUserContextKey, boolean includePortletInstanceKey, boolean includeSessionID)
           
protected  String createTemplate(String url, boolean needsURLType, boolean needsPortletMode, boolean needsNavState, boolean needsInteractionState, boolean needsWinState, boolean needsSecURL, boolean needsURL, boolean needsRewriteResource, boolean needsPortletHandle, boolean needsUserContextKey, boolean needsPortletInstanceKey, boolean needsSessionID)
          creates the url for the producer
 String getNamespacePrefix()
           
protected  String insertPair(String token)
          creates a pair of an attribute
 void setURLGenerator(org.apache.wsrp4j.consumer.URLGenerator urlGenerator)
           
 void setWSRPAdapter(WSRPAdapter adapter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

urlGenerator

protected org.apache.wsrp4j.consumer.URLGenerator urlGenerator
The url generator.


adapter

protected WSRPAdapter adapter
The wsrp adapter.

Constructor Detail

URLTemplateComposerImpl

public URLTemplateComposerImpl()
Method Detail

setWSRPAdapter

public void setWSRPAdapter(WSRPAdapter adapter)
Specified by:
setWSRPAdapter in interface RequiresWSRPAdapter
See Also:
RequiresWSRPAdapter.setWSRPAdapter(org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter)

setURLGenerator

public void setURLGenerator(org.apache.wsrp4j.consumer.URLGenerator urlGenerator)
Specified by:
setURLGenerator in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.setURLGenerator(org.apache.wsrp4j.consumer.URLGenerator)

createBlockingActionTemplate

public String createBlockingActionTemplate(boolean includePortletHandle,
                                           boolean includeUserContextKey,
                                           boolean includePortletInstanceKey,
                                           boolean includeSessionID)
Specified by:
createBlockingActionTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createBlockingActionTemplate(boolean, boolean, boolean, boolean)

createSecureBlockingActionTemplate

public String createSecureBlockingActionTemplate(boolean includePortletHandle,
                                                 boolean includeUserContextKey,
                                                 boolean includePortletInstanceKey,
                                                 boolean includeSessionID)
Specified by:
createSecureBlockingActionTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createSecureBlockingActionTemplate(boolean, boolean, boolean, boolean)

createRenderTemplate

public String createRenderTemplate(boolean includePortletHandle,
                                   boolean includeUserContextKey,
                                   boolean includePortletInstanceKey,
                                   boolean includeSessionID)
Specified by:
createRenderTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createRenderTemplate(boolean, boolean, boolean, boolean)

createSecureRenderTemplate

public String createSecureRenderTemplate(boolean includePortletHandle,
                                         boolean includeUserContextKey,
                                         boolean includePortletInstanceKey,
                                         boolean includeSessionID)
Specified by:
createSecureRenderTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createSecureRenderTemplate(boolean, boolean, boolean, boolean)

createResourceTemplate

public String createResourceTemplate(boolean includePortletHandle,
                                     boolean includeUserContextKey,
                                     boolean includePortletInstanceKey,
                                     boolean includeSessionID)
Specified by:
createResourceTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createResourceTemplate(boolean, boolean, boolean, boolean)

createSecureResourceTemplate

public String createSecureResourceTemplate(boolean includePortletHandle,
                                           boolean includeUserContextKey,
                                           boolean includePortletInstanceKey,
                                           boolean includeSessionID)
Specified by:
createSecureResourceTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createSecureResourceTemplate(boolean, boolean, boolean, boolean)

createDefaultTemplate

public String createDefaultTemplate(boolean includePortletHandle,
                                    boolean includeUserContextKey,
                                    boolean includePortletInstanceKey,
                                    boolean includeSessionID)
Specified by:
createDefaultTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createDefaultTemplate(boolean, boolean, boolean, boolean)

createSecureDefaultTemplate

public String createSecureDefaultTemplate(boolean includePortletHandle,
                                          boolean includeUserContextKey,
                                          boolean includePortletInstanceKey,
                                          boolean includeSessionID)
Specified by:
createSecureDefaultTemplate in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.createSecureDefaultTemplate(boolean, boolean, boolean, boolean)

getNamespacePrefix

public String getNamespacePrefix()
Specified by:
getNamespacePrefix in interface org.apache.wsrp4j.consumer.URLTemplateComposer
See Also:
URLTemplateComposer.getNamespacePrefix()

createTemplate

protected String createTemplate(String url,
                                boolean needsURLType,
                                boolean needsPortletMode,
                                boolean needsNavState,
                                boolean needsInteractionState,
                                boolean needsWinState,
                                boolean needsSecURL,
                                boolean needsURL,
                                boolean needsRewriteResource,
                                boolean needsPortletHandle,
                                boolean needsUserContextKey,
                                boolean needsPortletInstanceKey,
                                boolean needsSessionID)
creates the url for the producer

Parameters:
url -
needsURLType -
needsPortletMode -
needsNavState -
needsInteractionState -
needsWinState -
needsSecURL -
needsURL -
needsRewriteResource -
needsPortletHandle -
needsUserContextKey -
needsPortletInstanceKey -
needsSessionID -
Returns:
url for the producer

insertPair

protected String insertPair(String token)
creates a pair of an attribute

Parameters:
token -
Returns:
String with the following format: token={token}


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.