Skip to content

Instantly share code, notes, and snippets.

@renatoathaydes
Forked from minisu/TestRunStorage.java
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatoathaydes/9929192 to your computer and use it in GitHub Desktop.
Save renatoathaydes/9929192 to your computer and use it in GitHub Desktop.
package com.smartbear.saas.rs.storage;
import com.smartbear.saas.rs.model.TestRun;
import java.util.Optional;
import java.util.Set;
public interface TestRunStorage
{
/**
* @param customerId
* @param testId
* @return test run information for the test identified by the given parameters.
**/
Optional<TestRun> getTestRun( String customerId, String testId );
/**
* Gets all data that meets the given parameters.
*
* @note This method can be used when what you want is all metrics and variables for a given test
*
* @param customerId
* @param testId
* @param scenario if absent, will return data for all scenarios.
* @param ordered if true, data will not be sorted by timestamp
* @param limit maximum number of documents to include in the result
* @param offset when ordered is true, offset tells how many documents to offset the results by
* @return JSON representation of the result data
**/
String getData( String customerId,
String testId,
Optional<String> scenario,
boolean ordered,
int limit,
Optional<Integer> offset );
/**
* Gets all data that meets the given parameters.
*
* @note this method should be used when you're only interested in particular variables or metrics.
*
* @param customerId
* @param testId
* @param scenario if absent, will return data for all scenarios.
* @param ordered if true, data will not be sorted by timestamp
* @param limit maximum number of documents to include in the result
* @param offset when ordered is true, offset tells how many documents to offset the results by
* @return JSON representation of the result data
**/
String getData( String customerId,
String testId,
Optional<String> scenario,
Optional<String> variable,
Optional<String> metric,
boolean ordered,
int limit,
Optional<Integer> offset );
}
@minisu
Copy link

minisu commented Apr 2, 2014

Sweet, I'm using this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment