Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlpi.common.plugin
Interface PluginPanelContext

public interface PluginPanelContext

Interface to allow plugins access to design-time context and services. This includes plugin-defined template and template definition data, and services to launch the expression builder, validate and manipulate expressions, and to invoke the 'add variable' dialog. Not all methods are applicable in all dialog contexts - if a plugin panel invokes a method in an invalid context, that method throws a `java.lang.UnsupportedOperationException`.

Since:
  WebLogic Process Integrator 2.0
Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `PluginPanel`

Field Summary
`static int` | `EVENT_KEY_CREATED` The requested event key did not exist and was created.
`static int` | `EVENT_KEY_EXISTS` The requested event key already existed.
`static int` | `EVENT_KEY_NOT_EXISTS` The requested event key does not exist.
`static int` | `EVENT_KEY_UPDATED` The requested event key did exist but was updated.

Method Summary
`int` | `checkEventKey(java.lang.String contentType, java.lang.String keyExpr, boolean update)` Ensure that a suitable event key exists.
`VariableInfo` | `checkVariable(java.lang.String name, java.lang.String[] validTypes)` Check to see if a variable exits.
`java.util.Set` | `getEventDescriptors(java.lang.String contentType)` Return the set of event descriptors referenced by existing event keys.
`javax.naming.Context` | `getInitialContext()` Return the design-time client application's JNDI context.
`PluginData` | `getPluginTemplateData(java.lang.String pluginName)` Retrieve the plugin defined data for the associated template.
`PluginData` | `getPluginTemplateDefinitionData(java.lang.String pluginName)` Retrieve the plugin defined data for the associated template definition.
`java.util.List` | `getTaskList()` Retrieve a list of all defined workflow tasks.
`java.lang.String` | `getTemplateDefinitionID()` Retrieve the ID of the owner template definition.
`java.lang.String` | `getTemplateID()` Retrieve the ID of the owner template.
`java.util.List` | `getVariableList()` Retrieve a list of all defined workflow variables and their types.
`java.util.List` | `getVariableList(java.lang.String type)` Retrieve a list of defined workflow variables of a specified type.
`VariableInfo` | `invokeAddVariableDialog()` Invoke the Add Variable dialog to allow the user to define a new workflow variable.
`VariableInfo` | `invokeAddVariableDialog(java.lang.String name, java.lang.String[] validTypes)` Invoke the 'Add Variable' dialog to allow the user to define a new workflow variable of a valid type specified by the caller.
`void` | `invokeExpressionBuilder(javax.swing.text.JTextComponent txtInput, boolean condition, FieldInfo fieldInfo, java.lang.String[] fields, java.lang.String eventDescriptor)` Invoke the expression builder dialog.
`boolean` | `isVariableInExpression(java.lang.String expr, java.lang.String var)` Check whether an expression references the specified variable.
`java.lang.String` | `renameVariableInExpression(java.lang.String expr, java.lang.String oldName, java.lang.String newName)` Update an expression's references to a renamed variable.
`boolean` | `validateExpression(java.lang.String expression, boolean allowVariables, FieldInfo fieldInfo, java.lang.String eventDescriptor)` Validate an expression.

Field Detail

### EVENT_KEY_NOT_EXISTS

    public static final int EVENT_KEY_NOT_EXISTS

  The requested event key does not exist.

### EVENT_KEY_EXISTS

    public static final int EVENT_KEY_EXISTS

  The requested event key already existed.

### EVENT_KEY_UPDATED

    public static final int EVENT_KEY_UPDATED

  The requested event key did exist but was updated.

### EVENT_KEY_CREATED

    public static final int EVENT_KEY_CREATED

  The requested event key did not exist and was created.

Method Detail

### getInitialContext

    public javax.naming.Context getInitialContext()

  Return the design-time client application's JNDI context. The client application (WebLogic Process Integrator Studio) returns a JNDI context containing the same security context as it uses itself. The caller must not close this context.

  Returns:
    A JNDI context.

