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

java.lang.Object
  extended byoasis.names.tc.wsrp.v1.types.UserContext
      extended byorg.apache.cocoon.portal.wsrp.consumer.UserContextExtension
All Implemented Interfaces:
Serializable

public class UserContextExtension
extends oasis.names.tc.wsrp.v1.types.UserContext

Extends the UserContext-class with the supportedLocales. Without these extension the supportedLocales can only be set global for the consumerEnvironment. In that case all users have the same locale. Now the supportedLocales can be set per user.
The order of the locales is important. If the first entry is not offered by the portlet the second will be tested and so on. The first match delivers the used locale.

Version:
$Id: UserContextExtension.java 322475 2005-10-16 14:26:44Z cziegeler $
See Also:
Serialized Form

Field Summary
protected  String[] supportedLocales
          The locales for the user.
protected  String userAuthentication
          User Authentication.
 
Constructor Summary
UserContextExtension()
          Default constructor
UserContextExtension(oasis.names.tc.wsrp.v1.types.Extension[] extensions, oasis.names.tc.wsrp.v1.types.UserProfile profile, String[] userCategories, String userContextKey)
          Constructor
 
Method Summary
 String[] getSupportedLocales()
           
 String getUserAuthentication()
           
 void setSupportedLocales(String[] supportedLocales)
          Set the supportedLocales for the current user
 void setUserAuthentication(String userAuthentication)
           
 
Methods inherited from class oasis.names.tc.wsrp.v1.types.UserContext
equals, getDeserializer, getExtensions, getExtensions, getProfile, getSerializer, getTypeDesc, getUserCategories, getUserCategories, getUserContextKey, hashCode, setExtensions, setExtensions, setProfile, setUserCategories, setUserCategories, setUserContextKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

supportedLocales

protected String[] supportedLocales
The locales for the user.


userAuthentication

protected String userAuthentication
User Authentication.

Constructor Detail

UserContextExtension

public UserContextExtension()
Default constructor


UserContextExtension

public UserContextExtension(oasis.names.tc.wsrp.v1.types.Extension[] extensions,
                            oasis.names.tc.wsrp.v1.types.UserProfile profile,
                            String[] userCategories,
                            String userContextKey)
Constructor

Parameters:
extensions -
profile -
userCategories -
userContextKey -
Method Detail

setSupportedLocales

public void setSupportedLocales(String[] supportedLocales)
Set the supportedLocales for the current user

Parameters:
supportedLocales -

getSupportedLocales

public String[] getSupportedLocales()
Returns:
all locales the user wants to support

getUserAuthentication

public String getUserAuthentication()

setUserAuthentication

public void setUserAuthentication(String userAuthentication)


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