com.taggercat.model
Class Model

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.concurrent.ConcurrentHashMap<java.lang.String,DataSource>
          extended by com.taggercat.model.Model
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.ConcurrentMap<java.lang.String,DataSource>, java.util.EventListener, java.util.Map<java.lang.String,DataSource>, javax.servlet.http.HttpSessionBindingListener

public class Model
extends java.util.concurrent.ConcurrentHashMap<java.lang.String,DataSource>
implements javax.servlet.http.HttpSessionBindingListener, java.io.Serializable

Model encapsulates the Hibernate model objects, and contains the collection of data source instances associated with the current user's session. Since it implements the HttpSessionBindingListener interface, it will be notified when the bound HttpSession expires or is invalidated. The model object needs to be fully serializable so that it can be restored from a persisted state.

See Also:
Serialized Form
 

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
Model()
          A public empty constructor for using the model as a JavaBean.
Model(LoginInfo loginInfo)
          Creates a model instance for the current user.
 
Method Summary
static void addApplicationScopeDataSource(DataSource dataSource)
          Adds a application scope data source
 void addDataSource(DataSource dataSource)
          Adds a DataSource to the Model.
 void addFormatter(java.lang.String dsn, java.lang.String propertyName, java.text.Format formatter)
          Adds a Formatter to the Model for the specified DSN and field name.
static void addPropertyErrorMessage(javax.servlet.http.HttpServletRequest request, java.lang.String dsn, java.lang.String rowId, java.lang.String propertyName, java.lang.String errorMessage)
          Adds an error messages specific to a property to the List attribute on the request object.
 void addRepeatingRegionSize(java.lang.String pageName, java.lang.String dsn, java.lang.Integer regionSize)
          Adds a RepeatingRegion size for the named page, and data source name.
 void clearQBFSearchValues(java.lang.String dataSourceName, boolean executeQuery)
          Clears QBF search values on the named DataSource instance(s).
 void closeRequestScopeDatasources()
          Close all requestScope data sources.
 void delete(java.lang.String dataSourceName)
          Deletes the current tcEntity from the named DataSource instance.
 void deleteSelected(java.lang.String dataSourceName)
          Deletes selected rows from the named DataSource instance.
 void disconnect()
          A clean up method that is called when the user's session is closed.
 void executeQuery(java.lang.String dataSourceName)
          Re-executes the data source's query.
 DataSource get(java.lang.Object dataSourceName)
           
static java.util.List<java.lang.String> getAdminRoles()
           
 AuditInterceptor getAuditInterceptor()
           
static org.hibernate.Session getCurrentHibernateSession()
          Returns the current Hibernate session, not the HTTPSession.
 javax.servlet.http.HttpServletRequest getCurrentRequest()
          Gets the current request being processed by the controller.
 DataSource getDataSource(java.lang.String dataSourceName)
          Returns the named DataSource instance, and additionally executes the data source's query if the data source mode is "deferred" and it has not been executed.
 DataSource getDataSource(java.lang.String dataSourceName, boolean executeDeferred)
          Returns the named DataSource instance and optionally executes the data source's query if the data source mode is "deferred" and it has not been executed.
 DataSource getDataSourceByEntityName(java.lang.String entityName)
          Gets the datasource for the named entity.
static java.lang.String getDataSourceName(java.lang.String parameter)
          Gets the data source name from a parameter, where DataSource name is assumed to be the first token in the parameter, delimited by the '.'
 java.lang.Integer getEntityPermissions(java.lang.String entityName, java.lang.String groupIds)
          Returns a bit mask of the permissions that the user has for the named entity
static Environment getEnvironment()
          Gets this applications environment object.
 java.lang.Object getFieldValue(java.lang.String dsn, java.lang.String propertyName)
          Gets the value of the named field from the current tcEntity in the data source.
 java.text.Format getFormatter(java.lang.String dsn, java.lang.String propertyName)
          Returns the Formatter used to display ( and parse ) the specified property.
 java.util.Locale getLocale()
          Returns this user's locale
 java.lang.String getLoggingUserName()
          Gets the current user's name for logging, it is prefixed with "[user]=".
 LoginInfo getLoginInfo()
           
 com.taggercat.metadata.MetaDataReader getMetaData()
           
 com.taggercat.metadata.MetaProperty getMetaProperty(java.lang.String dsn, java.lang.String propertyName)
           
