Package tigase.conf

## Interface ConfigRepositoryIfc

- All Superinterfaces:
    `ComponentRepository<ConfigItem>`, `java.lang.Iterable<ConfigItem>`, `Repository`
  All Known Implementing Classes:
    `ConfigSQLRepository`, `ConfigurationCache`, `ConfigXMLRepository`

      public interface ConfigRepositoryIfc
      extends ComponentRepository<ConfigItem>

  Created: Dec 10, 2009 2:04:20 PM
  Author:
    Artur Hefczyc

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface tigase.db.Repository

      `Repository.Meta, Repository.SchemaId`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `RELOAD_DELAY` |
    `static java.lang.String` | `RESOURCE_URI` |

    - ### Fields inherited from interface tigase.db.comp.ComponentRepository

      `COMP_REPO_BIND`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addItem​(java.lang.String key, java.lang.Object value)` | Method adds an Item to the configuration repository where the key is the item key constructed of component name, node name and property key name.
    `java.lang.Object` | `get​(java.lang.String compName, java.lang.String node, java.lang.String key, java.lang.Object def)` | Returns a configuration setting for a given component, node and key.
    `java.lang.String[]` | `getCompNames()` | Returns all component names for which there are some configuration settings available.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getInitProperties()` |
    `java.util.Set<ConfigItem>` | `getItemsForComponent​(java.lang.String compName)` | Get set of config items stored for component
    `java.lang.String[]` | `getKeys​(java.lang.String compName, java.lang.String node)` | Returns an array of all configuration keys for a given component and configuration node.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getProperties​(java.lang.String compName)` | Deprecated.
    `void` | `putProperties​(java.lang.String compName, java.util.Map<java.lang.String,​java.lang.Object> props)` | Deprecated.
    `void` | `remove​(java.lang.String compName, java.lang.String node, java.lang.String key)` | Removes a configuration setting from the configuration repository.
    `void` | `set​(java.lang.String compName, java.lang.String node, java.lang.String key, java.lang.Object value)` | Puts/sets/adds/updates a configuration setting to the configuration repository.
    `void` | `setDefHostname​(java.lang.String hostname)` | This is used to load a configuration for a selected cluster node.

    - ### Methods inherited from interface tigase.db.comp.ComponentRepository

      `addItem, addItemNoStore, addRepoChangeListener, allItems, contains, destroy, getDefaults, getItem, getItemInstance, reload, removeItem, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setProperties, size, store, validateItem`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, iterator, spliterator`

    - ### Methods inherited from interface tigase.db.Repository

      `initRepository`

- - ### Field Detail

    - #### RELOAD_DELAY

          static final java.lang.String RELOAD_DELAY

      See Also:
        Constant Field Values

    - #### RESOURCE_URI

          static final java.lang.String RESOURCE_URI

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getProperties

          @Deprecated
          java.util.Map<java.lang.String,​java.lang.Object> getProperties​(java.lang.String compName)
                                                                        throws ConfigurationException

      Deprecated.
      Returns all known settings for the given component name.
      Returns:
        map with configuration
      Throws:
        `ConfigurationException`

    - #### getItemsForComponent

          java.util.Set<ConfigItem> getItemsForComponent​(java.lang.String compName)

      Get set of config items stored for component
      Returns:
        set of component items

    - #### putProperties

          @Deprecated
          void putProperties​(java.lang.String compName,
                             java.util.Map<java.lang.String,​java.lang.Object> props)
                      throws ConfigurationException

      Deprecated.
      Sets/adds properties for the given component name.
      Throws:
        `ConfigurationException`

    - #### get

          java.lang.Object get​(java.lang.String compName,
                               java.lang.String node,
                               java.lang.String key,
                               java.lang.Object def)

      Returns a configuration setting for a given component, node and key. If the configuration parameters is not found, returns given default value.
      Returns:
        value

    - #### set

          void set​(java.lang.String compName,
                   java.lang.String node,
                   java.lang.String key,
                   java.lang.Object value)

      Puts/sets/adds/updates a configuration setting to the configuration repository.

    - #### getCompNames

          java.lang.String[] getCompNames()

      Returns all component names for which there are some configuration settings available.
      Returns:
        array of component names

    - #### getKeys

          java.lang.String[] getKeys​(java.lang.String compName,
                                     java.lang.String node)

      Returns an array of all configuration keys for a given component and configuration node.
      Returns:
        array of keys for component and node

    - #### remove

          void remove​(java.lang.String compName,
                      java.lang.String node,
                      java.lang.String key)

      Removes a configuration setting from the configuration repository.

    - #### addItem

          void addItem​(java.lang.String key,
                       java.lang.Object value)
                throws ConfigurationException

      Method adds an Item to the configuration repository where the key is the item key constructed of component name, node name and property key name.
      Throws:
        `ConfigurationException`

    - #### setDefHostname

          void setDefHostname​(java.lang.String hostname)

      This is used to load a configuration for a selected cluster node. The configuration repository (file or database) may contain settings for all cluster nodes, some of the settings may be exclusive to one or another cluster node. This method informs the repository what node name (hostname) it is running on.

    - #### getInitProperties

          java.util.Map<java.lang.String,​java.lang.Object> getInitProperties()