org.exoplatform.services.wsrp.consumer.impl
Class ConsumerEnvironmentImpl

java.lang.Object
  extended by org.exoplatform.services.wsrp.consumer.impl.ConsumerEnvironmentImpl
All Implemented Interfaces:
Consumer, ConsumerCapabilities, ConsumerEnvironment

public class ConsumerEnvironmentImpl
extends java.lang.Object
implements ConsumerEnvironment


Constructor Summary
ConsumerEnvironmentImpl(PortletRegistry portletRegistry, PortletDriverRegistry portletDriverRegistry, ProducerRegistry producerRegistry, UserRegistry userRegistry, URLTemplateComposer urlTemplateComposer, URLRewriter urlRewriter)
           
 
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.
 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 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 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 setUserAuthentication(java.lang.String authMethod)
          Set the method of end user authentication used by the consumer..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerEnvironmentImpl

public ConsumerEnvironmentImpl(PortletRegistry portletRegistry,
                               PortletDriverRegistry portletDriverRegistry,
                               ProducerRegistry producerRegistry,
                               UserRegistry userRegistry,
                               URLTemplateComposer urlTemplateComposer,
                               URLRewriter urlRewriter)
Method Detail

getPortletRegistry

public PortletRegistry getPortletRegistry()
Description copied from interface: Consumer
Get the portlet registry of the consumer.

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

getPortletDriverRegistry

public PortletDriverRegistry getPortletDriverRegistry()
Description copied from interface: Consumer
Get the portlet driver registry of the consumer.

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

getProducerRegistry

public ProducerRegistry getProducerRegistry()
Description copied from interface: Consumer
Get the producer registry of the consumer.

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

getUserRegistry

public UserRegistry getUserRegistry()
Description copied from interface: Consumer
Get the user registry of the consumer.

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

getTemplateComposer

public URLTemplateComposer getTemplateComposer()
Description copied from interface: Consumer
Get the url template composer for template proccessing

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

getURLRewriter

public URLRewriter getURLRewriter()
Description copied from interface: Consumer
Get the url rewriter for consumer url-rewriting

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

getConsumerAgent

public java.lang.String getConsumerAgent()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
Set the name of the consumer

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

getUserAuthentication

public java.lang.String getUserAuthentication()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
Set the method of end user authentication used by the consumer..

Specified by:
setUserAuthentication in interface ConsumerCapabilities

getSupportedLocales

public java.lang.String[] getSupportedLocales()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
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 supported locales

getSupportedModes

public java.lang.String[] getSupportedModes()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
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()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
Set the window states which are supported by the consumer.

Specified by:
setSupportedWindowStates in interface ConsumerCapabilities

getPortletStateChange

public StateChange getPortletStateChange()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
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: StateChange.OK, StateChange.Clone, StateChange.Fault

getCharacterEncodingSet

public java.lang.String[] getCharacterEncodingSet()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
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()
Description copied from interface: ConsumerCapabilities
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)
Description copied from interface: ConsumerCapabilities
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


Copyright © 2011 eXo Platform SAS. All Rights Reserved.