Package org.apache.sling.installer.api
Interface UpdateHandler
-
@ConsumerType public interface UpdateHandlerAn update handler is a service handling updates of resources through other ways than the installer, e.g. handling a configuration change through the web console or directly through the configuration admin API.- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_SCHEMESRequired configuration property defining the schemes, this handler is handling.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UpdateResulthandleRemoval(String resourceType, String id, String url)Handle the remove of a resourceUpdateResulthandleUpdate(String resourceType, String id, String url, InputStream is, Map<String,Object> attributes)Handle the update of a resourceUpdateResulthandleUpdate(String resourceType, String id, String url, Dictionary<String,Object> dict, Map<String,Object> attributes)Handle the update of a resource
-
-
-
Field Detail
-
PROPERTY_SCHEMES
static final String PROPERTY_SCHEMES
Required configuration property defining the schemes, this handler is handling. String or string array- See Also:
- Constant Field Values
-
-
Method Detail
-
handleRemoval
UpdateResult handleRemoval(String resourceType, String id, String url)
Handle the remove of a resource- Parameters:
resourceType- The resource typeid- The resource id, e.g. symbolic name etc.url- The url where an earlier version of this resource came from- Returns:
- If the handler could handle/perist the resource an update result is returned
otherwise the handler should return
null
-
handleUpdate
UpdateResult handleUpdate(String resourceType, String id, String url, Dictionary<String,Object> dict, Map<String,Object> attributes)
Handle the update of a resource- Parameters:
resourceType- The resource typeid- The resource id, e.g. symbolic name etc.url- The url where an earlier version of this resource came from (optional)dict- Dictionaryattributes- Optional additional attributes.- Returns:
- If the handler could handle/perist the resource an update result is returned
otherwise the handler should return
null
-
handleUpdate
UpdateResult handleUpdate(String resourceType, String id, String url, InputStream is, Map<String,Object> attributes)
Handle the update of a resource- Parameters:
resourceType- The resource typeid- The resource id, e.g. symbolic name etc.url- The url where an earlier version of this resource came from (optional)is- Input stream to the contents of the resourceattributes- Optional additional attributes.- Returns:
- If the handler could handle/perist the resource an update result is returned
otherwise the handler should return
null
-
-