Package org.xwiki.resource
Class AbstractResourceReferenceHandler<T>
- java.lang.Object
-
- org.xwiki.resource.AbstractResourceReferenceHandler<T>
-
- Type Parameters:
T
- the type of supported items
- All Implemented Interfaces:
Comparable<ResourceReferenceHandler>
,ResourceReferenceHandler<T>
public abstract class AbstractResourceReferenceHandler<T> extends Object implements ResourceReferenceHandler<T>
Helper to implement Resource Handlers, providing some default implementation. We recommend Handler writers to extend this class.- Since:
- 6.1M2
- Version:
- $Id: 7743b8641008f8cb368b99384215452f573b333b $
-
-
Constructor Summary
Constructors Constructor Description AbstractResourceReferenceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ResourceReferenceHandler handler)
int
getPriority()
The priority of execution relative to the other Handlers.void
setPriority(int priority)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.resource.ResourceReferenceHandler
getSupportedResourceReferences, handle
-
-
-
-
Method Detail
-
getPriority
public int getPriority()
Description copied from interface:ResourceReferenceHandler
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.- Specified by:
getPriority
in interfaceResourceReferenceHandler<T>
- Returns:
- the execution priority
-
setPriority
public void setPriority(int priority)
- Parameters:
priority
- the Handler priority to use (lower means execute before others), seegetPriority()
-
compareTo
public int compareTo(ResourceReferenceHandler handler)
- Specified by:
compareTo
in interfaceComparable<T>
-
-