com.free2be.dimensions.decider
Class UserDeviceDecider

java.lang.Object
  extended by com.free2be.dimensions.decider.AbstractDeciderImpl
      extended by com.free2be.dimensions.decider.UserDeviceDecider
All Implemented Interfaces:
Decider

public class UserDeviceDecider
extends AbstractDeciderImpl

This class is an implementation of Decider, that takes care of "user-device" pairs, i.e. its decisions depends on which is the role of the current user and on the device used.


Field Summary
 
Fields inherited from class com.free2be.dimensions.decider.AbstractDeciderImpl
decisionSet
 
Constructor Summary
UserDeviceDecider()
          Creates a new instance of UserDeviceDecider
 
Method Summary
 Decision decide(javax.servlet.http.HttpServletRequest request)
          Takes a decision, using the request as a basis.
 void setUserBeanName(java.lang.String userBeanName)
          Sets the name of the bean to inspect when deciding for the user role.
 void setUserBeanRoleProperty(java.lang.String userBeanRoleProperty)
          Sets the property to inspect when deciding for the user role.
 void setUserBeanScope(java.lang.String userBeanScope)
          Sets the scope in which the bean to get is placed.
 
Methods inherited from class com.free2be.dimensions.decider.AbstractDeciderImpl
addSuitableDecision, getSuitableDecisionSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDeviceDecider

public UserDeviceDecider()
Creates a new instance of UserDeviceDecider

Method Detail

decide

public Decision decide(javax.servlet.http.HttpServletRequest request)
Takes a decision, using the request as a basis.

Parameters:
request - The request to use.
Returns:
The taken decision. It will be always represented by a user-device pair, eventually with user null and/or device null.

setUserBeanName

public void setUserBeanName(java.lang.String userBeanName)
Sets the name of the bean to inspect when deciding for the user role.

Parameters:
userBeanName - The name of the bean to inspect.

setUserBeanScope

public void setUserBeanScope(java.lang.String userBeanScope)
Sets the scope in which the bean to get is placed.

Parameters:
userBeanScope - The scope to use. It can be "application", "session", "request".

setUserBeanRoleProperty

public void setUserBeanRoleProperty(java.lang.String userBeanRoleProperty)
Sets the property to inspect when deciding for the user role.

Parameters:
userBeanRoleProperty - The property to inspect inside the bean.