org.duracloud.servicemonitor.impl
Class ServiceSummaryDirectoryImpl

java.lang.Object
  extended by org.duracloud.servicemonitor.impl.ServiceSummaryDirectoryImpl
All Implemented Interfaces:
ServiceSummaryDirectory

public class ServiceSummaryDirectoryImpl
extends java.lang.Object
implements ServiceSummaryDirectory

This class manages the reading, writing, and listing of ServiceSummary report content items.

Author:
Andrew Woods Date: 6/24/11

Field Summary
 
Fields inherited from interface org.duracloud.servicemonitor.ServiceSummaryDirectory
DATE_VAR
 
Constructor Summary
ServiceSummaryDirectoryImpl(java.lang.String spaceId, java.lang.String contentIdBase)
           
ServiceSummaryDirectoryImpl(java.lang.String spaceId, java.lang.String contentIdBase, ContentStore contentStore)
           
 
Method Summary
 void addServiceSummary(ServiceSummary serviceSummary)
          This method adds the arg service summary to the existing summary for the month if one already exists, otherwise a new report is created with the arg summary in it.
 java.util.List<ServiceSummary> getCurrentServiceSummaries()
          This method returns a list of ServiceSummaries for the current month.
 java.io.InputStream getCurrentServiceSummariesStream()
          This method returns a serialized list of ServiceSummaries for the current month.
 java.util.List<ServiceSummary> getServiceSummariesById(java.lang.String summaryId)
          This method returns a list of ServiceSummaries that correspond to the arg id.
 java.io.InputStream getServiceSummariesStreamById(java.lang.String summaryId)
          This method returns a serialized list of ServiceSummaries that correspond to the arg id.
 java.util.List<java.lang.String> getServiceSummaryIds()
          This method returns the list of summary ids.
 void initialize(ContentStoreManager storeManager)
          This method initializes the ServiceSummaryDirectory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceSummaryDirectoryImpl

public ServiceSummaryDirectoryImpl(java.lang.String spaceId,
                                   java.lang.String contentIdBase)

ServiceSummaryDirectoryImpl

public ServiceSummaryDirectoryImpl(java.lang.String spaceId,
                                   java.lang.String contentIdBase,
                                   ContentStore contentStore)
Method Detail

initialize

public void initialize(ContentStoreManager storeManager)
Description copied from interface: ServiceSummaryDirectory
This method initializes the ServiceSummaryDirectory.

Specified by:
initialize in interface ServiceSummaryDirectory
Parameters:
storeManager - used by class

getCurrentServiceSummaries

public java.util.List<ServiceSummary> getCurrentServiceSummaries()
                                                          throws ServiceSummaryNotFoundException
Description copied from interface: ServiceSummaryDirectory
This method returns a list of ServiceSummaries for the current month.

Specified by:
getCurrentServiceSummaries in interface ServiceSummaryDirectory
Returns:
list of service summaries
Throws:
ServiceSummaryNotFoundException - if no summary exists

getCurrentServiceSummariesStream

public java.io.InputStream getCurrentServiceSummariesStream()
                                                     throws ServiceSummaryNotFoundException
Description copied from interface: ServiceSummaryDirectory
This method returns a serialized list of ServiceSummaries for the current month.

Specified by:
getCurrentServiceSummariesStream in interface ServiceSummaryDirectory
Returns:
serialized list of service summaries
Throws:
ServiceSummaryNotFoundException - if no summary exists

getServiceSummariesById

public java.util.List<ServiceSummary> getServiceSummariesById(java.lang.String summaryId)
                                                       throws ServiceSummaryNotFoundException
Description copied from interface: ServiceSummaryDirectory
This method returns a list of ServiceSummaries that correspond to the arg id.

Specified by:
getServiceSummariesById in interface ServiceSummaryDirectory
Parameters:
summaryId - of summary
Returns:
list of service summaries
Throws:
ServiceSummaryNotFoundException - if no summary exists

getServiceSummariesStreamById

public java.io.InputStream getServiceSummariesStreamById(java.lang.String summaryId)
                                                  throws ServiceSummaryNotFoundException
Description copied from interface: ServiceSummaryDirectory
This method returns a serialized list of ServiceSummaries that correspond to the arg id.

Specified by:
getServiceSummariesStreamById in interface ServiceSummaryDirectory
Parameters:
summaryId - of summary
Returns:
serialized list of service summaries
Throws:
ServiceSummaryNotFoundException - if no summary exists

getServiceSummaryIds

public java.util.List<java.lang.String> getServiceSummaryIds()
Description copied from interface: ServiceSummaryDirectory
This method returns the list of summary ids.

Specified by:
getServiceSummaryIds in interface ServiceSummaryDirectory
Returns:
list of summary ids

addServiceSummary

public void addServiceSummary(ServiceSummary serviceSummary)
Description copied from interface: ServiceSummaryDirectory
This method adds the arg service summary to the existing summary for the month if one already exists, otherwise a new report is created with the arg summary in it.

Specified by:
addServiceSummary in interface ServiceSummaryDirectory
Parameters:
serviceSummary - to add to this month's report


Copyright © 2009-2011 DuraSpace. All Rights Reserved.