Class 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 Detail

      • ResourceType

        public ResourceType()
    • Method Detail

      • setLocale

        public void setLocale​(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 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.