static java.lang.String getMultiValueParameter(javax.servlet.http.HttpServletRequest request, java.lang.String paramName)
           
 PermissionReader getPermissionReader()
           
 java.lang.Integer getPropertyPermissions(java.lang.String dsn, java.lang.String propertyName, java.lang.String groupIds)
          Returns a bitmask of the users permissions for the specified fieldName on the ds
 int getRepeatingRegionSize(java.lang.String pageName, java.lang.String dsn)
          Gets a RepeatingRegion size.
 org.hibernate.SessionFactory getSessionFactory()
           
static int getUserCount()
           
 java.lang.Long getUserId()
          Gets the current user's ID.
 java.lang.String getUserName()
          Gets the current user's name.
 boolean hasDataSourcePermission(java.lang.String dsn, int permissionType)
          Returns true if the user has the specified permission on this ds.
 boolean hasPagePermission(java.lang.String responsePage)
          Return true if the user has the entity permission for the corresponding default search or edit page name.
 boolean hasPropertyPermission(java.lang.String dsn, java.lang.String propertyName, int permissionType)
          Returns true if the user has the specified permission for the dsn and field name
 void insert(java.lang.String dataSourceName)
          Inserts a tcEntity into the the named DataSource instance.
 boolean isUserInRole(java.util.List<java.lang.String> roleNames)
           
 boolean isUserInRole(java.lang.String roleName)
           
 void listDatasources()
          A convenience method to list all active data sources to the logger as INFO level messages.
 void reloadCurrentEntity(java.lang.String dataSourceName)
           
 void removeDataSource(java.lang.String dataSourceName)
          Closes and removes the named DataSource.
 void removeDataSources(java.util.List<java.lang.String> closeNamesList, java.util.List<java.lang.String> exceptNamesList, boolean resultSetOnly)
          Closes and removes the named DataSource.
 void save(java.lang.String dataSourceName)
          Saves pending changes in the named DataSource instance.
 void saveAll()
          Saves pending changes in all DataSource instances.
static void setAdminRoles(java.util.List<java.lang.String> adminRoles)
           
 void setDataSourcePosition(java.lang.String dataSourceName, java.lang.String position, int size)
          Sets the current tcEntity in the named DataSource's resultset to the named position argument.
 boolean setDatasourceValues(javax.servlet.http.HttpServletRequest request)
          Updates data values for each data source referenced in request.
 void setLocale(java.util.Locale locale)
           
 void setLoginInfo(LoginInfo loginInfo)
           
 void sortDataSource(java.lang.String dataSourceName, java.lang.String propertyName)
          Re-executes the data source's query to display it in a sorted order.
 java.util.Date toDate(java.lang.String dateStr, java.lang.String dsn, java.lang.String propertyName)
          Parses a date string using the Display formatter for the specified field.
 java.util.Date toDateTime(java.lang.String dateStr, java.lang.String dsn, java.lang.String propertyName)
          Parses a date string using the Display formatter for the specified propertyName.
 java.lang.Number toNumber(java.lang.String numberStr, java.lang.String dsn, java.lang.String propertyName)
          Parses a number string using the Display formatter for the specified field.
 void undo(java.lang.String dataSourceName)
          Undoing pending changes in the named DataSource instance.
 void undoAll()
          Undoes any pending changes in all DataSource instances.
 boolean updateQBFData(javax.servlet.http.HttpServletRequest request)
          Updates QBF where clause(s) on DataSource instance(s).
 boolean updateSelectedRowIds(javax.servlet.http.HttpServletRequest request)
          Updates selected tcEntity IDs for each data source referenced in request.
 void updateUserSettings(javax.servlet.http.HttpServletRequest request)
          Sets any user settings; where a parameter name prefix of tcUserSetting.
 void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
          Notification that this Model is being bound to the HttpSession.
 void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
          Notification that this Model is being unbound from the HttpSession.
 
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, isEmpty, keys, keySet, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

Model

public Model()
A public empty constructor for using the model as a JavaBean.


