org.duracloud.client.report
Class StorageReportManagerImpl

java.lang.Object
  extended by org.duracloud.client.report.BaseReportManager
      extended by org.duracloud.client.report.StorageReportManagerImpl
All Implemented Interfaces:
StorageReportManager, org.duracloud.common.model.Securable

public class StorageReportManagerImpl
extends BaseReportManager
implements StorageReportManager

Allows for communication with DuraReport


Field Summary
 
Fields inherited from class org.duracloud.client.report.BaseReportManager
restHelper
 
Constructor Summary
StorageReportManagerImpl(java.lang.String host, java.lang.String port)
           
StorageReportManagerImpl(java.lang.String host, java.lang.String port, java.lang.String context)
           
 
Method Summary
 java.lang.String cancelStorageReport()
          Cancels any currently running storage report.
 java.lang.String cancelStorageReportSchedule()
          Cancels any existing storage report schedule.
 org.duracloud.reportdata.storage.StorageReport getLatestStorageReport()
          Retrieves the latest completed storage report.
 org.duracloud.reportdata.storage.StorageReport getStorageReport(java.lang.String reportId)
          Retrieves a storage report indicated by a report ID.
 org.duracloud.reportdata.storage.StorageReportInfo getStorageReportInfo()
          Retrieves information about storage reporting activities.
 java.util.List<java.lang.String> getStorageReportList()
          Retrieves the list of storage report IDs, ordered by report completion date.
 java.lang.String scheduleStorageReport(java.util.Date startTime, long frequency)
          Schedules a series of storage reports to run.
 java.lang.String startStorageReport()
          Tells DuraReport to start running a new storage report generation process.
 
Methods inherited from class org.duracloud.client.report.BaseReportManager
checkResponse, getBaseURL, getRestHelper, login, logout, setRestHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.duracloud.client.report.StorageReportManager
getBaseURL
 
Methods inherited from interface org.duracloud.common.model.Securable
login, logout
 

Constructor Detail

StorageReportManagerImpl

public StorageReportManagerImpl(java.lang.String host,
                                java.lang.String port)

StorageReportManagerImpl

public StorageReportManagerImpl(java.lang.String host,
                                java.lang.String port,
                                java.lang.String context)
Method Detail

getLatestStorageReport

public org.duracloud.reportdata.storage.StorageReport getLatestStorageReport()
                                                                      throws NotFoundException,
                                                                             ReportException
Description copied from interface: StorageReportManager
Retrieves the latest completed storage report.

Specified by:
getLatestStorageReport in interface StorageReportManager
Returns:
StorageReport
Throws:
NotFoundException - if no reports are available
ReportException

getStorageReportList

public java.util.List<java.lang.String> getStorageReportList()
                                                      throws ReportException
Description copied from interface: StorageReportManager
Retrieves the list of storage report IDs, ordered by report completion date.

Specified by:
getStorageReportList in interface StorageReportManager
Returns:
List os report IDs
Throws:
ReportException

getStorageReport

public org.duracloud.reportdata.storage.StorageReport getStorageReport(java.lang.String reportId)
                                                                throws NotFoundException,
                                                                       ReportException
Description copied from interface: StorageReportManager
Retrieves a storage report indicated by a report ID.

Specified by:
getStorageReport in interface StorageReportManager
Returns:
StorageReport
Throws:
NotFoundException - if a storage report with that ID does not exist
ReportException

getStorageReportInfo

public org.duracloud.reportdata.storage.StorageReportInfo getStorageReportInfo()
                                                                        throws ReportException
Description copied from interface: StorageReportManager
Retrieves information about storage reporting activities.

Specified by:
getStorageReportInfo in interface StorageReportManager
Returns:
Throws:
ReportException

startStorageReport

public java.lang.String startStorageReport()
                                    throws ReportException
Description copied from interface: StorageReportManager
Tells DuraReport to start running a new storage report generation process. If a report generation process is already underway, this call is ignored.

Specified by:
startStorageReport in interface StorageReportManager
Returns:
success message
Throws:
ReportException

cancelStorageReport

public java.lang.String cancelStorageReport()
                                     throws ReportException
Description copied from interface: StorageReportManager
Cancels any currently running storage report.

Specified by:
cancelStorageReport in interface StorageReportManager
Returns:
success message
Throws:
ReportException

scheduleStorageReport

public java.lang.String scheduleStorageReport(java.util.Date startTime,
                                              long frequency)
                                       throws ReportException
Description copied from interface: StorageReportManager
Schedules a series of storage reports to run. The first such report will begin at the indicated start time, followed by reports at the given frequency.

Specified by:
scheduleStorageReport in interface StorageReportManager
Parameters:
startTime - time to start the next storage report
frequency - time in milliseconds to wait between reports
Returns:
success message
Throws:
ReportException

cancelStorageReportSchedule

public java.lang.String cancelStorageReportSchedule()
                                             throws ReportException
Description copied from interface: StorageReportManager
Cancels any existing storage report schedule.

Specified by:
cancelStorageReportSchedule in interface StorageReportManager
Returns:
success message
Throws:
ReportException


Copyright © 2009-2011 DuraSpace. All Rights Reserved.