org.apache.wsrp4j.consumer.driver
Class GenericConsumerEnvironment

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericConsumerEnvironment
All Implemented Interfaces:
Consumer, ConsumerCapabilities, ConsumerEnvironment

public abstract class GenericConsumerEnvironment
extends java.lang.Object
implements ConsumerEnvironment


Constructor Summary
GenericConsumerEnvironment()
           
 
Method Summary
 java.lang.String[] getCharacterEncodingSet()
          Get the character sets the consumer wants the remote portlet to use for encoding the markup.
 java.lang.String getConsumerAgent()
          Get the name of the consumer
 java.lang.String[] getMimeTypes()
          Get an array of mime types which are supported by the consumer.
 PortletDriverRegistry getPortletDriverRegistry()
          Get the portlet driver registry of the consumer.
 PortletRegistry getPortletRegistry()
          Get the portlet registry of the consumer.
 StateChange getPortletStateChange()
          Returns a flag which is used to indicate the producer wether or not the processing of portlets is allowed to modify the portlet state.
 ProducerRegistry getProducerRegistry()
          Get the producer registry of the consumer.
 SessionHandler getSessionHandler()
          Get the session handler of the consumer.
 java.lang.String[] getSupportedLocales()
          Get the locales which are supported by the consumer.
 java.lang.String[] getSupportedModes()
          Get the portlet modes the consumer is willing to manage.
 java.lang.String[] getSupportedWindowStates()
          Get the window states the consumer is willing to manage.
 URLTemplateComposer getTemplateComposer()
          Get the url template composer for template proccessing
 URLRewriter getURLRewriter()
          Get the url rewriter for consumer url-rewriting
 java.lang.String getUserAuthentication()
          Get the method which is used by the consumer to authenticate its users.
 UserRegistry getUserRegistry()
          Get the user registry of the consumer.
 void setCharacterEncodingSet(java.lang.String[] charEncoding)
          Set the character set the consumer wants the remote portlet to use for encoding the markup.
 void setConsumerAgent(java.lang.String name)
          Set the name of the consumer
 void setMimeTypes(java.lang.String[] mimeTypes)
          Set the mime types the consumer supports The order in the array defines the order of preference of the consumer.
 void setPortletDriverRegistry(PortletDriverRegistry portletDriverRegistry)
          Set the portlet driver registry of the consumer.
 void setPortletRegistry(PortletRegistry portletRegistry)
          Set the portlet registry of the consumer.
 void setPortletStateChange(StateChange portletStateChange)
          Set a flag which is used to indicate the producer wether or not the processing of portlets is allowed to modify the portlet state.
 void setProducerRegistry(ProducerRegistry producerRegistry)
          Set the producer registry of the consumer.
 void setSessionHandler(SessionHandler sessionHandler)
          Set the session handler of the consumer.
 void setSupportedLocales(java.lang.String[] locales)
          Set the locales which are supported by the consumer.
 void setSupportedModes(java.lang.String[] modes)
          Set the portlet modes which are supported by the consumer.
 void setSupportedWindowStates(java.lang.String[] states)
          Set the window states which are supported by the consumer.
 void setTemplateComposer(URLTemplateComposer templateComposer)
          Set the url template composer for template proccessing
 void setURLRewriter(URLRewriter urlRewriter)
          Set the url rewriter for consumer url-rewriting
 void setUserAuthentication(java.lang.String authMethod)
          Set the method of end user authentication used by the consumer..
 void setUserRegistry(UserRegistry userRegistry)
          Set the user registry of the consumer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericConsumerEnvironment

public GenericConsumerEnvironment()
Method Detail

getConsumerAgent

public java.lang.String getConsumerAgent()
Get the name of the consumer

Specified by:
getConsumerAgent in interface ConsumerCapabilities
Returns:
The name of the consumer

setConsumerAgent

public void setConsumerAgent(java.lang.String name)
Set the name of the consumer

Specified by:
setConsumerAgent in interface ConsumerCapabilities
Parameters:
name - The new name of the consumer

getSupportedLocales

public java.lang.String[] getSupportedLocales()
Get the locales which are supported by the consumer. (ISO-639 + "_" + ISO-3166)

Specified by:
getSupportedLocales in interface ConsumerCapabilities
Returns:
Array with String representations of the locales which are supported by the consumer

setSupportedLocales

public void setSupportedLocales(java.lang.String[] locales)
Set the locales which are supported by the consumer. Pattern: ISO-639 + "_" + ISO-3166

Specified by:
setSupportedLocales in interface ConsumerCapabilities
Parameters:
locales - Array of String representations of the supported locales

getSupportedModes

public java.lang.String[] getSupportedModes()
Get the portlet modes the consumer is willing to manage.

Specified by:
getSupportedModes in interface ConsumerCapabilities
Returns:
Array with string representations of the portlet modes which are supported by the consumer

setSupportedModes

public void setSupportedModes(java.lang.String[] modes)
Set the portlet modes which are supported by the consumer.

Specified by:
setSupportedModes in interface ConsumerCapabilities
Parameters:
modes - Array of string representations of portlet modes

getSupportedWindowStates

public java.lang.String[] getSupportedWindowStates()
Get the window states the consumer is willing to manage.

Specified by:
getSupportedWindowStates in interface ConsumerCapabilities
Returns:
Array with string representations of the window states which are supported by the consumer

