Interface ConfigurationInstance


@SupportedAll public interface ConfigurationInstance
ConfigurationInstance is the interface that provides the operations on service configuration.
  • Method Details

    • init

      void init(String componentName, Object session) throws ConfigurationException
      Initializer.
      Parameters:
      componentName - Name of the components, e.g. SAML2
      session - FM Session object.
      Throws:
      ConfigurationException - if could not initialize the instance.
    • getConfiguration

      Map getConfiguration(String realm, String configName) throws ConfigurationException
      Returns Configurations.
      Parameters:
      realm - the name of organization at which the configuration resides.
      configName - configuration instance name. e.g. "/sp". The configName could be null or empty string, which means the default configuration for this components.
      Returns:
      Map of key/value pairs, key is the attribute name, value is a Set of attribute values or null if service configuration doesn't exist.
      Throws:
      ConfigurationException - if an error occurred while getting service configuration.
    • setConfiguration

      void setConfiguration(String realm, String configName, Map avPairs) throws ConfigurationException, UnsupportedOperationException
      Sets Configurations.
      Parameters:
      realm - the name of organization at which the configuration resides.
      configName - configuration instance name. e.g. "/sp" The configName could be null or empty string, which means the default configuration for this components.
      avPairs - Map of key/value pairs to be set in the service configuration, key is the attribute name, value is a Set of attribute values.
      Throws:
      ConfigurationException - if could not set service configuration or service configuration doesn't exist.
      UnsupportedOperationException - if this operation is not supported by the implementation.
    • createConfiguration

      void createConfiguration(String realm, String configName, Map avPairs) throws ConfigurationException, UnsupportedOperationException
      Creates Configurations.
      Parameters:
      realm - the name of organization at which the configuration resides.
      configName - service configuration name. e.g. "/sp" The configName could be null or empty string, which means the default configuration for this components.
      avPairs - Map of key/value pairs to be set in the service configuration, key is the attribute name, value is a Set of attribute values.
      Throws:
      ConfigurationException - if could not create service configuration.
      UnsupportedOperationException - if this operation is not supported by the implementation.
    • deleteConfiguration

      void deleteConfiguration(String realm, String configName, Set attributes) throws ConfigurationException, UnsupportedOperationException
      Deletes Configuration.
      Parameters:
      realm - the name of organization at which the configuration resides.
      configName - service configuration name. e.g. "/sp" The configName could be null or empty string, which means the default configuration for this components.
      attributes - A set of attributes to be deleted from the Service configuration. If the value is null or empty, deletes all service configuration.
      Throws:
      ConfigurationException - if could not delete service configuration.
      UnsupportedOperationException - if this operation is not supported by the implementation.
    • getAllConfigurationNames

      Set getAllConfigurationNames(String realm) throws ConfigurationException, UnsupportedOperationException
      Returns all service configuration name for this components.
      Parameters:
      realm - the name of organization at which the configuration resides.
      Returns:
      Set of service configuration names. Return null if there is no service configuration for this component, return empty set if there is only default configuration instance.
      Throws:
      ConfigurationException - if could not get all service configuration names.
      UnsupportedOperationException - if this operation is not supported by the implementation.
    • addListener

      Registers for changes to the component's configuration. The object will be called when configuration for this component is changed.
      Returns:
      the registered id for this listener instance.
      Throws:
      ConfigurationException - if could not register the listener.
      UnsupportedOperationException - if this operation is not supported by the implementation.
    • removeListener

      void removeListener(String listenerID) throws ConfigurationException, UnsupportedOperationException
      Unregisters the listener from the component for the given listener ID. The ID was issued when the listener was registered.
      Parameters:
      listenerID - the returned id when the listener was registered.
      Throws:
      ConfigurationException - if could not register the listener.
      UnsupportedOperationException - if this operation is not supported by the implementation.