com.pega.pegarules.pub.services
Interface MetadataConverterPlugin


public interface MetadataConverterPlugin

This interface must be implemented by any class referenced by a Data-Admin-MetadataConverter instance. It is assumed that a class implementing this interface is used in an interactive environment and therefore this interface provides methods that must be invoked in a particular order to guide an interactive user through the process of metadata conversion 1. After an instance of the converter is created there are certain parameters that should be set before the processing can continue, These parameter names and descriptions can be retrieved via 'getInitParameterDescriptions' method and they should be set via 'addParameters' method 2. After that the 'getLookupParameters' method should be executed to retrieve a list of the lookup parameters For each lookup parameter a 'getLookupParameterValues' method should be executed to obtain lookup parameter value(s). NOTE that this method should be invoked for each lookup parameter in the same order the lookup parameters are listed by the 'getLookupParameters' method. A helper method 'getLookupParameterDescription' can be used to obtain description of the specified lookup parameter 3. 'getProcessingParameterDescription' should be called to obtain descriptions of the remaining converter parameters. These parameters may be set via 'addParameters' method or as the first parameter of the 'convert' method.

Version:
$Revision: 31 $ $Date: 2009-06-24 09:38:04 -0400 (Wed, 24 Jun 2009) $
Author:
David Dority

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Method Summary
 void addLookupParameter(java.lang.String aParamName, java.util.List aValues)
          Add lookup parameter
 void addParameters(java.util.HashMap aParameters)
          add converter input parameters.
 void convert(java.util.HashMap aConversionParams, java.io.Writer aWriter)
          This method converts an input object into a metadata document.
 java.lang.String getHelpURI(java.lang.String aStepName)
          Allows you to obtain the URI of a help file within the Pega-Online help.
 java.util.HashMap getInitialParameterAlternativeMarkup()
          This method returns a HashMap which contains alternative HTML markup any-combination-of/all-of the initial parameters.
 java.util.HashMap getInitialParameterDefaultValues()
          Returns a HashMap containing default values for the initial parameters.
 java.util.HashMap getInitParameterDescriptions()
          get initialization parameter descriptions
 java.util.HashMap getInitParameterFriendlyNames()
          Get the 'human readable' names for the initial parameters.
 java.lang.String getInstructions(java.lang.String aStepName)
          Allows you to get the instructions for the user.
 java.lang.String getLookupParameterDescription(java.lang.String aLookupParameterName)
          Get lookup parameter description
 java.lang.String[] getLookupParameters()
          get lookup parameters
 java.util.List getLookupParameterValues(java.lang.String aLookupParameterName)
          Get lookup parameter values this method should be called for every lookup parameter AND IN THE SAME order as returned by the 'getLookupParameters' method
 java.lang.String getPluginInfo()
          Get this converter description.
 java.util.HashMap getProcessingParameterAlternativeMarkup()
          This method returns a HashMap which contains alternative HTML markup any-combination-of/all-of the processing parameters.
 java.util.HashMap getProcessingParameterDefaultValues()
          Returns a HashMap containing default values for the initial parameters.
 java.util.HashMap getProcessingParameterDescriptions()
          Get processing parameter descriptions
 java.util.HashMap getProcessingParameterFriendlyNames()
          Get the 'human readable' names for the processing parameters.
 java.util.List getRequiredInitParameters()
          Retrieves a list of the initial parameter keys that are meant to be required parameters.
 java.util.List getRequiredProcessingParameters()
          Retrieves a list of the processing parameter keys that are meant to be required parameters.
 java.lang.String getTargetFormat()
          Get the output document type
 boolean LookupParameterHasMultipleValues(java.lang.String aLookupParameterName)
          Can lookup parameter have multiple values
 boolean moreProcessingParameters(java.util.HashMap aProcssingParams)
          Returns true iff plugin requires caller to enter additional processing parameters.
 void setPRAPIHandle(java.lang.Object aPRAPIHandle)
          Set PegaRules Public API handle
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

setPRAPIHandle

void setPRAPIHandle(java.lang.Object aPRAPIHandle)
Set PegaRules Public API handle

Parameters:
aPRAPIHandle - a handle to PegaRules Public APIs.

addParameters

void addParameters(java.util.HashMap aParameters)
                   throws java.lang.Exception
add converter input parameters.

Parameters:
aParameters - A HashMap containing parameters and their values.
Throws:
java.lang.Exception - if a parameter name is not valid

addLookupParameter

void addLookupParameter(java.lang.String aParamName,
                        java.util.List aValues)
                        throws java.lang.Exception
Add lookup parameter

Parameters:
aParamName -
aValues -
Throws:
java.lang.Exception - if a lookup parameter name is not valid

convert

void convert(java.util.HashMap aConversionParams,
             java.io.Writer aWriter)
             throws java.lang.Exception
This method converts an input object into a metadata document.

Parameters:
aConversionParams - A HashMap containing conversion parameters .
aWriter - The output Writer object to write the document to.
Throws:
java.lang.Exception - if a required parameter is missing or a conversion source object is not acessible

getInitParameterDescriptions

java.util.HashMap getInitParameterDescriptions()
get initialization parameter descriptions

