Package tigase.io.repo

# Class CertificateRepository

java.lang.Object
tigase.db.comp.ConfigRepository<Item>
tigase.db.comp.UserRepoRepository<CertificateItem>
tigase.io.repo.CertificateRepository

All Implemented Interfaces:
  `Iterable<CertificateItem>`, `ComponentRepository<CertificateItem>`, `Repository`, `Initializable`, `UnregisterAware`

@Bean(name="repository", parent=CertificateContainer.class, active=false) public class CertificateRepository extends UserRepoRepository<CertificateItem>

- ## Nested Class Summary

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

  `Repository.Meta, Repository.SchemaId`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `moveFromFilesystemToRepository`

  ### Fields inherited from class tigase.db.comp.UserRepoRepository

  `repo, REPO_CLASS_PROP_KEY, REPO_URI_PROP_KEY`

  ### Fields inherited from class tigase.db.comp.ConfigRepository

  `autoReloadInterval, items, itemsHash`

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

  `COMP_REPO_BIND`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CertificateRepository()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addItem(CertificateItem item)`
  The method adds a new or updates existing Item in the repository.
  `void`
  `destroy()`
  Method destroys this instance of ComponentRepository releasing resources allocated for this instance of ComponentRepository if possible
  `String`
  `getConfigKey()`
  `CertificateItem`
  `getItemInstance()`
  Creates a new, uninitialized instance of the repository Item.
  `String`
  `getPropertyKey()`
  `BareJID`
  `getRepoUser()`
  `boolean`
  `isMoveFromFilesystemToRepository()`
  `boolean`
  `itemChanged(CertificateItem oldItem, CertificateItem newItem)`
  `void`
  `reload()`
  This method is called to reload items from the database or other permanent storage.
  `void`
  `removeItem(String key)`
  The method is called to remove given Item from the memory cache and permanent storage.
  `void`
  `store()`
  The method is called to store all data in the database.

  ### Methods inherited from class tigase.db.comp.UserRepoRepository

  `getItemsListPKey, setRepo`

  ### Methods inherited from class tigase.db.comp.ConfigRepository

  `addItemNoStore, addRepoChangeListener, allItems, beforeUnregister, contains, getDefaultItems, getDefaultPropetyItems, getDefaults, getItem, getItemsOld, initialize, initItemsMap, isInitialized, iterator, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setItemsOld, setProperties, size, toString, validateItem`

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

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

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

  `forEach, spliterator`

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

  `initRepository`

- ## Field Details

  - ### moveFromFilesystemToRepository

    @ConfigField(desc="Automatically migrate certificates from filesystem to repository (and make backup)", alias="move-from-filesystem-to-repository") protected boolean moveFromFilesystemToRepository

- ## Constructor Details

  - ### CertificateRepository

    public CertificateRepository()

- ## Method Details

  - ### addItem

    public void addItem(CertificateItem item)
    Description copied from interface: `ComponentRepository`
    The method adds a new or updates existing Item in the repository. It needs to have all fields set correctly. After this method call is finished a new added item must be available in the component repository. The method adds the item to memory cache and permanent storage.
    Specified by:
      `addItem` in interface `ComponentRepository<CertificateItem>`
    Overrides:
      `addItem` in class `ConfigRepository<CertificateItem>`
    Parameters:
      `item` - a `Item` with all it's configuration parameters.

  - ### itemChanged

    public boolean itemChanged(CertificateItem oldItem, CertificateItem newItem)
    Overrides:
      `itemChanged` in class `ConfigRepository<CertificateItem>`

  - ### destroy

    public void destroy()
    Description copied from interface: `ComponentRepository`
    Method destroys this instance of ComponentRepository releasing resources allocated for this instance of ComponentRepository if possible

  - ### getConfigKey

    public String getConfigKey()
    Specified by:
      `getConfigKey` in class `ConfigRepository<CertificateItem>`

  - ### getItemInstance

    public CertificateItem getItemInstance()
    Description copied from interface: `ComponentRepository`
    Creates a new, uninitialized instance of the repository Item.
    Returns:
      a new, uninitialized instance of the repository Item.

  - ### getPropertyKey

    public String getPropertyKey()
    Specified by:
      `getPropertyKey` in class `ConfigRepository<CertificateItem>`

  - ### getRepoUser

    public BareJID getRepoUser()
    Specified by:
      `getRepoUser` in class `UserRepoRepository<CertificateItem>`

  - ### isMoveFromFilesystemToRepository

    public boolean isMoveFromFilesystemToRepository()

  - ### reload

    public void reload()
    Description copied from interface: `ComponentRepository`
    This method is called to reload items from the database or other permanent storage. It is possible that items list is modified externally by third-party system. When all modifications are done this method is called to refresh the class cache. Whether the implementation load whole list or just last modifications is implementation dependent.
    Specified by:
      `reload` in interface `ComponentRepository<CertificateItem>`
    Overrides:
      `reload` in class `UserRepoRepository<CertificateItem>`

  - ### removeItem

    public void removeItem(String key)
    Description copied from interface: `ComponentRepository`
    The method is called to remove given Item from the memory cache and permanent storage. After this method is completed the item should no longer be available in the component repository.
    Specified by:
      `removeItem` in interface `ComponentRepository<CertificateItem>`
    Overrides:
      `removeItem` in class `ConfigRepository<CertificateItem>`
    Parameters:
      `key` - a `String` with domain name to remove.

  - ### store

    public void store()
    Description copied from interface: `ComponentRepository`
    The method is called to store all data in the database. It is used when the repository has been changed in some way and the changes have to be put to a permanent storage for later retrieval.
    Specified by:
      `store` in interface `ComponentRepository<CertificateItem>`
    Overrides:
      `store` in class `UserRepoRepository<CertificateItem>`