### getTemplateID

    public java.lang.String getTemplateID()

  Retrieve the ID of the owner template.

  Returns:
    The template ID.

### getTemplateDefinitionID

    public java.lang.String getTemplateDefinitionID()

  Retrieve the ID of the owner template definition.

  Returns:
    The template definition ID.

### getVariableList

    public java.util.List getVariableList()

  Retrieve a list of all defined workflow variables and their types.

  Returns:
    A list of `VariableInfo` objects describing the defined variables.

### getTaskList

    public java.util.List getTaskList()

  Retrieve a list of all defined workflow tasks.

  Returns:
    A list of `TaskInfo` objects describing the defined tasks. Only the design-time values of the TaskInfo object will be set such as name, id, templateID, templateDefinitionID, donewithoutdoit, doitifdone, unmarkdone, modifiable, and reassignment. Other fields are not meaningful.

### getVariableList

    public java.util.List getVariableList(java.lang.String type)

  Retrieve a list of defined workflow variables of a specified type.

  Parameters:
    `type` - A string describing the type of variable to return.
  Returns:
    A list of `VariableInfo` objects describing the defined variables of the specified type.

### invokeExpressionBuilder

    public void invokeExpressionBuilder(javax.swing.text.JTextComponent txtInput,
                                        boolean condition,
                                        FieldInfo fieldInfo,
                                        java.lang.String[] fields,
                                        java.lang.String eventDescriptor)

  Invoke the expression builder dialog. This method assumes that the current expression is displayed in a `JTextComponent`, or a subclass thereof, and initializes the expression builder from this text component. If the user clicks the expression builder's OK button, this method closes the builder dialog if the expression is valid, then updates the text component with the modified expression.

  Parameters:
    `txtInput` - The text input component containing the expression.
    `condition` - `true` to build a conditional expression.
    `fieldInfo` - Required if the expression is permitted to reference fields.
    `fields` - Optional list of valid field names, to match the `eventDescriptor` parameter. Note that field types which support qualifiers are not well suited to supply a list of valid field names.
    `eventDescriptor` - An event descriptor string in a plugin-defined format.

### invokeAddVariableDialog

    public VariableInfo invokeAddVariableDialog()
                                         throws WorkflowException

  Invoke the Add Variable dialog to allow the user to define a new workflow variable.

  Returns:
    Information about the new variable if the user pressed the 'add variable' dialog's OK button, otherwise `null`.

### invokeAddVariableDialog

    public VariableInfo invokeAddVariableDialog(java.lang.String name,
                                                java.lang.String[] validTypes)
                                         throws WorkflowException

  Invoke the 'Add Variable' dialog to allow the user to define a new workflow variable of a valid type specified by the caller.

  Parameters:
    `name` - The name of the new variable to create. Can be `null`.
    `validTypes` - An array of valid type names for this variable. Valid types are defined in the `VariableInfo` class.
  Returns:
    Information about the new variable.
  Throws:
    java.lang.IllegalArgumentException - If a types array contains an invalid type.
    WorkflowException - If a variable of the same name already exists.

### checkVariable

    public VariableInfo checkVariable(java.lang.String name,
                                      java.lang.String[] validTypes)
                               throws WorkflowException

  Check to see if a variable exits. If it doesn't, invoke the 'Add Variable' dialog to allow the user to define a new workflow variable of a valid type specified by the caller.

  Parameters:
    `name` - The name of the new variable to create. Can be `null`.
    `validTypes` - An array of valid type names for this variable. Valid types are defined in the `VariableInfo` class. Can be `null`.
  Returns:
    Information about the variable if it exists, or if the user pressed the 'add variable' dialog's OK button, otherwise `nullThrows:`
    java.lang.IllegalArgumentException - If a types array contains an invalid type.
    WorkflowException - If a variable of the same name already exists, but is of a type not in the supplied list of valid types.

### getPluginTemplateData

    public PluginData getPluginTemplateData(java.lang.String pluginName)

  Retrieve the plugin defined data for the associated template.

  Parameters:
    `pluginName` - The reverse-DNS name of the plugin.
  Returns:
    The plugin provided `PluginData` object for the template.
  See Also:
    `PluginData`

