Class RBAC
- java.lang.Object
-
- fr.paris.lutece.portal.business.rbac.RBAC
-
- All Implemented Interfaces:
Localizable
public class RBAC extends java.lang.Object implements Localizable
This class is used for rbac control configuration. A role is associated to controls (given by the permission key) on resources (identified by a resource type and a resource id). Wilcards can be used for resource ids and permission keys.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringWILDCARD_PERMISSIONS_KEYstatic java.lang.StringWILDCARD_RESOURCES_ID
-
Constructor Summary
Constructors Constructor Description RBAC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPermissionKey()Returns the Permission Keyjava.lang.StringgetPermissionLabel()Retrieve the label of the permission from the permission keyintgetRBACId()Returns the RBAC IDjava.lang.StringgetResourceId()Returns the Resource Idjava.lang.StringgetResourceIdLabel()Retrieve the label of the resource from the resource idjava.lang.StringgetResourceTypeKey()Returns the Resource Type Keyjava.lang.StringgetResourceTypeLabel()Retrieve the label of the resource type from the resource type keyjava.lang.StringgetRoleKey()Returns the Role Key.voidsetLocale(java.util.Locale locale)Implements LocalizablevoidsetPermissionKey(java.lang.String strPermissionKey)Sets the Permission KeyvoidsetRBACId(int nRBACId)Sets the RBAC IDvoidsetResourceId(java.lang.String strResourceId)Sets the Resource IdvoidsetResourceTypeKey(java.lang.String strResourceTypeKey)Sets the Resource Type KeyvoidsetRoleKey(java.lang.String strRoleKey)Sets the Role Key
-
-
-
Field Detail
-
WILDCARD_RESOURCES_ID
public static final java.lang.String WILDCARD_RESOURCES_ID
- See Also:
- Constant Field Values
-
WILDCARD_PERMISSIONS_KEY
public static final java.lang.String WILDCARD_PERMISSIONS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setLocale
public void setLocale(java.util.Locale locale)
Implements Localizable- Specified by:
setLocalein interfaceLocalizable- Parameters:
locale- The current locale
-
getRBACId
public int getRBACId()
Returns the RBAC ID- Returns:
- The RBAC ID
-
setRBACId
public void setRBACId(int nRBACId)
Sets the RBAC ID- Parameters:
nRBACId- The RBAC Id to set
-
getPermissionKey
public java.lang.String getPermissionKey()
Returns the Permission Key- Returns:
- The Permission Key
-
setPermissionKey
public void setPermissionKey(java.lang.String strPermissionKey)
Sets the Permission Key- Parameters:
strPermissionKey- The Permission Key to set
-
getResourceId
public java.lang.String getResourceId()
Returns the Resource Id- Returns:
- The Resource Id
-
setResourceId
public void setResourceId(java.lang.String strResourceId)
Sets the Resource Id- Parameters:
strResourceId- The Resource Id to set
-
getResourceTypeKey
public java.lang.String getResourceTypeKey()
Returns the Resource Type Key- Returns:
- The Resource Type Key.
-
setResourceTypeKey
public void setResourceTypeKey(java.lang.String strResourceTypeKey)
Sets the Resource Type Key- Parameters:
strResourceTypeKey- The Resource Type Key to set.
-
getRoleKey
public java.lang.String getRoleKey()
Returns the Role Key.- Returns:
- The Role Key.
-
setRoleKey
public void setRoleKey(java.lang.String strRoleKey)
Sets the Role Key- Parameters:
strRoleKey- The Role Key to set.
-
getResourceTypeLabel
public java.lang.String getResourceTypeLabel()
Retrieve the label of the resource type from the resource type key- Returns:
- the label of the resource type
-
getResourceIdLabel
public java.lang.String getResourceIdLabel()
Retrieve the label of the resource from the resource id- Returns:
- the label of the resource
-
getPermissionLabel
public java.lang.String getPermissionLabel()
Retrieve the label of the permission from the permission key- Returns:
- the label of the permission
-
-