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
FieldsModifier and TypeFieldDescriptionstatic final String
Required configuration property defining the schemes, this handler is handling. -
Method Summary
Modifier and TypeMethodDescriptionhandleRemoval
(String resourceType, String id, String url) Handle the remove of a resourcehandleUpdate
(String resourceType, String id, String url, InputStream is, Map<String, Object> attributes) Handle the update of a resourcehandleUpdate
(String resourceType, String id, String url, Dictionary<String, Object> dict, Map<String, Object> attributes) Handle the update of a resource
-
Field Details
-
PROPERTY_SCHEMES
Required configuration property defining the schemes, this handler is handling. String or string array- See Also:
-
-
Method Details
-
handleRemoval
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
-