Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


oracle.wcps.conductor.services
Interface IScenariosService


public interface IScenariosService

Service for management and execution of scenarios.


Method Summary
 IScenarioMetadata createScenario(ClientContext clientContext, IScenarioStatement statement)
          Creates a new scenario definition
 void deleteScenario(ClientContext clientContext, java.lang.String scenarioName)
          Deletes a scenario by name.
 java.lang.Object executeScenario(ClientContext clientContext, java.lang.String scenarioName, java.util.Map<java.lang.String,java.lang.String> parameters)
          Executes a scenario by name.
 void exportScenario(ClientContext clientContext, java.lang.String directoryPath, java.lang.String scenarioName)
          Exports a scenario by name for a given namespace to the specified directory.
 IScenarioMetadata getScenario(ClientContext clientContext, java.lang.String scenarioName)
          Retrieves a scenario by name.
 java.util.List<IScenarioMetadata> getScenarios(ClientContext clientContext)
          Retrieves the collection of scenarios for the specified namespace (in ClientContext).
 java.util.List<IScenarioMetadata> getScenariosByTag(ClientContext clientContext, java.lang.String tag)
          Retrieves the collection of scenarios for the specified namespace (in ClientContext) and tag.
 IStatementFactory getStatementFactory()
          Returns the statement factory for constructing scenario statements.
 IScenarioMetadata importScenario(ClientContext clientContext, java.io.File file)
          Imports a scenario definition based on the provided file.
 IScenarioMetadata importScenario(ClientContext clientContext, java.net.URL url)
          Imports a scenario definition based on the provided URL.
 void renameScenario(ClientContext clientContext, java.lang.String oldName, java.lang.String newName)
          Renames an existing scenario.
 IScenarioMetadata saveScenario(ClientContext clientContext, IScenarioStatement statement)
          Saves an existing scenario definition.
 IScenarioStatement validateScenario(ClientContext clientContext, IScenarioStatement scenario, boolean throwException)
          Validates the provided scenario.

 

Method Detail

getStatementFactory

IStatementFactory getStatementFactory()
Returns the statement factory for constructing scenario statements.
Returns:
the statement factory.

getScenario

IScenarioMetadata getScenario(ClientContext clientContext,
                              java.lang.String scenarioName)
                              throws NoSuchException
Retrieves a scenario by name.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
scenarioName - The scenario name to retrieve
Returns:
The scenario definition, if it exists.
Throws:
NoSuchException - If the named scenario does not exist.

saveScenario

IScenarioMetadata saveScenario(ClientContext clientContext,
                               IScenarioStatement statement)
                               throws NoSuchException,
                                      ScenarioCompilationException
Saves an existing scenario definition.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
statement - The scenario definition
Returns:
The updated scenario definition, if successful.
Throws:
NoSuchException - If the specified scenario does not exist.
ScenarioCompilationException - If scenario has validation errors. The save will be successful, however cannot be executed and it's status will be set to DRAFT.

createScenario

IScenarioMetadata createScenario(ClientContext clientContext,
                                 IScenarioStatement statement)
                                 throws DuplicateException,
                                        ScenarioCompilationException
Creates a new scenario definition
Parameters:
clientContext - The client context to use for namespace, localization, etc.
statement - The scenario definition
Returns:
The new scenario definition, if successful.
Throws:
DuplicateScenarioException - If the specified named scenario already exists.
ScenarioCompilationException - If scenario has validation errors. The save will be successful, however cannot be executed and it's status will be set to DRAFT.
DuplicateException

deleteScenario

void deleteScenario(ClientContext clientContext,
                    java.lang.String scenarioName)
                    throws NoSuchException
Deletes a scenario by name.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
scenarioName - The scenario name to delete.
Throws:
NoSuchException - If the specified scenario name does not exist.

getScenarios

