Decision Center API

ilog.rules.teamserver.web.components.renderers
Interface IlrScenarioSuiteResourcesRenderer


public interface IlrScenarioSuiteResourcesRenderer

Represents how data is provided to the scenario provider by the Decision Center user.

Overview

Implement this interface to encode and decode the scenario suite resources. These resources are used to build the IlrScenarioSuiteDescriptor given to the scenario provider. The renderer is linked to the class name of the scenario provider, and is used in Decision Center when choosing the format.

You also have to define, in Decision Center, a configuration parameter that associates the scenario suite resources renderer to its renderer class. The key is "teamserver." + scenarioProviderClassName + ".renderer". For example, if scenarioProviderClassName is com.test.MyProvider, the key must be teamserver.com.test.MyProvider.renderer. This value is the fully qualified name of the scenario suite resources renderer.

Example

You can find code examples of how to implement IlrScenarioSuiteResourcesRenderer in the Custom scenario provider and KPI sample.

About the DVS API

Decision Validation Services provides business rule testing and simulation solutions to developers and business users.

You use the DVS API to:


Method Summary
 void decode(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor, Map<String,byte[]> resources, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Decodes, validates, and stores any new state in the specified resources.
 void encodeAsEditor(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor, Map<String,byte[]> resources, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Renders the current state of the specified resources as an editor.
 void encodeAsViewer(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor, Map<String,byte[]> resources, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Renders the current state of the specified resources as a viewer.
 

Method Detail

decode

void decode(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor,
            Map<String,byte[]> resources,
            javax.faces.context.FacesContext context,
            javax.faces.component.UIComponent component)
Decodes, validates, and stores any new state in the specified resources.

Throws:
IllegalArgumentException - if a decoded form field is not valid. When this happens, the exception message is displayed in the page.
Parameters:
formatDescriptor - The scenario file format description.
resources - The resources to be decoded. The run and download archive actions will be available only if this map is not empty.
context - The faces context for the request being processed.
component - The current UI component.

encodeAsEditor

void encodeAsEditor(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor,
                    Map<String,byte[]> resources,
                    javax.faces.context.FacesContext context,
                    javax.faces.component.UIComponent component)
                    throws IOException
Renders the current state of the specified resources as an editor.

Throws:
IOException - if an input/output error occurs.
Parameters:
formatDescriptor - The scenario file format description.
resources - The resources to be rendered.
context - The faces context for the request being processed.
component - The current UI component.

encodeAsViewer

void encodeAsViewer(ilog.rules.dvs.common.descriptors.IlrScenarioFormatDescriptor formatDescriptor,
                    Map<String,byte[]> resources,
                    javax.faces.context.FacesContext context,
                    javax.faces.component.UIComponent component)
                    throws IOException
Renders the current state of the specified resources as a viewer.

Throws:
IOException - if an input/output error occurs.
Parameters:
formatDescriptor - The scenario file format description.
resources - The resources to be rendered.
context - The faces context for the request being processed.
component - The current UI component.

Decision Center API

© Copyright IBM Corp. 1987, 2013