Model

public Model(LoginInfo loginInfo)
Creates a model instance for the current user.

Parameters:
loginInfo - loginInfo
Method Detail

addDataSource

public void addDataSource(DataSource dataSource)
Adds a DataSource to the Model. If there is an existing DataSource of the same name already present in the Model, the existing DataSource is closed and removed before the new DataSource is added. If the DataSource is an Application scope data source, then it is added to the application scope, and not the user's model object.

Parameters:
dataSource - DataSource instance to be added

addApplicationScopeDataSource

public static void addApplicationScopeDataSource(DataSource dataSource)
Adds a application scope data source

Parameters:
dataSource - the data source

addPropertyErrorMessage

public static void addPropertyErrorMessage(javax.servlet.http.HttpServletRequest request,
                                           java.lang.String dsn,
                                           java.lang.String rowId,
                                           java.lang.String propertyName,
                                           java.lang.String errorMessage)
Adds an error messages specific to a property to the List attribute on the request object. The list attribute is named Constants.ERROR_PROPERTY_NAMES "errorFieldNames".
If the list attribute does not exist, it is created. The List of error fields can then be accessed during page processing, and JSP tags. The format of the field name placed on the list is dot delimited, for example "Order.PlacedDate"

Parameters:
request - the request object to add the field name to
dsn - the data source name
propertyName - the field name
errorMessage - the errorMessage
See Also:
DataFieldCaptionTag

addFormatter

public void addFormatter(java.lang.String dsn,
                         java.lang.String propertyName,
                         java.text.Format formatter)
Adds a Formatter to the Model for the specified DSN and field name. The formatter is subsequently used for parsing submitted values.

Parameters:
dsn - the name of the ds the formatter applies to
propertyName - the field name the formatter applies to
formatter - the formatter

addRepeatingRegionSize

public void addRepeatingRegionSize(java.lang.String pageName,
                                   java.lang.String dsn,
                                   java.lang.Integer regionSize)
Adds a RepeatingRegion size for the named page, and data source name.

Parameters:
pageName - the page name where the repeating region occurs
dsn - the dsn for the repeating region
regionSize - the region size

getRepeatingRegionSize

public int getRepeatingRegionSize(java.lang.String pageName,
                                  java.lang.String dsn)
Gets a RepeatingRegion size.

Parameters:
pageName - the page name where the repeating region occurs
dsn - the dsn for the repeating region
Returns:
the size of the repeating region if found, otherwise, 1

getFormatter

public java.text.Format getFormatter(java.lang.String dsn,
                                     java.lang.String propertyName)
Returns the Formatter used to display ( and parse ) the specified property. If the property has been presented with a JSP tag using format attribute, then that formatter is returned. Otherwise, the formatter is read from the environment object.

Parameters:
dsn - the name of the data source the formatter applies to
propertyName - the field name the formatter applies to
Returns:
the formatter, is it exists, otherwise null

clearQBFSearchValues

public void clearQBFSearchValues(java.lang.String dataSourceName,
                                 boolean executeQuery)
                          throws java.lang.Exception
Clears QBF search values on the named DataSource instance(s).

Throws:
java.lang.Exception
Parameters:
dataSourceName - Name of the DataSource to clear search fields on.
executeQuery - If true, re-execute the datasource's query after the fields are cleared.

getCurrentRequest

public javax.servlet.http.HttpServletRequest getCurrentRequest()
Gets the current request being processed by the controller.

Returns:
the current request object

closeRequestScopeDatasources

public void closeRequestScopeDatasources()
Close all requestScope data sources. Any data source with a time out specified, and has expired will be reset.


listDatasources

public void listDatasources()
A convenience method to list all active data sources to the logger as INFO level messages. Similar functionality can be accomplished using JSTL tags.


delete

public void delete(java.lang.String dataSourceName)
            throws java.lang.Exception
Deletes the current tcEntity from the named DataSource instance.

Throws:
java.lang.Exception
Parameters:
dataSourceName - the name of the DataSource from which to delete current tcEntity.

deleteSelected

public void deleteSelected(java.lang.String dataSourceName)
                    throws java.lang.Exception
Deletes selected rows from the named DataSource instance.

