Package org.pentaho.actionsequence.dom.actions

Examples of org.pentaho.actionsequence.dom.actions.TemplateMsgAction


  @Override
  protected boolean validateAction() {

    // see if we have a template defined
    TemplateMsgAction actionDefinition = (TemplateMsgAction) getActionDefinition();

    boolean templateOk = false;
    if ( null != actionDefinition.getTemplate() ) {
      templateOk = true;
    } else if ( isDefinedResource( TemplateComponent.TEMPLATE ) ) {
      templateOk = true;
    }
View Full Code Here


  @Override
  protected boolean executeAction() {

    try {

      TemplateMsgAction actionDefinition = (TemplateMsgAction) getActionDefinition();
      String template = null;

      template = actionDefinition.getTemplate().getStringValue();
      if ( ( null == template ) && isDefinedResource( TemplateComponent.TEMPLATE ) ) {
        IActionSequenceResource resource = getResource( "template" ); //$NON-NLS-1$
        template = getResourceAsString( resource );
      }

      String outputName = (String) getOutputNames().iterator().next();
      IActionParameter outputParam = getOutputItem( outputName );

      if ( outputParam.getType().equals( IActionParameter.TYPE_CONTENT ) ) {

        String mimeType = actionDefinition.getMimeType().getStringValue();
        String extension = actionDefinition.getExtension().getStringValue();

        // This would prevent null values being passed as parameters to getOutputItem
        if ( mimeType == null ) {
          mimeType = ""; //$NON-NLS-1$
        }
View Full Code Here

TOP

Related Classes of org.pentaho.actionsequence.dom.actions.TemplateMsgAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.