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

      Fields 
      Modifier and Type Field Description
      static java.lang.String RESOURCE_PERSIST
      This attribute defines if a change of the resource should be persisted by the installer.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void resourceAddedOrUpdated​(java.lang.String resourceType, java.lang.String entityId, java.io.InputStream is, java.util.Dictionary<java.lang.String,​java.lang.Object> dict, java.util.Map<java.lang.String,​java.lang.Object> attributes)
      Inform the installer about an added or updated resource
      void resourceRemoved​(java.lang.String resourceType, java.lang.String entityId)
      Inform the installer about a removed resource
    • Field Detail

      • RESOURCE_PERSIST

        static final java.lang.String 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:
        Constant Field Values
    • Method Detail

      • resourceAddedOrUpdated

        void resourceAddedOrUpdated​(java.lang.String resourceType,
                                    java.lang.String entityId,
                                    java.io.InputStream is,
                                    java.util.Dictionary<java.lang.String,​java.lang.Object> dict,
                                    java.util.Map<java.lang.String,​java.lang.Object> attributes)
        Inform the installer about an added or updated resource
        Parameters:
        resourceType - The resource type
        entityId - The entity id (symbolic name etc.)
        is - Input stream or
        dict - Dictionary
        attributes - Map of attributes.
      • resourceRemoved

        void resourceRemoved​(java.lang.String resourceType,
                             java.lang.String entityId)
        Inform the installer about a removed resource
        Parameters:
        resourceType - The resource type
        entityId - The entity id (symbolic name etc.)