Interface ConfigMBean

  • All Known Implementing Classes:
    ConfigMBeanImpl

    public interface ConfigMBean
    MBean to manipulate the Config layer.
    • Method Detail

      • getConfigs

        List<String> getConfigs()
                         throws MBeanException
        Get the list of all configuration PIDs.
        Returns:
        the list of all configuration PIDs.
        Throws:
        MBeanException - in case of MBean failure.
      • create

        void create​(String pid)
             throws MBeanException
        Create a new configuration for the given PID.
        Parameters:
        pid - the configuration PID.
        Throws:
        MBeanException - in case of MBean failure.
      • install

        void install​(String url,
                     String finalname,
                     boolean override)
              throws MBeanException
        Install a cfg file.
        Parameters:
        url - The location of the cfg file.
        finalname - The final name of the cfg file in the etc folder.
        override - True to override the cfg file if it already exists, false else.
        Throws:
        MBeanException - in case of MBean failure.
      • delete

        void delete​(String pid)
             throws MBeanException
        Delete a configuration identified by the given PID.
        Parameters:
        pid - the configuration PID to delete.
        Throws:
        MBeanException - in case of MBean failure.
      • exists

        boolean exists​(String pid)
                throws MBeanException
        Check if a configuration identified by the given PID exists.
        Parameters:
        pid - The configuration PID to check.
        Returns:
        true if the configuration exists, false else.
        Throws:
        MBeanException - in case of MBean failure.
      • listProperties

        Map<String,​String> listProperties​(String pid)
                                         throws MBeanException
        Get the list of properties for a configuration PID.
        Parameters:
        pid - the configuration PID.
        Returns:
        the list of properties.
        Throws:
        MBeanException - in case of MBean failure.
      • deleteProperty

        void deleteProperty​(String pid,
                            String key)
                     throws MBeanException
        Remove the configuration property identified by the given key.
        Parameters:
        pid - the configuration PID.
        key - the property key.
        Throws:
        MBeanException - in case of MBean failure.
      • appendProperty

        void appendProperty​(String pid,
                            String key,
                            String value)
                     throws MBeanException
        Append (or add) a value for the given configuration key.
        Parameters:
        pid - the configuration PID.
        key - the property key.
        value - the value to append to the current property value.
        Throws:
        MBeanException - in case of MBean failure.
      • setProperty

        void setProperty​(String pid,
                         String key,
                         String value)
                  throws MBeanException
        Set a configuration property.
        Parameters:
        pid - the configuration PID.
        key - the property key.
        value - the property value.
        Throws:
        MBeanException - in case of MBean failure.
      • getProperty

        String getProperty​(String pid,
                           String key)
                    throws MBeanException
        Get a configuration property.
        Parameters:
        pid - the configuration PID.
        key - the property key.
        Throws:
        MBeanException - in case of MBean failure.
      • update

        void update​(String pid,
                    Map<String,​String> properties)
             throws MBeanException
        Update a complete configuration.
        Parameters:
        pid - the configuration PID.
        properties - the new properties to set in the configuration.
        Throws:
        MBeanException - in case of MBean failure.
      • append

        void append​(String pid,
                    Map<String,​String> properties)
             throws MBeanException
        Add new properties or update existing ones (without removing others) in a given configuration.
        Parameters:
        pid - the configuration PID.
        properties - the properties to add/update.
        Throws:
        MBeanException - in case of MBean failure.
      • delete

        void delete​(String pid,
                    List<String> properties)
             throws MBeanException
        Delete properties from a configuration.
        Parameters:
        pid - the configuration PID.
        properties - the properties to delete from the configuration.
        Throws:
        MBeanException - in case of MBean failure.
      • createFactoryConfiguration

        String createFactoryConfiguration​(String factoryPid,
                                          Map<String,​String> properties)
                                   throws MBeanException
        Create a factory based configuration.
        Parameters:
        factoryPid - the configuration factory PID.
        properties - the new properties to set in the configuration.
        Returns:
        the created PID.
        Throws:
        MBeanException - in case of MBean failure.