setSupportedWindowStates

public void setSupportedWindowStates(java.lang.String[] states)
Set the window states which are supported by the consumer.

Specified by:
setSupportedWindowStates in interface ConsumerCapabilities
Parameters:
states - Array of string representations of window states

getPortletStateChange

public StateChange getPortletStateChange()
Returns a flag which is used to indicate the producer wether or not the processing of portlets is allowed to modify the portlet state.

Specified by:
getPortletStateChange in interface ConsumerCapabilities
Returns:
A flag

setPortletStateChange

public void setPortletStateChange(StateChange portletStateChange)
Set a flag which is used to indicate the producer wether or not the processing of portlets is allowed to modify the portlet state.

Specified by:
setPortletStateChange in interface ConsumerCapabilities
Parameters:
portletStateChange - A flag with one of the following values (OK, Clone, Fault)

getCharacterEncodingSet

public java.lang.String[] getCharacterEncodingSet()
Get the character sets the consumer wants the remote portlet to use for encoding the markup. Valid character sets are defined here

Specified by:
getCharacterEncodingSet in interface ConsumerCapabilities
Returns:
Array of string representations of the character encoding.

setCharacterEncodingSet

public void setCharacterEncodingSet(java.lang.String[] charEncoding)
Set the character set the consumer wants the remote portlet to use for encoding the markup. Valid character sets are defined here

Specified by:
setCharacterEncodingSet in interface ConsumerCapabilities
Parameters:
charEncoding - Array of string representations of the character encoding.

getMimeTypes

public java.lang.String[] getMimeTypes()
Get an array of mime types which are supported by the consumer. The order in the array defines the order of preference of the consumer.

Specified by:
getMimeTypes in interface ConsumerCapabilities
Returns:
An array of mimes types the consumer supports.

setMimeTypes

public void setMimeTypes(java.lang.String[] mimeTypes)
Set the mime types the consumer supports The order in the array defines the order of preference of the consumer.

Specified by:
setMimeTypes in interface ConsumerCapabilities
Parameters:
mimeTypes - An array of mimes types the consumer supports.

getUserAuthentication

public java.lang.String getUserAuthentication()
Get the method which is used by the consumer to authenticate its users.

Specified by:
getUserAuthentication in interface ConsumerCapabilities
Returns:
String indicating how end-users were authenticated by the consumer.

setUserAuthentication

public void setUserAuthentication(java.lang.String authMethod)
Set the method of end user authentication used by the consumer..

Specified by:
setUserAuthentication in interface ConsumerCapabilities
Parameters:
authMethod - String indicating how end-users are authenticated by the consumer.

getUserRegistry

public UserRegistry getUserRegistry()
Get the user registry of the consumer.

Specified by:
getUserRegistry in interface Consumer
Returns:
The consumer specific user registry

setUserRegistry

public void setUserRegistry(UserRegistry userRegistry)
Set the user registry of the consumer.

Parameters:
userRegistry - The consumer specific user registry

getProducerRegistry

public ProducerRegistry getProducerRegistry()
Get the producer registry of the consumer.

Specified by:
getProducerRegistry in interface Consumer
Returns:
The consumer specific producer registry

setProducerRegistry

public void setProducerRegistry(ProducerRegistry producerRegistry)
Set the producer registry of the consumer.

Parameters:
producerRegistry - The consumer specific producer registry

getPortletRegistry

public PortletRegistry getPortletRegistry()
Get the portlet registry of the consumer.

Specified by:
getPortletRegistry in interface Consumer
Returns:
Interface to the consumer specific portlet registry

setPortletRegistry

public void setPortletRegistry(PortletRegistry portletRegistry)
Set the portlet registry of the consumer.

Parameters:
portletRegistry - The consumer specific portlet registry

getPortletDriverRegistry

public PortletDriverRegistry getPortletDriverRegistry()
Get the portlet driver registry of the consumer.

Specified by:
getPortletDriverRegistry in interface Consumer
Returns:
Interface to the consumer specific portlet driver registry

setPortletDriverRegistry

public void setPortletDriverRegistry(PortletDriverRegistry portletDriverRegistry)
Set the portlet driver registry of the consumer.

Parameters:
portletDriverRegistry - The consumer specific portlet driver registry

getSessionHandler

public SessionHandler getSessionHandler()
Get the session handler of the consumer.

Specified by:
getSessionHandler in interface Consumer
Returns:
Interface to the consumer specific session handler

setSessionHandler

public void setSessionHandler(SessionHandler sessionHandler)
Set the session handler of the consumer.

Parameters:
sessionHandler - The consumer specific session handler

getTemplateComposer

public URLTemplateComposer getTemplateComposer()
Get the url template composer for template proccessing

Specified by:
getTemplateComposer in interface Consumer
Returns:
Interface to the consumer specific template composer

setTemplateComposer

public void setTemplateComposer(URLTemplateComposer templateComposer)
Set the url template composer for template proccessing

Parameters:
templateComposer - The consumer specific template composer

getURLRewriter

public URLRewriter getURLRewriter()
Get the url rewriter for consumer url-rewriting

Specified by:
getURLRewriter in interface Consumer
Returns:
The consumer specific url rewriter

setURLRewriter

public void setURLRewriter(URLRewriter urlRewriter)
Set the url rewriter for consumer url-rewriting

Parameters:
urlRewriter - The consumer specific url rewriter