Package org.apache.sling.installer.api
Interface UpdateHandler
-
@ConsumerType public interface UpdateHandler
An 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 java.lang.String
PROPERTY_SCHEMES
Required configuration property defining the schemes, this handler is handling.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UpdateResult
handleRemoval(java.lang.String resourceType, java.lang.String id, java.lang.String url)
Handle the remove of a resourceUpdateResult
handleUpdate(java.lang.String resourceType, java.lang.String id, java.lang.String url, java.io.InputStream is, java.util.Map<java.lang.String,java.lang.Object> attributes)
Handle the update of a resourceUpdateResult
handleUpdate(java.lang.String resourceType, java.lang.String id, java.lang.String url, java.util.Dictionary<java.lang.String,java.lang.Object> dict, java.util.Map<java.lang.String,java.lang.Object> attributes)
Handle the update of a resource
-
-
-
Field Detail
-
PROPERTY_SCHEMES
static final java.lang.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(java.lang.String resourceType, java.lang.String id, java.lang.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(java.lang.String resourceType, java.lang.String id, java.lang.String url, java.util.Dictionary<java.lang.String,java.lang.Object> dict, java.util.Map<java.lang.String,java.lang.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(java.lang.String resourceType, java.lang.String id, java.lang.String url, java.io.InputStream is, java.util.Map<java.lang.String,java.lang.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
-
-