站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

ServerRequest - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.server
Class ServerRequest

java.lang.Object
  extended byorg.jboss.portal.server.ServerRequest

public class ServerRequest
extends java.lang.Object


Field Summary
protected  java.util.Locale[] locales
          The locales for the scope of the current request.
protected  NavigationalStateContext navigationContext
          The navigation context.
protected  ServerRequestContext reqContext
          The request context.
protected  Server server
          The server used during the request.
protected  java.lang.Object user
          The request user.
 
Constructor Summary
ServerRequest(ServerRequestContext reqContext)
           
 
Method Summary
 ServerRequestContext getContext()
           
 java.util.Locale getLocale()
          Return the first locale in the locale list or null if the list is empty.
 java.util.Locale[] getLocales()
          Return the locales for the scope of the current request.
 NavigationalStateContext getNavigationContext()
           
 Server getServer()
           
 java.lang.Object getUser()
           
 void setLocales(java.util.Locale[] locales)
           
 void setNavigationContext(NavigationalStateContext navigationContext)
           
 void setServer(Server server)
           
 void setUser(java.lang.Object user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

protected java.lang.Object user
The request user.


navigationContext

protected NavigationalStateContext navigationContext
The navigation context.


reqContext

protected ServerRequestContext reqContext
The request context.


locales

protected java.util.Locale[] locales
The locales for the scope of the current request.


server

protected Server server
The server used during the request.

Constructor Detail

ServerRequest

public ServerRequest(ServerRequestContext reqContext)
Method Detail

getNavigationContext

public NavigationalStateContext getNavigationContext()

setNavigationContext

public void setNavigationContext(NavigationalStateContext navigationContext)

getUser

public java.lang.Object getUser()

setUser

public void setUser(java.lang.Object user)

getContext

public ServerRequestContext getContext()

getServer

public Server getServer()

setServer

public void setServer(Server server)

getLocale

public java.util.Locale getLocale()
                           throws java.lang.IllegalStateException
Return the first locale in the locale list or null if the list is empty.

Returns:
the first locale in the list
Throws:
java.lang.IllegalArgumentException - if the locales field is null
java.lang.IllegalStateException

getLocales

public java.util.Locale[] getLocales()
Return the locales for the scope of the current request. It can be based on the locale decided by the web browser available in the original HTTP request or can be based on the current authenticated user that has decided a specific locale.

Returns:
the request locale

setLocales

public void setLocales(java.util.Locale[] locales)