kieker.webgui.web.beans.session
Class UserBean

java.lang.Object
  extended by kieker.webgui.web.beans.session.UserBean
All Implemented Interfaces:
Serializable

@Component
@Scope(value="session")
public final class UserBean
extends Object
implements Serializable

This bean contains information about the user of this session (like the properties and configurations). This class is a Spring managed bean with session scope. This means also that it is possible to login the same user multiple times.

As it is a session bean, it must implement the Serializable interface.

Author:
Nils Christian Ehmke
See Also:
Serialized Form

Constructor Summary
UserBean()
          Default constructor.
 
Method Summary
 String getGridColor()
           
 int getGridSize()
           
 String getLookAndFeel()
           
 String getUsername()
          Returns the name of the user of the current session.
 String getUserrole()
          Delivers the role of the current user.
protected  void initialize()
          This method initializes the bean.
 boolean isShowUnitializedComponents()
           
 void setGlobalPropertiesBean(GlobalPropertiesBean globalPropertiesBean)
          The setter for the property globalPropertiesBean.
 void setGridColor(String gridColor)
          The setter for the property gridColor.
 void setGridSize(int gridSize)
          The setter for the property gridSize.
 void setLookAndFeel(String lookAndFeel)
          The setter for the property lookAndFeel.
 void setShowUnitializedComponents(boolean showUnitializedComponents)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserBean

public UserBean()
Default constructor. Do not use this constructor. This bean is Spring managed.

Method Detail

initialize

@PostConstruct
protected void initialize()
This method initializes the bean. In fact it loads the default values before trying to load the values of the user from their cookies. Do not call this method. The method is Spring managed.


getUsername

public String getUsername()
Returns the name of the user of the current session. If something goes wrong during the search, it returns a human readable 'N/A'.

Returns:
The user name of the session user.

getUserrole

public String getUserrole()
Delivers the role of the current user. If something goes wrong during the search, it returns a human readable 'N/A'.

Returns:
The current userrole.

setGlobalPropertiesBean

public void setGlobalPropertiesBean(GlobalPropertiesBean globalPropertiesBean)
The setter for the property globalPropertiesBean. Do not use this method. This property is Spring managed.

Parameters:
globalPropertiesBean - The new value for the property.

getLookAndFeel

public String getLookAndFeel()

setLookAndFeel

public void setLookAndFeel(String lookAndFeel)
The setter for the property lookAndFeel. The method tries to save the value in the cookies of the user.

Parameters:
lookAndFeel - The new value for the property.

getGridColor

public String getGridColor()

isShowUnitializedComponents

public boolean isShowUnitializedComponents()

setShowUnitializedComponents

public void setShowUnitializedComponents(boolean showUnitializedComponents)

setGridColor

public void setGridColor(String gridColor)
The setter for the property gridColor. The method tries to save the value in the cookies of the user.

Parameters:
gridColor - The new value for the property.

getGridSize

public int getGridSize()

setGridSize

public void setGridSize(int gridSize)
The setter for the property gridSize. The method tries to save the value in the cookies of the user.

Parameters:
gridSize - The new value for the property.


Copyright © 2015. All rights reserved.