Class ResourceType
- java.lang.Object
-
- fr.paris.lutece.portal.service.rbac.ResourceType
-
- All Implemented Interfaces:
Localizable
public class ResourceType extends 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(String strPermissionId)Get a particular permissionCollection<Permission>getPermissionList()Returns all registered permissionsStringgetPluginName()Returns the plugin nameResourceIdServicegetResourceIdService()Returns an instance of the resourceIdService classStringgetResourceIdServiceClass()Returns the name of the resourceIdService classStringgetResourceTypeKey()Returns the resource type KeyStringgetResourceTypeLabel()Returns the resource type labelvoidregisterPermission(Permission permission)Registers a permissionvoidsetLocale(Locale locale)Implements LocalizablevoidsetPluginName(String strPluginName)Sets the plugin namevoidsetResourceIdServiceClass(String strResourceIdServiceClass)Sets the name of the resourceIdService classvoidsetResourceTypeKey(String strResourceTypeCode)Sets the resource type KeyvoidsetResourceTypeLabelKey(String strResourceTypeLabel)Sets the resource type label
-
-
-
Method Detail
-
setLocale
public void setLocale(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 Collection<Permission> getPermissionList()
Returns all registered permissions- Returns:
- A collection containing all registered permissions
-
getPermission
public Permission getPermission(String strPermissionId)
Get a particular permission- Parameters:
strPermissionId- Identifier of the seeked permission- Returns:
- the selected resource type
-
getResourceTypeKey
public String getResourceTypeKey()
Returns the resource type Key- Returns:
- Returns the _strResourceTypeKey.
-
setResourceTypeKey
public void setResourceTypeKey(String strResourceTypeCode)
Sets the resource type Key- Parameters:
strResourceTypeCode- The _strResourceTypeKey to set.
-
getResourceTypeLabel
public String getResourceTypeLabel()
Returns the resource type label- Returns:
- Returns the _strResourceTypeLabel.
-
setResourceTypeLabelKey
public void setResourceTypeLabelKey(String strResourceTypeLabel)
Sets the resource type label- Parameters:
strResourceTypeLabel- The _strResourceTypeLabel to set.
-
getResourceIdServiceClass
public String getResourceIdServiceClass()
Returns the name of the resourceIdService class- Returns:
- Returns the _strResourceIdServiceClass.
-
setResourceIdServiceClass
public void setResourceIdServiceClass(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(String strPluginName)
Sets the plugin name- Parameters:
strPluginName- The __strPluginName to set.
-
getPluginName
public String getPluginName()
Returns the plugin name- Returns:
- Returns the __strPluginName.
-
-