com.webmethods.caf.faces.priviledge
Class FunctionalPrivilegeProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.BaseFacesBean
      extended by com.webmethods.caf.faces.bean.BaseFacesSessionBean
          extended by com.webmethods.caf.faces.priviledge.FunctionalPrivilegeProvider
All Implemented Interfaces:
IPageFlowScopeAdapter

public class FunctionalPrivilegeProvider
extends BaseFacesSessionBean

Determine if a given user has been granted a specific functional privilege. If no user is provider, the current user will be used.


Field Summary
protected  String m_privAlias
           
protected  String m_userID
           
static int READ_RIGHT
          bitfield rights indicating READ (from IAccessRight)
 
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
fExpireWithPageFlow
 
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
 
Constructor Summary
FunctionalPrivilegeProvider()
           
 
Method Summary
 String getCurrentUserID()
           
 String getPrivAlias()
           
 String getUserID()
           
 PrincipalModel getUserModel()
           
 boolean isGranted()
          Check whether the user has been granted with a functional privilege.
protected  void release()
          Override this method to release any resources associated with this session.
 void setPrivAlias(String alias)
          Set privilege alias
 void setUserID(String userid)
          Set user ID.
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_privAlias

protected String m_privAlias

m_userID

protected String m_userID

READ_RIGHT

public static final int READ_RIGHT
bitfield rights indicating READ (from IAccessRight)

See Also:
com.webmethods.portal.service.meta2.access.IAccessRight, Constant Field Values
Constructor Detail

FunctionalPrivilegeProvider

public FunctionalPrivilegeProvider()
Method Detail

release

protected void release()
Description copied from class: BaseFacesSessionBean
Override this method to release any resources associated with this session. Please note, the FacesContext is not valid for this function

Specified by:
release in class BaseFacesSessionBean

getPrivAlias

public String getPrivAlias()
Returns:
privilege alias

setPrivAlias

public void setPrivAlias(String alias)
Set privilege alias

Parameters:
alias -

getUserID

public String getUserID()
Returns:
use ID. return the current user ID if there was no user assigned.

setUserID

public void setUserID(String userid)
Set user ID.

Parameters:
userid -

isGranted

public boolean isGranted()
Check whether the user has been granted with a functional privilege.

Returns:

getCurrentUserID

public String getCurrentUserID()
Returns:
current user ID

getUserModel

public PrincipalModel getUserModel()
Returns:
user model
See Also:
PrincipalModel