Class ResourceService

java.lang.Object
fr.paris.lutece.plugins.resource.service.ResourceService

@ApplicationScoped public class ResourceService extends Object
Resource service
  • Constructor Details

    • ResourceService

      public ResourceService()
  • Method Details

    • getResourceTypesList

      public List<IResourceType> getResourceTypesList()
      Get the list of available resource types
      Returns:
      The list of available resource types
    • isResourceTypeManaged

      public boolean isResourceTypeManaged(String strResourceTypeName)
      Check if a resource type is managed by any provider
      Parameters:
      strResourceTypeName - The resource type
      Returns:
      True if the resource type is managed by any provider, false otherwise
    • resourceTypeCreated

      public void resourceTypeCreated(String strResourceTypeName)
      Declare a resource type as created. This method is used to keep cache up to date.
      Parameters:
      strResourceTypeName - The created resource type
    • resourceTypeRemoved

      public void resourceTypeRemoved(String strResourceTypeName)
      Declare a resource type as removed. This method is used to keep cache up to date.
      Parameters:
      strResourceTypeName - The removed resource type
    • getResource

      public IResource getResource(String strIdResource, String strResourceTypeName)
      Get a resource from its id and type
      Parameters:
      strIdResource - the id of the resource to get
      strResourceTypeName - the type of the resource to get
      Returns:
      The resource, or null if the resource could not be found
    • getListResources

      public List<IResource> getListResources(String strResourceTypeName)
      Get the list of resources of a given type
      Parameters:
      strResourceTypeName - the resource type
      Returns:
      the list of resource of the given type, or an empty list if not resource was found
    • getResourceProvider

      public IResourceProvider getResourceProvider(String strResourceTypeName)
      Get the resource provider of a resource type
      Parameters:
      strResourceTypeName - The resource provider of a resource type
      Returns:
      The resource provider, or null if no provider was found for the given resource type