### getPluginTemplateDefinitionData

    public PluginData getPluginTemplateDefinitionData(java.lang.String pluginName)

  Retrieve the plugin defined data for the associated template definition.

  Parameters:
    `pluginName` - The reverse-DNS name of the plugin.
  Returns:
    The plugin provided `PluginData` object for the template definition.
  See Also:
    `PluginData`

### isVariableInExpression

    public boolean isVariableInExpression(java.lang.String expr,
                                          java.lang.String var)
                                   throws EvaluatorException

  Check whether an expression references the specified variable.

  Parameters:
    `expr` - The text of the expression to check.
    `var` - The name of the variable.
  Returns:
    `true` if the expression references the variable.
  Throws:
    EvaluatorException - if `expr` is not a valid expression.

### renameVariableInExpression

    public java.lang.String renameVariableInExpression(java.lang.String expr,
                                                       java.lang.String oldName,
                                                       java.lang.String newName)
                                                throws EvaluatorException

  Update an expression's references to a renamed variable.

  Parameters:
    `expr` - The text of the expression to modify.
    `oldName` - The previous name of the variable.
    `newName` - The new name of the variable.
  Returns:
    The updated expression text.
  Throws:
    EvaluatorException - if `expr` is not a valid expression.

### validateExpression

    public boolean validateExpression(java.lang.String expression,
                                      boolean allowVariables,
                                      FieldInfo fieldInfo,
                                      java.lang.String eventDescriptor)
                               throws EvaluatorException

  Validate an expression.

  Parameters:
    `expression` - The text of the expression to validate.
    `allowVariables` - `true` if the expression allows variables.
    `fieldInfo` - The data field type.
    `eventDescriptor` - The description of the event.
  Returns:
    `true` if the expression is valid.
  Throws:
    EvaluatorException - if `expr` is not a valid expression.

### checkEventKey

    public int checkEventKey(java.lang.String contentType,
                             java.lang.String keyExpr,
                             boolean update)
                      throws WorkflowException

  Ensure that a suitable event key exists. The method calls `PluginTriggerPanel.getEventDescriptor()` and `EventInfo.getFieldInfo()` or `StartInfo.getFieldInfo()` to retrieve the information it requires to check for the existence of a suitable event key, and to create one if necessary. If `update` is `true`, and `keyExpr` is `null`, the user is prompted to supply this value. Otherwise, the method creates a new event key, then displays a notification to that effect. If the event key already exists but `keyExpr` does not match the non-null `keyExpr` supplied by the plug-in, the method updates the event key and notifies the user. It is only legal to call this method while a `PluginTriggerPanel` is displayed.

  Parameters:
    `contentType` - The MIME content type.
    `keyExpr` - The expression to be used to extract the key value from an incoming message of the specified content type and event descriptor. Can be `null`.
    `update` - `true` to create an event key if one does not already exist, or to update an existing one if `keyExpr` is non-null.
  Returns:
    Whether the event already existed or was created. One of: `EVENT_KEY_NOT_EXISTS`, `EVENT_KEY_EXISTS`, `EVENT_KEY_UPDATED`, `EVENT_KEY_CREATED`
  Throws:
    EvaluatorException - If `keyExpr` is non-null but invalid.
    WorkflowException - If a communications error or other exception occurred.
  Since:
    WebLogic Integration 7.0

### getEventDescriptors

    public java.util.Set getEventDescriptors(java.lang.String contentType)
                                      throws WorkflowException

  Return the set of event descriptors referenced by existing event keys. The method returns the set of event descriptor strings currently defined for the specified content type, and is intended for populating lists or combo-boxes.

  Parameters:
    `The` - MIME content type.
  Returns:
    The set of event descriptors, empty if none.
  Throws:
    WorkflowException - If a communications error or other exception occurred.
  Since:
    WebLogic Integration 7.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)