tigase.db.comp

## Class ConfigRepository<Item extends RepositoryItem>

- java.lang.Object
- - tigase.db.comp.ConfigRepository<Item>

- Type Parameters:
    `Item` -
  All Implemented Interfaces:
    Iterable<Item>, ComponentRepository<Item>
  Direct Known Subclasses:
    ClConConfigRepository, CompConfigRepository, UserRepoRepository, VhostConfigRepository

      public abstract class ConfigRepository<Item extends RepositoryItem>
      extends Object
      implements ComponentRepository<Item>

  Created: Oct 3, 2009 2:58:41 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ConcurrentSkipListMap<String,Item>` | `items` Field description

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

      `COMP_REPO_BIND`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigRepository()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addItem(Item item)` Method description
    `void` | `addRepoChangeListener(RepositoryChangeListenerIfc<Item> repoChangeListener)` Method description
    `Collection<Item>` | `allItems()` Method description
    `boolean` | `contains(String key)` Method description
    `abstract String` | `getConfigKey()` Method description
    `abstract String[]` | `getDefaultPropetyItems()` Method description
    `void` | `getDefaults(Map<String,Object> defs, Map<String,Object> params)` Method description
    `Item` | `getItem(String key)` Method description
    `abstract String` | `getPropertyKey()` Method description
    `boolean` | `itemChanged(Item oldItem, Item newItem)` Method description
    `Iterator<Item>` | `iterator()` Method description
    `void` | `reload()` Method description
    `void` | `removeItem(String key)` Method description
    `void` | `removeRepoChangeListener(RepositoryChangeListenerIfc<Item> repoChangeListener)` Method description
    `void` | `setAutoloadTimer(long delay)` Method description
    `void` | `setProperties(Map<String,Object> properties)` Method description
    `int` | `size()` Method description
    `void` | `store()` Method description
    `String` | `toString()` Method description
    `String` | `validateItem(Item item)` Method description

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

      `getItemInstance`

- - ### Field Detail

    - #### items

          protected ConcurrentSkipListMap<String,Item extends RepositoryItem> items

      Field description

  - ### Constructor Detail

    - #### ConfigRepository

          public ConfigRepository()

  - ### Method Detail

    - #### setAutoloadTimer

          public void setAutoloadTimer(long delay)

      Method description
      Specified by:
        `setAutoloadTimer` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `delay` -

    - #### addRepoChangeListener

          public void addRepoChangeListener(RepositoryChangeListenerIfc<Item> repoChangeListener)

      Method description
      Specified by:
        `addRepoChangeListener` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `repoChangeListener` -

    - #### removeRepoChangeListener

          public void removeRepoChangeListener(RepositoryChangeListenerIfc<Item> repoChangeListener)

      Method description
      Specified by:
        `removeRepoChangeListener` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `repoChangeListener` -

    - #### toString

          public String toString()

      Method description
      Overrides:
        `toString` in class `Object`
      Returns:

    - #### getConfigKey

          public abstract String getConfigKey()

      Method description
      Returns:

    - #### getDefaultPropetyItems

          public abstract String[] getDefaultPropetyItems()

      Method description
      Returns:

    - #### getPropertyKey

          public abstract String getPropertyKey()

      Method description
      Returns:

    - #### addItem

          public void addItem(Item item)

      Method description
      Specified by:
        `addItem` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `item` -

    - #### itemChanged

          public boolean itemChanged(Item oldItem,
                            Item newItem)

      Method description
      Parameters:
        `oldItem` -
        `newItem` -
      Returns:

    - #### allItems

          public Collection<Item> allItems()

      Method description
      Specified by:
        `allItems` in interface `ComponentRepository<Item extends RepositoryItem>`
      Returns:

    - #### contains

          public boolean contains(String key)

      Method description
      Specified by:
        `contains` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `key` -
      Returns:

    - #### getDefaults

          public void getDefaults(Map<String,Object> defs,
                         Map<String,Object> params)

      Method description
      Specified by:
        `getDefaults` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `defs` -
        `params` -

    - #### getItem

          public Item getItem(String key)

      Method description
      Specified by:
        `getItem` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `key` -
      Returns:

    - #### iterator

          public Iterator<Item> iterator()

      Method description
      Specified by:
        `iterator` in interface `Iterable<Item extends RepositoryItem>`
      Returns:

    - #### reload

          public void reload()

      Method description
      Specified by:
        `reload` in interface `ComponentRepository<Item extends RepositoryItem>`

    - #### removeItem

          public void removeItem(String key)

      Method description
      Specified by:
        `removeItem` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `key` -

    - #### setProperties

          public void setProperties(Map<String,Object> properties)

      Method description
      Specified by:
        `setProperties` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `properties` -

    - #### size

          public int size()

      Method description
      Specified by:
        `size` in interface `ComponentRepository<Item extends RepositoryItem>`
      Returns:

    - #### store

          public void store()

      Method description
      Specified by:
        `store` in interface `ComponentRepository<Item extends RepositoryItem>`

    - #### validateItem

          public String validateItem(Item item)

      Method description
      Specified by:
        `validateItem` in interface `ComponentRepository<Item extends RepositoryItem>`
      Parameters:
        `item` -
      Returns:

Copyright © 2013 Tigase. All rights reserved.