Package org.apache.sling.installer.api
Interface ResourceChangeListener
@ProviderType
public interface ResourceChangeListener
OSGi Service listening for changes of resources.
These resources are not changed through the installer but through
any other means like a bundle being installed directly through
the framework or a configuration directly changed through the
configuration admin.
- Since:
- 3.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This attribute defines if a change of the resource should be persisted by the installer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
resourceAddedOrUpdated
(String resourceType, String entityId, InputStream is, Dictionary<String, Object> dict, Map<String, Object> attributes) Inform the installer about an added or updated resourcevoid
resourceRemoved
(String resourceType, String entityId) Inform the installer about a removed resource
-
Field Details
-
RESOURCE_PERSIST
This attribute defines if a change of the resource should be persisted by the installer. This property is a boolean value defaulting to true. The property should be used, if a resource should not be updated/deleted if the resource is modified/deleted outside of the installer, e.g. if a configuration is changed or deleted through configuration admin.- Since:
- 3.2.0
- See Also:
-
-
Method Details
-
resourceAddedOrUpdated
void resourceAddedOrUpdated(String resourceType, String entityId, InputStream is, Dictionary<String, Object> dict, Map<String, Object> attributes) Inform the installer about an added or updated resource- Parameters:
resourceType
- The resource typeentityId
- The entity id (symbolic name etc.)is
- Input stream ordict
- Dictionaryattributes
- Map of attributes.
-
resourceRemoved
Inform the installer about a removed resource- Parameters:
resourceType
- The resource typeentityId
- The entity id (symbolic name etc.)
-