Throws:
java.lang.Exception
Parameters:
dataSourceName - Name of the DataSource from which to delete selected rows.

get

public DataSource get(java.lang.Object dataSourceName)
Specified by:
get in interface java.util.Map<java.lang.String,DataSource>
Overrides:
get in class java.util.concurrent.ConcurrentHashMap<java.lang.String,DataSource>

getDataSource

public DataSource getDataSource(java.lang.String dataSourceName)
                         throws java.lang.Exception
Returns the named DataSource instance, and additionally executes the data source's query if the data source mode is "deferred" and it has not been executed.

Throws:
java.lang.Exception
Parameters:
dataSourceName - Name of the DataSource to be returned.
Returns:
The named DataSource instance, or null if not found in Model.

getDataSourceByEntityName

public DataSource getDataSourceByEntityName(java.lang.String entityName)
Gets the datasource for the named entity. The datasource query is not executed.

Parameters:
entityName -
Returns:
the datasource if located; otherwise null

getDataSource

public DataSource getDataSource(java.lang.String dataSourceName,
                                boolean executeDeferred)
                         throws java.lang.Exception
Returns the named DataSource instance and optionally executes the data source's query if the data source mode is "deferred" and it has not been executed.

Throws:
java.lang.Exception - ModelException
Parameters:
dataSourceName - Name of the DataSource to be returned.
executeDeferred - if true then the deferred query is executed if needed
Returns:
The named DataSource instance, or null if not found in Model.

getDataSourceName

public static java.lang.String getDataSourceName(java.lang.String parameter)
Gets the data source name from a parameter, where DataSource name is assumed to be the first token in the parameter, delimited by the '.' character.

Parameters:
parameter - the parameter from which to extract the data source name.
Returns:
the data source name, else null if parameter is null or zero length.

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

getUserName

public java.lang.String getUserName()
Gets the current user's name.

Returns:
the user's login name

getUserId

public java.lang.Long getUserId()
Gets the current user's ID.

Returns:
the user's login ID

getLoggingUserName

public java.lang.String getLoggingUserName()
Gets the current user's name for logging, it is prefixed with "[user]=".

Returns:
the user's login name prefixed with "[user]="

insert

public void insert(java.lang.String dataSourceName)
            throws java.lang.Exception
Inserts a tcEntity into the the named DataSource instance.

Throws:
java.lang.Exception - if the insert fails
Parameters:
dataSourceName - Name of the DataSource into which to insert.

removeDataSource

public void removeDataSource(java.lang.String dataSourceName)
Closes and removes the named DataSource. The data source name can include wildcard characters to form a pattern. The patterns roughly follows DOS wildcard patterns, where a ? matches any character, and a * matches to the end of the string. The match is not case sensitive.
Examples:

Parameters:
dataSourceName - Name of the instance to be removed.

removeDataSources

public void removeDataSources(java.util.List<java.lang.String> closeNamesList,
                              java.util.List<java.lang.String> exceptNamesList,
                              boolean resultSetOnly)
Closes and removes the named DataSource. The data source name can include wildcard characters to form a pattern. The patterns roughly follows DOS wildcard patterns, where a ? matches any character, and a * matches to the end of the string. The match is not case sensitive.
Examples:

Parameters:
closeNamesList - Name of the instance to be removed.
exceptNamesList - Name of the instance to NOT be removed.

save

public void save(java.lang.String dataSourceName)
          throws java.lang.Exception
Saves pending changes in the named DataSource instance.

Throws:
java.lang.Exception
Parameters:
dataSourceName - Name of the DataSource to be saved.

saveAll

public void saveAll()
             throws java.lang.Exception
Saves pending changes in all DataSource instances. This method starts a Hibernate Session and Transaction.

Throws:
java.lang.Exception

sortDataSource

public void sortDataSource(java.lang.String dataSourceName,
                           java.lang.String propertyName)
                    throws java.lang.Exception
Re-executes the data source's query to display it in a sorted order.

Throws:
java.lang.Exception - if the sort action (query) is raising an exception
Parameters:
dataSourceName - the name of the DataSource to sort
propertyName - the field name to sort on

executeQuery

