Interface ConfigurationAdmin


public interface ConfigurationAdmin
This service provides extra operations that can be used with respect to ConfigurationAdmin

This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.

  • Field Details

  • Method Details

    • getConfiguration

      org.osgi.service.cm.Configuration getConfiguration(String pid)
      Returns the Configuration associated with the given PID
      Parameters:
      pid - - service pid for the configuration
      Returns:
      Configuration
    • getObjectClassDefinition

      org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(org.osgi.service.cm.Configuration config)
      Returns the ObjectClassDefinition associated with the given Configuration. The ObjectClassDefinition is the actual configuration part of the metatype that holds all of the configurable pieces.
      Parameters:
      config - - The configuration associated with the metatype
      Returns:
      ObjectClassDefinition
    • getObjectClassDefinition

      org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(org.osgi.framework.Bundle bundle, String pid)
      Returns the ObjectClassDefinition associated with the given Configuration. The ObjectClassDefinition is the actual configuration part of the metatype that holds all of the configurable pieces.
      Parameters:
      bundle - - The bundle for which metatype information is requested.
      pid - - Service pid for the metatype
      Returns:
      ObjectClassDefinition
    • getObjectClassDefinition

      org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(String pid)
      Returns the ObjectClassDefinition associated with the given Configuration. The ObjectClassDefinition is the actual configuration part of the metatype that holds all of the configurable pieces.
      Parameters:
      pid - - Service pid for the metatype
      Returns:
      ObjectClassDefinition
    • listServices

      List<Service> listServices(String serviceFactoryFilter, String serviceFilter)
      Returns all services and managed service factories that satisfy the provided LDAP filters
      Parameters:
      serviceFactoryFilter - - LDAP filter for managed service factories
      serviceFilter - - LDAP filter for managed services
      Returns:
      List
    • isPermittedToViewService

      boolean isPermittedToViewService(String servicePid, org.apache.shiro.subject.Subject subject)
      Returns true if the subject is permitted to view the service corresponding to the provided service.pid.
      Parameters:
      servicePid - - PID of the service in question
      subject - - Subject to imply
      Returns:
      True if the subject is allowed to view the service
    • findMetatypeForConfig

      Metatype findMetatypeForConfig(org.osgi.service.cm.Configuration config)
      Returns the complete Metatype with all available information for the provided Configuration
      Parameters:
      config - - Configuration to retrieve Metatype for
      Returns:
      Metatype
    • getDefaultFactoryLdapFilter

      String getDefaultFactoryLdapFilter()
      Returns a default filter that can be used by a client when calling listServices(...) This filter would pertain to managed service factories
      Returns:
      a default filter that can be used by a client when calling listServices(...)
    • getDefaultLdapFilter

      String getDefaultLdapFilter()
      Returns a default filter that can be used by a client when calling listServices(...) This filter would pertain to managed services
      Returns:
      a default filter that can be used by a client when calling listServices(...)
    • enableManagedServiceFactoryConfiguration

      ConfigurationStatus enableManagedServiceFactoryConfiguration(String servicePid, org.osgi.service.cm.Configuration disabledConfig) throws IOException
      Enables a currently disabled configuration.
      Parameters:
      servicePid - - PID corresponding to the configuration
      disabledConfig - - The configuration that is disabled
      Returns:
      object representing the change in state from enabled to disabled
      Throws:
      IOException
    • disableManagedServiceFactoryConfiguration

      ConfigurationStatus disableManagedServiceFactoryConfiguration(String servicePid, org.osgi.service.cm.Configuration enabledConfig) throws IOException
      Disables a currently enabled configuration.
      Parameters:
      servicePid - - PID corresponding to the configuration
      enabledConfig - - The configuration that is enabled
      Returns:
      object representing the change in state from disabled to enabled
      Throws:
      IOException
    • getName

      String getName(org.osgi.framework.Bundle bundle)
      Returns the name of a bundle.
      Parameters:
      bundle - - Bundle to get the name of
      Returns:
      name of the bundle