Class ResourceType
- java.lang.Object
-
- fr.paris.lutece.portal.service.rbac.ResourceType
-
- All Implemented Interfaces:
Localizable
public class ResourceType extends java.lang.Object implements Localizable
This class provides the methods for resource types. It gives the key and label of the resource type It allows to define and access to the permissions available. It links with the resourceIdService class that retrieves specific data to be managed.
-
-
Constructor Summary
Constructors Constructor Description ResourceType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissiongetPermission(java.lang.String strPermissionId)Get a particular permissionjava.util.Collection<Permission>getPermissionList()Returns all registered permissionsjava.lang.StringgetPluginName()Returns the plugin nameResourceIdServicegetResourceIdService()Returns an instance of the resourceIdService classjava.lang.StringgetResourceIdServiceClass()Returns the name of the resourceIdService classjava.lang.StringgetResourceTypeKey()Returns the resource type Keyjava.lang.StringgetResourceTypeLabel()Returns the resource type labelvoidregisterPermission(Permission permission)Registers a permissionvoidsetLocale(java.util.Locale locale)Implements LocalizablevoidsetPluginName(java.lang.String strPluginName)Sets the plugin namevoidsetResourceIdServiceClass(java.lang.String strResourceIdServiceClass)Sets the name of the resourceIdService classvoidsetResourceTypeKey(java.lang.String strResourceTypeCode)Sets the resource type KeyvoidsetResourceTypeLabelKey(java.lang.String strResourceTypeLabel)Sets the resource type label
-
-
-
Method Detail
-
setLocale
public void setLocale(java.util.Locale locale)
Implements Localizable- Specified by:
setLocalein interfaceLocalizable- Parameters:
locale- The current locale
-
registerPermission
public void registerPermission(Permission permission)
Registers a permission- Parameters:
permission- the permission object to register
-
getPermissionList
public java.util.Collection<Permission> getPermissionList()
Returns all registered permissions- Returns:
- A collection containing all registered permissions
-
getPermission
public Permission getPermission(java.lang.String strPermissionId)
Get a particular permission- Parameters:
strPermissionId- Identifier of the seeked permission- Returns:
- the selected resource type
-
getResourceTypeKey
public java.lang.String getResourceTypeKey()
Returns the resource type Key- Returns:
- Returns the _strResourceTypeKey.
-
setResourceTypeKey
public void setResourceTypeKey(java.lang.String strResourceTypeCode)
Sets the resource type Key- Parameters:
strResourceTypeCode- The _strResourceTypeKey to set.
-
getResourceTypeLabel
public java.lang.String getResourceTypeLabel()
Returns the resource type label- Returns:
- Returns the _strResourceTypeLabel.
-
setResourceTypeLabelKey
public void setResourceTypeLabelKey(java.lang.String strResourceTypeLabel)
Sets the resource type label- Parameters:
strResourceTypeLabel- The _strResourceTypeLabel to set.
-
getResourceIdServiceClass
public java.lang.String getResourceIdServiceClass()
Returns the name of the resourceIdService class- Returns:
- Returns the _strResourceIdServiceClass.
-
setResourceIdServiceClass
public void setResourceIdServiceClass(java.lang.String strResourceIdServiceClass)
Sets the name of the resourceIdService class- Parameters:
strResourceIdServiceClass- The _strResourceIdServiceClass to set.
-
getResourceIdService
public ResourceIdService getResourceIdService()
Returns an instance of the resourceIdService class- Returns:
- a ResourceIdService object with the plugin name initialised
-
setPluginName
public void setPluginName(java.lang.String strPluginName)
Sets the plugin name- Parameters:
strPluginName- The __strPluginName to set.
-
getPluginName
public java.lang.String getPluginName()
Returns the plugin name- Returns:
- Returns the __strPluginName.
-
-