fr.paris.lutece.portal.service.rbac
Class ResourceType

java.lang.Object
  extended by 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
ResourceType()
           
 
Method Summary
 Permission getPermission(java.lang.String strPermissionId)
          Get a particular permission
 java.util.Collection<Permission> getPermissionList()
          Returns all registered permissions
 java.lang.String getPluginName()
          Returns the plugin name
 ResourceIdService getResourceIdService()
          Returns an instance of the resourceIdService class
 java.lang.String getResourceIdServiceClass()
          Returns the name of the resourceIdService class
 java.lang.String getResourceTypeKey()
          Returns the resource type Key
 java.lang.String getResourceTypeLabel()
          Returns the resource type label
 void registerPermission(Permission permission)
          Registers a permission
 void setLocale(java.util.Locale locale)
          Implements Localizable
 void setPluginName(java.lang.String strPluginName)
          Sets the plugin name
 void setResourceIdServiceClass(java.lang.String strResourceIdServiceClass)
          Sets the name of the resourceIdService class
 void setResourceTypeKey(java.lang.String strResourceTypeCode)
          Sets the resource type Key
 void setResourceTypeLabelKey(java.lang.String strResourceTypeLabel)
          Sets the resource type label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceType

public ResourceType()
Method Detail

setLocale

public void setLocale(java.util.Locale locale)
Implements Localizable

Specified by:
setLocale in interface Localizable
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.


Copyright © 2011 Mairie de Paris. All Rights Reserved.