jp.terasoluna.fw.web
Class UserValueObject

java.lang.Object
  extended by jp.terasoluna.fw.web.UserValueObject
All Implemented Interfaces:
java.io.Serializable

public abstract class UserValueObject
extends java.lang.Object
implements java.io.Serializable

Abstract class for logon user information

This is the base class representing the object that holds user information of the logged in user. To generate the inherited class, set the name of inherited class in the ApplicationResources by using user.value.object as a key and execute createUserValueObject() method.

Configuration example of ApplicationResources.properties
Implementation example of SampleUVO
 public class SampleUVO extends UserValueObject {
   // Implement as and when required
   public String[] getFieldNames() {
       return new String[]{"companyId", "userId", "address", ...};
   }

   // Company ID
   String companyId = null;
   // User ID
   String userId = null;
   // Address
   String address = null;
   ...
   // getter and setter of fields
   ...
 }
 
Implementation example of logon business logic
 public ResultBean execute(LogonBean params) {
    ...
    // Generate UVO
    SampleUVO uvo = (SampleUVO) UserValueObject.createUserValueObject();
    ...
    // Set user information in UVO
    uvo.setCompanyId(companyId);
    uvo.setUserId(userId);
    uvo.setAddress(address);
    ...
 }
 

See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log log
          Log class
static java.lang.String USER_VALUE_OBJECT_KEY
          Key which is used to fetch the class inherited from UserValueObject from the HTTP session.
static java.lang.String USER_VALUE_OBJECT_PROP_KEY
          Key that specifies the class inerited from UserValueObject in ApplicationResources file.
private static java.lang.String UVO_CLASS_ERROR
          Error code indicating the failure in creating the instance of the class inherited from UserValueObject.
 
Constructor Summary
UserValueObject()
           
 
Method Summary
static UserValueObject createUserValueObject()
          Generates user information object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log class


USER_VALUE_OBJECT_PROP_KEY

public static final java.lang.String USER_VALUE_OBJECT_PROP_KEY
Key that specifies the class inherited from UserValueObject in ApplicationResources file.

See Also:
Constant Field Values

UVO_CLASS_ERROR

private static final java.lang.String UVO_CLASS_ERROR
Error code indicating the failure in creating the instance of class inherited from UserValueObject.

See Also:
Constant Field Values

USER_VALUE_OBJECT_KEY

public static final java.lang.String USER_VALUE_OBJECT_KEY
Key which is used to fetch the class inherited from UserValueObject from the HTTP session.

See Also:
Constant Field Values
Constructor Detail

UserValueObject

public UserValueObject()
Method Detail

createUserValueObject

public static UserValueObject createUserValueObject()
Generates user information object.

Returns:
User information object