Class ResourceService
java.lang.Object
fr.paris.lutece.plugins.resource.service.ResourceService
Resource service
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceServiceGet the instance of the servicegetListResources(String strResourceTypeName) Get the list of resources of a given typegetResource(String strIdResource, String strResourceTypeName) Get a resource from its id and typegetResourceProvider(String strResourceTypeName) Get the resource provider of a resource typeGet the list of available resource typesbooleanisResourceTypeManaged(String strResourceTypeName) Check if a resource type is managed by any providervoidresourceTypeCreated(String strResourceTypeName) Declare a resource type as created.voidresourceTypeRemoved(String strResourceTypeName) Declare a resource type as removed.
-
Method Details
-
getInstance
Get the instance of the service- Returns:
- The instance of the service
-
getResourceTypesList
Get the list of available resource types- Returns:
- The list of available resource types
-
isResourceTypeManaged
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
Declare a resource type as created. This method is used to keep cache up to date.- Parameters:
strResourceTypeName- The created resource type
-
resourceTypeRemoved
Declare a resource type as removed. This method is used to keep cache up to date.- Parameters:
strResourceTypeName- The removed resource type
-
getResource
Get a resource from its id and type- Parameters:
strIdResource- the id of the resource to getstrResourceTypeName- the type of the resource to get- Returns:
- The resource, or null if the resource could not be found
-
getListResources
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
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
-