DataManager
Date: 2017-06-10

org.gcube.informationsystem.collector.impl.xmlstorage.exist

## Class DataManager

- java.lang.Object
- - org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage
  - - org.gcube.informationsystem.collector.impl.xmlstorage.exist.DataManager

-     public class DataManager
      extends XMLStorage

  Data Manager
  Author:
    Manuele Simi (ISTI-CNR)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage

      `XMLStorage.XMLStorageNotAvailableException`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `backup()` Backups the current content of the XMLStorage
    `static Scheduler` | `getScheduler()` Gets the scheduler for automatic and periodic backups of the XMLStorage. Automatic backups are scheduled via the scheduledBackupInHours variable in the service's JNDI.
    `void` | `restore()` Restores from the latest backup

    - ### Methods inherited from class org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage

      `collectionExists, createCollection, deleteCollection, deleteResource, executeXPathQuery, getStatus, initialize, initialize, isLocked, listAllCollectionResourceIDs, loadAllCollections, printResourcesIDs, resourceExists, retrieveResourceContent, setStatus, shutdown, storeResource`

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataManager

          public DataManager()

  - ### Method Detail

    - #### backup

          public void backup()
                      throws java.io.IOException,
                             java.lang.Exception

      Backups the current content of the XMLStorage
      Throws:
        `java.lang.Exception`
        `java.io.IOException`

    - #### restore

          public void restore()
                       throws java.io.IOException

      Restores from the latest backup
      Throws:
        `java.io.IOException`

    - #### getScheduler

          public static Scheduler getScheduler()

      Gets the scheduler for automatic and periodic backups of the XMLStorage.
      Automatic backups are scheduled via the scheduledBackupInHours variable in the service's JNDI. If this variable is missing the automatic backups are not performed.
      Returns:
        the scheduler or null if no automatic backup was configured