Search in sources :

Example 1 with FormatMsgAction

use of org.pentaho.actionsequence.dom.actions.FormatMsgAction in project pentaho-platform by pentaho.

the class UtilityComponent method executeAction.

/*
   * (non-Javadoc)
   * 
   * @see org.pentaho.component.ComponentBase#execute()
   */
@Override
protected boolean executeAction() {
    IActionDefinition actionDefinition = getActionDefinition();
    // Make sure we start with an empty list in
    tmpOutputs = new HashMap();
    boolean result = true;
    if (actionDefinition instanceof CopyParamAction) {
        executeCopyAction((CopyParamAction) actionDefinition);
    } else if (actionDefinition instanceof FormatMsgAction) {
        executeFormatAction((FormatMsgAction) actionDefinition);
    } else if (actionDefinition instanceof PrintMapValsAction) {
        executeGetMapValuesAction((PrintMapValsAction) actionDefinition);
    } else if (actionDefinition instanceof PrintParamAction) {
        executePrintParamAction((PrintParamAction) actionDefinition);
    } else {
        // This component allows multiple actions to be defined in a single action definition.
        // While this is no longer supported by the design studio, it needs to be supported here
        // for backwards compatibility with older action sequence documents.
        result = executeAction(actionDefinition);
    }
    return result;
// this iteration
}
Also used : PrintMapValsAction(org.pentaho.actionsequence.dom.actions.PrintMapValsAction) IActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition) HashMap(java.util.HashMap) PrintParamAction(org.pentaho.actionsequence.dom.actions.PrintParamAction) FormatMsgAction(org.pentaho.actionsequence.dom.actions.FormatMsgAction) CopyParamAction(org.pentaho.actionsequence.dom.actions.CopyParamAction)

Example 2 with FormatMsgAction

use of org.pentaho.actionsequence.dom.actions.FormatMsgAction in project pentaho-platform by pentaho.

the class UtilityComponent method validateAction.

@Override
protected boolean validateAction() {
    boolean result = true;
    IActionDefinition actionDefinition = getActionDefinition();
    if (actionDefinition instanceof CopyParamAction) {
        result = validateCopyAction((CopyParamAction) actionDefinition);
    } else if (actionDefinition instanceof FormatMsgAction) {
        result = validateFormatAction((FormatMsgAction) actionDefinition);
    } else if (actionDefinition instanceof PrintMapValsAction) {
        result = validateGetMapValuesAction((PrintMapValsAction) actionDefinition);
    } else if (actionDefinition instanceof PrintParamAction) {
        result = validatePrintParamAction((PrintParamAction) actionDefinition);
    } else {
        // This component allows multiple actions to be defined in a single action definition.
        // While this is no longer supported by the design studio, it needs to be supported here
        // for backwards compatibility with older action sequence documents.
        result = validateAction(actionDefinition);
    }
    return result;
}
Also used : PrintMapValsAction(org.pentaho.actionsequence.dom.actions.PrintMapValsAction) IActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition) PrintParamAction(org.pentaho.actionsequence.dom.actions.PrintParamAction) FormatMsgAction(org.pentaho.actionsequence.dom.actions.FormatMsgAction) CopyParamAction(org.pentaho.actionsequence.dom.actions.CopyParamAction)

Aggregations

IActionDefinition (org.pentaho.actionsequence.dom.IActionDefinition)2 CopyParamAction (org.pentaho.actionsequence.dom.actions.CopyParamAction)2 FormatMsgAction (org.pentaho.actionsequence.dom.actions.FormatMsgAction)2 PrintMapValsAction (org.pentaho.actionsequence.dom.actions.PrintMapValsAction)2 PrintParamAction (org.pentaho.actionsequence.dom.actions.PrintParamAction)2 HashMap (java.util.HashMap)1