public void executeQuery(java.lang.String dataSourceName)
                  throws java.lang.Exception
Re-executes the data source's query.

Throws:
java.lang.Exception - if the query throws an exception
Parameters:
dataSourceName - the name of the DataSource to query

setDataSourcePosition

public void setDataSourcePosition(java.lang.String dataSourceName,
                                  java.lang.String position,
                                  int size)
                           throws java.lang.Exception
Sets the current tcEntity in the named DataSource's resultset to the named position argument.

Throws:
java.lang.Exception - if the action failed
Parameters:
dataSourceName - the name of the DataSource to scroll
position - the position to change to
size - the number of rows to scroll ( applies to goNext, or goPrevious )

updateSelectedRowIds

public boolean updateSelectedRowIds(javax.servlet.http.HttpServletRequest request)
                             throws java.lang.Exception
Updates selected tcEntity IDs for each data source referenced in request.

Throws:
java.lang.Exception - ModelException
Parameters:
request - the current HttpServletRequest instance
Returns:
true if successful, else false.

undoAll

public void undoAll()
             throws java.lang.Exception
Undoes any pending changes in all DataSource instances.

Throws:
java.lang.Exception - ModelException

undo

public void undo(java.lang.String dataSourceName)
          throws java.lang.Exception
Undoing pending changes in the named DataSource instance.

Throws:
java.lang.Exception - ModelException
Parameters:
dataSourceName - the data source name to apply the undo action to

toDate

public java.util.Date toDate(java.lang.String dateStr,
                             java.lang.String dsn,
                             java.lang.String propertyName)
Parses a date string using the Display formatter for the specified field.

Parameters:
dateStr - the date string
dsn - the data source name to parse for
propertyName - the field name to parse for
Returns:
the Date value, null if the date string cannot be parsed by the formatter

toDateTime

public java.util.Date toDateTime(java.lang.String dateStr,
                                 java.lang.String dsn,
                                 java.lang.String propertyName)
Parses a date string using the Display formatter for the specified propertyName.

Parameters:
dateStr - the date string
dsn - the data source name to parse for
propertyName - the field name to parse for
Returns:
the Date value, null if the date string cannot be parsed by the formatters

toNumber

public java.lang.Number toNumber(java.lang.String numberStr,
                                 java.lang.String dsn,
                                 java.lang.String propertyName)
Parses a number string using the Display formatter for the specified field.

Parameters:
numberStr - the number string
dsn - the data source name to parse for
propertyName - the field name to parse for
Returns:
the Number value, null if the number string cannot be parsed by the formatters

setDatasourceValues

public boolean setDatasourceValues(javax.servlet.http.HttpServletRequest request)
                            throws java.lang.Exception
Updates data values for each data source referenced in request. Values are not committed to the DB unless this is part of a save action request.

All PropertyValueExceptions are caught, and delayed until all fields have been updated. Then all PropertyValueException messages are thrown as a single exception.

Throws:
java.lang.Exception
Parameters:
request - The current HttpServletRequest instance.
Returns:
true if successful, else false.

getMultiValueParameter

public static java.lang.String getMultiValueParameter(javax.servlet.http.HttpServletRequest request,
                                                      java.lang.String paramName)

updateQBFData

public boolean updateQBFData(javax.servlet.http.HttpServletRequest request)
                      throws java.lang.Exception
Updates QBF where clause(s) on DataSource instance(s).

Throws:
java.lang.Exception - ModelException
Parameters:
request - HttpServletRequest instance.
Returns:
true if successful, else false.

updateUserSettings

public void updateUserSettings(javax.servlet.http.HttpServletRequest request)
Sets any user settings; where a parameter name prefix of tcUserSetting. n denotes a user setting.

Parameters:
request - the HttpServletRequest

valueBound

public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
Notification that this Model is being bound to the HttpSession.

Specified by:
valueBound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
event - HttpSessionBindingEvent instance.

valueUnbound

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
Notification that this Model is being unbound from the HttpSession.

Specified by:
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
event - HttpSessionBindingEvent instance.

getFieldValue

public java.lang.Object getFieldValue(java.lang.String dsn,
                                      java.lang.String propertyName)
                               throws java.lang.IllegalArgumentException,
                                      ModelException