Returns:
a HashMap containing initialization parameter names and descriptions.

getInitParameterFriendlyNames

java.util.HashMap getInitParameterFriendlyNames()
Get the 'human readable' names for the initial parameters.

Returns:
A HashMap containing human readable names keyed by the parameter names.

getLookupParameters

java.lang.String[] getLookupParameters()
get lookup parameters

Returns:
an array of lookup parameter names .

getLookupParameterDescription

java.lang.String getLookupParameterDescription(java.lang.String aLookupParameterName)
                                               throws java.lang.Exception
Get lookup parameter description

Parameters:
aLookupParameterName -
Returns:
the descrption of the specified lookup parameter.
Throws:
java.lang.Exception - if a lookup parameter name is not valid

getProcessingParameterDescriptions

java.util.HashMap getProcessingParameterDescriptions()
Get processing parameter descriptions

Returns:
a HashMap containing processsing parameter names and descriptions.

getProcessingParameterFriendlyNames

java.util.HashMap getProcessingParameterFriendlyNames()
Get the 'human readable' names for the processing parameters.

Returns:
A HashMap containing human readable names keyed by the parameter names.

getLookupParameterValues

java.util.List getLookupParameterValues(java.lang.String aLookupParameterName)
                                        throws java.lang.Exception
Get lookup parameter values this method should be called for every lookup parameter AND IN THE SAME order as returned by the 'getLookupParameters' method

Parameters:
aLookupParameterName -
Returns:
a list of the lookup parameter values.
Throws:
java.lang.Exception - if a parameter name is invalid or a conversion source object is not acessible

getPluginInfo

java.lang.String getPluginInfo()
Get this converter description.

Returns:
the converter description.

getTargetFormat

java.lang.String getTargetFormat()
Get the output document type

Returns:
the type of the document this converter produces.

LookupParameterHasMultipleValues

boolean LookupParameterHasMultipleValues(java.lang.String aLookupParameterName)
                                         throws java.lang.Exception
Can lookup parameter have multiple values

Parameters:
aLookupParameterName -
Returns:
true if lookup parameter can have muliple values .
Throws:
java.lang.Exception - if a lookup parameter name is not valid

moreProcessingParameters

boolean moreProcessingParameters(java.util.HashMap aProcssingParams)
                                 throws java.lang.Exception
Returns true iff plugin requires caller to enter additional processing parameters. The caller must invoke this method.after calling getProcessingParameterDescriptions and addParameters If this method returns true, the caller must invoke getProcessingParameterDescriptions and addParameters again The 'convert' method must be called only after this method returns false.

Parameters:
aProcssingParams - a HashMap containing processing(conversion) parameters and their values.
Returns:
true if this plugin needs more processing parameters
Throws:
java.lang.Exception

getRequiredInitParameters

java.util.List getRequiredInitParameters()
Retrieves a list of the initial parameter keys that are meant to be required parameters.

Returns:
A java.util.List containing a the initial parameter keys that a required parameters.

getRequiredProcessingParameters

java.util.List getRequiredProcessingParameters()
Retrieves a list of the processing parameter keys that are meant to be required parameters.

Returns:
A java.util.List containing a the initial processing keys that a required parameters.

getInstructions

java.lang.String getInstructions(java.lang.String aStepName)
                                 throws java.lang.Exception
Allows you to get the instructions for the user.

Parameters:
aStepName - The value is either one of the lookup parameter names, "INITIAL_PAMAETERS" (for specifying the initial parameter step), or "PROCESSING_PARAMETERS" (for specifying the processing parameters).
Returns:
The help URI.
Throws:
java.lang.Exception

getHelpURI

java.lang.String getHelpURI(java.lang.String aStepName)
                            throws java.lang.Exception
Allows you to obtain the URI of a help file within the Pega-Online help. Non-pega implementors should return "" or null.

Parameters:
aStepName - The value is either one of the lookup parameter names, "INITIAL_PAMAETERS" (for specifying the initial parameter step), or "PROCESSING_PARAMETERS" (for specifying the processing parameters).
Returns:
The help URI.
Throws:
java.lang.Exception

getInitialParameterAlternativeMarkup

java.util.HashMap getInitialParameterAlternativeMarkup()
This method returns a HashMap which contains alternative HTML markup any-combination-of/all-of the initial parameters.

Returns:
A HashMap containing alternate markup or null.

getProcessingParameterAlternativeMarkup

java.util.HashMap getProcessingParameterAlternativeMarkup()
This method returns a HashMap which contains alternative HTML markup any-combination-of/all-of the processing parameters.

Returns:
A HashMap containing alternate markup or null.

getInitialParameterDefaultValues

java.util.HashMap getInitialParameterDefaultValues()
Returns a HashMap containing default values for the initial parameters.

Returns:
HashMap containing default initial paremeter values or null.

getProcessingParameterDefaultValues

java.util.HashMap getProcessingParameterDefaultValues()
Returns a HashMap containing default values for the initial parameters.

Returns:
HashMap containing default initial paremeter values or null.


Copyright © 2012 Pegasystems Inc. All Rights Reserved.