org.alfresco.bm.report
Class ReportServiceImpl

java.lang.Object
  extended by org.alfresco.bm.report.ReportServiceImpl
All Implemented Interfaces:
ReportService

public class ReportServiceImpl
extends Object
implements ReportService

Service class that retrieves test run results from MongoDB and generates a csv output file from the result.

Author:
Michael Suzuki

Field Summary
 
Fields inherited from interface org.alfresco.bm.report.ReportService
CRITERIA_SUCCESS
 
Constructor Summary
ReportServiceImpl(org.springframework.data.mongodb.core.MongoTemplate mongo, String collection, String mongoURI)
          Constructor.
 
Method Summary
 void export(String file, int skip, int limit)
          Exports results in a csv format to a file.
 List<String> getEventNames()
          Retrieves distinct collection of event names from the result collection in MongoDB.
 List<EventRecord> getResults(int skip, int limit)
          Retrieves results of a test run from MongoDB.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportServiceImpl

public ReportServiceImpl(org.springframework.data.mongodb.core.MongoTemplate mongo,
                         String collection,
                         String mongoURI)
Constructor.

Parameters:
mongo - MongoTemplate spring mongo tempalte
collection - String Mongo Collection name
mongoURI - String Mongo uri
Method Detail

export

public void export(String file,
                   int skip,
                   int limit)
Description copied from interface: ReportService
Exports results in a csv format to a file.

Specified by:
export in interface ReportService
skip - the number of results to skip (for paging)
limit - the number of results to retrieve

getResults

public List<EventRecord> getResults(int skip,
                                    int limit)
Description copied from interface: ReportService
Retrieves results of a test run from MongoDB.

Specified by:
getResults in interface ReportService
Parameters:
skip - the number of results to skip (for paging)
limit - the number of results to retrieve
Returns:
Returns all successful recorded results

getEventNames

public List<String> getEventNames()
Description copied from interface: ReportService
Retrieves distinct collection of event names from the result collection in MongoDB.

Specified by:
getEventNames in interface ReportService
Returns:
List of distinct string values


Copyright © 2012. All Rights Reserved.