java.util.List<IScenarioMetadata> getScenarios(ClientContext clientContext)
Retrieves the collection of scenarios for the specified namespace (in ClientContext).
Parameters:
clientContext - The client context to use for namespace, localization, pagination, etc.
Returns:
A list of summarized scenario metadata.

getScenariosByTag

java.util.List<IScenarioMetadata> getScenariosByTag(ClientContext clientContext,
                                                    java.lang.String tag)
Retrieves the collection of scenarios for the specified namespace (in ClientContext) and tag.
Parameters:
clientContext - The client context to use for namespace, localization, pagination, etc.
tag - The tag to search for.
Returns:
A list of summarized scenario metadata.

renameScenario

void renameScenario(ClientContext clientContext,
                    java.lang.String oldName,
                    java.lang.String newName)
                    throws NoSuchException,
                           DuplicateException
Renames an existing scenario.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
oldName - The current scenario name.
newName - The new name of the scenario.
Throws:
NoSuchException - If the specified scenario name (denoted by oldName) does not exist.
DuplicateScenarioException - If a scenario already exists (denoted by newName).
DuplicateException

executeScenario

java.lang.Object executeScenario(ClientContext clientContext,
                                 java.lang.String scenarioName,
                                 java.util.Map<java.lang.String,java.lang.String> parameters)
                                 throws NoSuchException
Executes a scenario by name.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
scenarioName - The named scenario to execute.
parameters - Parameters to be used as input parameters to the scenario.
Returns:
The scenario results.
Throws:
NoSuchException - If the specified scenario does not exist.

validateScenario

IScenarioStatement validateScenario(ClientContext clientContext,
                                    IScenarioStatement scenario,
                                    boolean throwException)
                                    throws ScenarioCompilationException
Validates the provided scenario.
Parameters:
clientContext - The client context to use for namespace, localization, etc.
scenario - The scenario definition to validate.
throwException - Indicates that an exception should be thrown if there are validation errors.
Returns:
The scenario definition. If validation errors are present, the scenario definition will be marked up with the statement(s) that violate the validation.
Throws:
ScenarioCompilationException - If scenario has validation errors and throwException is true.

importScenario

IScenarioMetadata importScenario(ClientContext clientContext,
                                 java.net.URL url)
                                 throws ScenarioCompilationException
Imports a scenario definition based on the provided URL.

If the scenario definition does not exist (by scenario name), it will be created. If the scenario definition does exist, it will be overwritten with the new scenario definition.

Only XML scenario definitions are currently supported.

Parameters:
clientContext - The client context to use for namespace, localization, etc.
url - The url to the scenario definition in XML.
Returns:
The imported scenario definition if successful.
Throws:
ScenarioCompilationException - If scenario has validation errors.

importScenario

IScenarioMetadata importScenario(ClientContext clientContext,
                                 java.io.File file)
                                 throws ScenarioCompilationException
Imports a scenario definition based on the provided file.

If the scenario definition does not exist (by scenario name), it will be created. If the scenario definition does exist, it will be overwritten with the new scenario definition.

Only XML scenario definitions are currently supported.

Parameters:
clientContext - The client context to use for namespace, localization, etc.
file - The file to the scenario definition in XML.
Returns:
The imported scenario definition if successful.
Throws:
ScenarioCompilationException - If scenario has validation errors.

exportScenario

void exportScenario(ClientContext clientContext,
                    java.lang.String directoryPath,
                    java.lang.String scenarioName)
                    throws java.io.IOException,
                           NoSuchException
Exports a scenario by name for a given namespace to the specified directory.

The format of the scenario will be in XML.

Parameters:
clientContext - The client context to use for namespace, localization, etc.
directoryPath - The directory path to export the scenario to.
scenarioName - The name of the scenario to export.
Throws:
java.io.IOException - If the specified directory/path does not exist, or is not a directory.
NoSuchException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


Copyright © 2009, 2012, Oracle and/or its affiliates. All rights reserved.