The following code defines the Groovy Interface for the GenRocket API.  The Groovy source code is compiled into a Java Binary.  A detailed description of each method is described within the set of GenRocket API documents.


package com.genRocket.engine

/**
 * Created by Hycel Taylor on 12/28/16.
 */
interface EngineAPI {

  // Recording Commands

  void recordingNew(String recordingName, Boolean overwrite)

  void recordingStart()

  void recordingPause()

  void recordingStop()

  void recordingLoad(String recordingName)

  void recordingPlay()

  void recordingDelete(String recordingName)

  List<String> recordingList()

  Map<String, Object> recordingShow(String recordingName)

  // Pairwise

  public void pairwiseModify(String pathAndFilename)

  // Scenario Commands

  void scenarioLoad(String scenarioPathAndName)

  void scenarioLoad(String scenarioPathAndName, Boolean initialize)

  Map<String, EngineResourceVariable> loadResources(String profileId)

  List<Map<String, String>> listOrganizationVariables()

  List<Map<String, String>> listDomainVariables()

  void organizationVariableSet(String name, String value)

  void domainVariableSet(String name, String value)

  String resourceValue(String resourceName)

  List<String> scenarios()

  List<Long> scenarioIds()

  Boolean isStateful()

  void scenarioClear()

  Integer totalLoopCount()

  void scenarioRun()

  void initialize(String scenarioName)

  void scenarioExecuteLoop()

  void executeShutdown()

  void scenarioRun(String scenarioName)

  void scenarioRename(String scenarioName, String newName)

  List<Object> scenarioRunInMemory(String domainName)

  // Domain Commands

  String primaryDomain()

  List<String> domains()

  void domainSetLoopCount(String domainName, String loopCount)

  void domainAdd(String domainName, Boolean primary)

  void domainRemove(String domainName)

  void domainsRemove()

  // Domain Parameters

  String domainParameterGet(String domainName, String parameterName)

  void domainParameterSet(String domainName, String parameterName, String value)

  // Domain Parents

  void domainParentAdd(String parentName, String sourceName)

  void domainParentRemove(String sourceName)

  String domainParent(String domainName)

  void domainRename(String domainName, String newName)

  // Attribute Commands

  List<String> attributes(String domainName)

  void attributeAdd(String attributeName) // domainName.name

  String genRocketAttributeName(String attributeName) // domainName.name

  void attributesAdd(String domainName, List<String> attributeNames) // domainName, attribute names

  void attributeRemove(String attributeName) // domainName.name

  void attributesRemove(String domainName)

  void attributeRename(String attributeName, String newName)  // domainName.name, name

  // Generator Commands

  List<String> generators(String attributeName)

  Integer generatorAdd(String attributeName, String generatorName, Boolean setLoop, Map<String, Object> requiredGeneratorParameters)

  void generatorReplace(String attributeName, String generatorName, Integer position, Boolean setLoop, Map<String, Object> requiredGeneratorParameters)

  String generatorType(String attributeName, String generatorName)

  void generatorRemove(String attributeName, Integer generatorPosition)

  void generatorsRemove(String attributeName)

  // Generator Parameter Commands

  Object generatorParameterGet(String attributeName, Integer generatorPosition, String parameterName)

  Map<String, String> generatorParametersGet(String attributeName, Integer generatorPosition)

  void generatorParameterSet(String attributeName, Integer generatorPosition, String parameterName, Object value)

  void generatorParametersSet(String attributeName, Integer generatorPosition, Map<String, Object> parameterMap)

  // Receiver Commands

  List<String> receivers(String domainName)

  void receiverAdd(String domainName, String canonicalName, String receiverName, Map<String, String> parameterMap)

  void receiverRemove(String domainName, String receiverName)

  void receiversRemove(String domainName)

  void receiverParameterSet(String domainName, String receiverName, String parameterName, String value)

  void receiverParametersSet(String domainName, String receiverName, Map<String, String> parameterMap)

  void receiverRename(String domainName, String receiverName, String newName)

  String receiverParameterGet(String domainName, String receiverName, String parameterName)

  Map<String, String> receiverParametersGet(String domainName, String receiverName)

  // Receiver PropertyKey Commands

  String receiverPropertyKeyValueGet(String attributeName, String receiverName, String propertyKeyName)

  void receiverPropertyKeyValueSet(String attributeName, String receiverName, String propertyKeyName, String value)

  void receiverPropertyKeyValuesSet(String attributeName, String receiverName, Map<String, String> propertyKeyMap)
}