Package org.xwiki.resource
Interface ResourceReferenceHandler<T>
-
- Type Parameters:
T
- the qualifying element to specify what Resource Reference are handled by thus Handler (e.g. Resource Type, Entity Resource Action)T
- the type of supported items
- All Superinterfaces:
Comparable<ResourceReferenceHandler>
- All Known Implementing Classes:
AbstractResourceReferenceHandler
@Role public interface ResourceReferenceHandler<T> extends Comparable<ResourceReferenceHandler>
Handles a givenResourceReference
.- Since:
- 6.1M2
- Version:
- $Id: 54a2c2d68dcffb3776f1af5a9669e519e3abbb97 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPriority()
The priority of execution relative to the other Handlers.List<T>
getSupportedResourceReferences()
void
handle(ResourceReference reference, ResourceReferenceHandlerChain chain)
Executes the Handler on the passed Resource Reference.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getPriority
int getPriority()
The priority of execution relative to the other Handlers. The lowest values have the highest priorities and execute first. For example a Handler with a priority of 100 will execute before one with a priority of 500.- Returns:
- the execution priority
-
getSupportedResourceReferences
List<T> getSupportedResourceReferences()
- Returns:
- the list of qualifying Resource References elements supported by this Handler (e.g Resource Type, Entity Resource Action)
-
handle
void handle(ResourceReference reference, ResourceReferenceHandlerChain chain) throws ResourceReferenceHandlerException
Executes the Handler on the passed Resource Reference.- Parameters:
reference
- the Resource Reference to handlechain
- the Handler execution chain, needed to tell the next Handler in the chain to execute (similar to the Filter Chain in the Servlet API)- Throws:
ResourceReferenceHandlerException
- if an error happens during the Handler execution
-
-