tigase.conf

## Interface ConfigRepositoryIfc

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

      public interface ConfigRepositoryIfc
      extends ComponentRepository<ConfigItem>

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

- - ### Nested Class Summary

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

      `Repository.Meta`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `RELOAD_DELAY` Field description
    `static String` | `RESOURCE_URI` Field description

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

      `COMP_REPO_BIND`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addItem(String key, 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.
    `Object` | `get(String compName, String node, String key, Object def)` Returns a configuration setting for a given component, node and key.
    `String[]` | `getCompNames()` Returns all component names for which there are some configuration settings available.
    `Map<String,Object>` | `getInitProperties()` Method description
    `Set<ConfigItem>` | `getItemsForComponent(String compName)` Method description
    `String[]` | `getKeys(String compName, String node)` Returns an array of all configuration keys for a given component and configuration node.
    `Map<String,Object>` | `getProperties(String compName)` Returns all known settings for the given component name.
    `void` | `putProperties(String compName, Map<String,Object> props)` Sets/adds properties for the given component name.
    `void` | `remove(String compName, String node, String key)` Removes a configuration setting from the configuration repository.
    `void` | `set(String compName, String node, String key, Object value)` Puts/sets/adds/updates a configuration setting to the configuration repository.
    `void` | `setDefHostname(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, 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 String RELOAD_DELAY

      Field description
      See Also:
        Constant Field Values

    - #### RESOURCE_URI

          static final String RESOURCE_URI

      Field description
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getProperties

          Map<String,Object> getProperties(String compName)
                                    throws ConfigurationException

      Returns all known settings for the given component name.
      Parameters:
        `compName` -
      Throws:
        `ConfigurationException`

    - #### getItemsForComponent

          Set<ConfigItem> getItemsForComponent(String compName)

      Method description
      Parameters:
        `compName` -

    - #### putProperties

          void putProperties(String compName,
                             Map<String,Object> props)
                      throws ConfigurationException

      Sets/adds properties for the given component name.
      Parameters:
        `compName` -
        `props` -
      Throws:
        `ConfigurationException`

    - #### get

          Object get(String compName,
                     String node,
                     String key,
                     Object def)

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

    - #### set

          void set(String compName,
                   String node,
                   String key,
                   Object value)

      Puts/sets/adds/updates a configuration setting to the configuration repository.
      Parameters:
        `compName` -
        `node` -
        `key` -
        `value` -

    - #### getCompNames

          String[] getCompNames()

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

    - #### getKeys

          String[] getKeys(String compName,
                           String node)

      Returns an array of all configuration keys for a given component and configuration node.
      Parameters:
        `compName` -
        `node` -

    - #### remove

          void remove(String compName,
                      String node,
                      String key)

      Removes a configuration setting from the configuration repository.
      Parameters:
        `compName` -
        `node` -
        `key` -

    - #### addItem

          void addItem(String key,
                       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.
      Parameters:
        `key` -
        `value` -
      Throws:
        `ConfigurationException`

    - #### setDefHostname

          void setDefHostname(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.
      Parameters:
        `hostname` -

    - #### getInitProperties

          Map<String,Object> getInitProperties()

      Method description

Copyright © 2018 "Tigase, Inc.". All rights reserved.