Class JSONConfigInstaller

java.lang.Object
org.forgerock.openidm.config.installer.JSONConfigInstaller
All Implemented Interfaces:
org.apache.felix.fileinstall.ArtifactInstaller, org.apache.felix.fileinstall.ArtifactListener, org.osgi.service.cm.ConfigurationListener

public class JSONConfigInstaller extends Object implements org.apache.felix.fileinstall.ArtifactInstaller, org.osgi.service.cm.ConfigurationListener
ArtifactInstaller for JSON configurations. Based on ConfigInstaller. TODO: This service lifecycle should be bound to the ConfigurationAdmin service lifecycle.
  • Field Details

  • Constructor Details

    • JSONConfigInstaller

      public JSONConfigInstaller()
  • Method Details

    • start

      public void start(org.osgi.framework.BundleContext ctx)
    • stop

      public void stop(org.osgi.framework.BundleContext ctx)
    • canHandle

      public boolean canHandle(File artifact)
      Specified by:
      canHandle in interface org.apache.felix.fileinstall.ArtifactListener
    • install

      public void install(File artifact) throws Exception
      Specified by:
      install in interface org.apache.felix.fileinstall.ArtifactInstaller
      Throws:
      Exception
    • update

      public void update(File artifact) throws Exception
      Specified by:
      update in interface org.apache.felix.fileinstall.ArtifactInstaller
      Throws:
      Exception
    • uninstall

      public void uninstall(File artifact) throws Exception
      Specified by:
      uninstall in interface org.apache.felix.fileinstall.ArtifactInstaller
      Throws:
      Exception
    • configurationEvent

      public void configurationEvent(org.osgi.service.cm.ConfigurationEvent configurationEvent)
      Specified by:
      configurationEvent in interface org.osgi.service.cm.ConfigurationListener
    • lookupConfigAdmin

      public static org.osgi.service.cm.ConfigurationAdmin lookupConfigAdmin(org.osgi.framework.BundleContext context)
    • getConfigurationAdmin

      public org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
    • loadConfigFile

      public static Hashtable<String,Object> loadConfigFile(File f) throws IOException
      Load the specified configuration file as hashtable. May also be called by other clients that want direct access to a given configuration file without going through the configuration admin service.
      Parameters:
      f -
      Returns:
      Throws:
      IOException