org.jsxp.framework
Class UserContext

java.lang.Object
  extended by org.jsxp.framework.UserContext
All Implemented Interfaces:
java.io.Serializable

public class UserContext
extends java.lang.Object
implements java.io.Serializable

The Class UserContext. Default implementation of a user context. The context is automatically instantiated by the framework. You can access it with Context.getUserContext(). Do not create an instance yourself.

See Also:
Context, Serialized Form

Constructor Summary
UserContext()
          Instantiates a new user context.
 
Method Summary
 java.util.Locale getPreferredUserLocale()
          Gets the preferred user locale (from the request).
 java.util.Locale[] getPreferredUserLocales()
          Gets the preferred user locales.
 boolean isAllowedToViewPage(ViewController view, java.lang.String uri)
          Checks if is allowed to view page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserContext

public UserContext()
Instantiates a new user context.

Method Detail

getPreferredUserLocale

public java.util.Locale getPreferredUserLocale()
Gets the preferred user locale (from the request).

Returns:
the preferred user locale

getPreferredUserLocales

public java.util.Locale[] getPreferredUserLocales()
Gets the preferred user locales.

Returns:
the preferred user locales

isAllowedToViewPage

public boolean isAllowedToViewPage(ViewController view,
                                   java.lang.String uri)
Checks if is allowed to view page. Normally called from the default implementation of Application.isAllowedToViewPage(ViewController, String)

Parameters:
view - the view (can be null if only a uri is checked)
uri - the uri
Returns:
true, if is allowed to view page


Copyright © 2012 Oliver Szymanski & David Tanzer