Gets the value of the named field from the current tcEntity in the data source.

This method is called to resolve expression evaluator terms.

Throws:
java.lang.IllegalArgumentException
ModelException
Parameters:
dsn - the data source name
propertyName - the propertyName
Returns:
the value of the field, if found, otherwise null

getEnvironment

public static Environment getEnvironment()
Gets this applications environment object.

Returns:
the environment environment

getAuditInterceptor

public AuditInterceptor getAuditInterceptor()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

reloadCurrentEntity

public void reloadCurrentEntity(java.lang.String dataSourceName)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getUserCount

public static int getUserCount()
Returns:
Returns the Session Count ~= User Count.

isUserInRole

public boolean isUserInRole(java.util.List<java.lang.String> roleNames)

isUserInRole

public boolean isUserInRole(java.lang.String roleName)

getMetaData

public com.taggercat.metadata.MetaDataReader getMetaData()

disconnect

public void disconnect()
A clean up method that is called when the user's session is closed. This in an extension point method, the default implementation has no functionality.


hasDataSourcePermission

public boolean hasDataSourcePermission(java.lang.String dsn,
                                       int permissionType)
                                throws java.lang.Exception
Returns true if the user has the specified permission on this ds.

Throws:
java.lang.Exception
Parameters:
dsn -
permissionType -
Returns:
true if the user has the specified permission on this ds

getEntityPermissions

public java.lang.Integer getEntityPermissions(java.lang.String entityName,
                                              java.lang.String groupIds)
                                       throws java.lang.Exception
Returns a bit mask of the permissions that the user has for the named entity

Throws:
java.lang.Exception
Parameters:
entityName - the entity name
groupIds - the comma separated list of group names this user is a member of
Returns:
a bit mask of the permissions the user has for the named entity

getPropertyPermissions

public java.lang.Integer getPropertyPermissions(java.lang.String dsn,
                                                java.lang.String propertyName,
                                                java.lang.String groupIds)
                                         throws java.lang.Exception
Returns a bitmask of the users permissions for the specified fieldName on the ds

Throws:
java.lang.Exception
Parameters:
dsn - the data source name, NOT the entity name
propertyName - the propertyName
groupIds - to user's group IDs,
Returns:
a bitmask of the users permissions for the specified fieldName on the ds

hasPropertyPermission

public boolean hasPropertyPermission(java.lang.String dsn,
                                     java.lang.String propertyName,
                                     int permissionType)
                              throws java.lang.Exception
Returns true if the user has the specified permission for the dsn and field name

Throws:
java.lang.Exception
Parameters:
dsn - the data source name, NOT the entity name
propertyName - the propertyName
permissionType - the permission type to check
Returns:
true if the user has the specified permission for the dsn and field name

hasPagePermission

public boolean hasPagePermission(java.lang.String responsePage)
                          throws java.lang.Exception
Return true if the user has the entity permission for the corresponding default search or edit page name. If the page is not listed in the metadata, then this method always returns true.

Throws:
java.lang.Exception
Parameters:
responsePage -
Returns:
true if the user has the entity permission for the corresponding default search or edit page name

getMetaProperty

public com.taggercat.metadata.MetaProperty getMetaProperty(java.lang.String dsn,
                                                           java.lang.String propertyName)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

setLocale

public void setLocale(java.util.Locale locale)

getLoginInfo

public LoginInfo getLoginInfo()

setLoginInfo

public void setLoginInfo(LoginInfo loginInfo)

getLocale

public java.util.Locale getLocale()
Returns this user's locale

Returns:
this user's locale

getCurrentHibernateSession

public static org.hibernate.Session getCurrentHibernateSession()
Returns the current Hibernate session, not the HTTPSession. If there is no current Hibernate session open in the model, and there is a Hibernate session object on the current request, then that one returned.

Returns:
the current Hibernate session if open, otherwise null

getPermissionReader

public PermissionReader getPermissionReader()
Returns:
the permissionReader

getAdminRoles

public static java.util.List<java.lang.String> getAdminRoles()

setAdminRoles

public static void setAdminRoles(java.util.List<java.lang.String> adminRoles)