Package org.pentaho.actionsequence.dom

Examples of org.pentaho.actionsequence.dom.IActionInput


      result = false;
    } else if ( !initialize() ) {
      result = false;
    } else {
      MQLAction mqlAction = (MQLAction) getActionDefinition();
      IActionInput query = mqlAction.getQuery();
      result = ( query != ActionInputConstant.NULL_INPUT );
    }

    return result;
  }
View Full Code Here


  }

  private boolean executeCopyAction( final CopyParamAction copyParamAction ) {
    boolean result = true;

    IActionInput actionInput = copyParamAction.getCopyFrom();
    IActionOutput actionOutput = copyParamAction.getOutputCopy();

    if ( ( actionInput instanceof ActionInput ) && ( actionOutput != null ) ) {
      try {
        actionOutput.setValue( actionInput.getValue() );
      } catch ( Exception ex ) {
        result = false;
      }
    }
View Full Code Here

    }
    return result;
  }

  private boolean executeGetMapValuesAction( final PrintMapValsAction getMapValsAction ) {
    IActionInput propertyMap = getMapValsAction.getPropertyMap();
    IActionInput[] keys = getMapValsAction.getKeys();
    boolean result = true;
    try {
      if ( !( propertyMap.getValue() instanceof Map ) ) {
        error( Messages.getInstance().getErrorString( "UtilityComponent.ERROR_0004_PARAMETER_NOT_MAP", "property-map" ) ); //$NON-NLS-1$ //$NON-NLS-2$
        result = false;
      } else {
        Map srcMap = (Map) propertyMap.getValue();
        for ( IActionInput element : keys ) {
          String key = element.getStringValue();
          getMapValsAction.getOutput( key ).setValue( srcMap.get( key ) );
        }
      }
View Full Code Here

    IActionDefinition actionDefinition = getActionDefinition();
    String actionName = getActionName();

    if ( actionDefinition instanceof AbstractRelationalDbAction ) {
      AbstractRelationalDbAction relationalDbAction = (AbstractRelationalDbAction) actionDefinition;
      IActionInput query = relationalDbAction.getQuery();
      IActionInput dbUrl = relationalDbAction.getDbUrl();
      IActionInput jndi = relationalDbAction.getJndi();

      IActionInput sharedConnection = relationalDbAction.getSharedConnection();
      if ( query == ActionInputConstant.NULL_INPUT ) {

        error( Messages.getInstance().getErrorString( "SQLBaseComponent.ERROR_0001_QUERY_NOT_SPECIFIED", actionName ) ); //$NON-NLS-1$
        result = false;
      }

      if ( ( jndi == ActionInputConstant.NULL_INPUT ) && ( dbUrl == ActionInputConstant.NULL_INPUT )
          && ( sharedConnection == ActionInputConstant.NULL_INPUT ) ) {
        error( Messages.getInstance().getErrorString(
          "SQLBaseComponent.ERROR_0002_CONNECTION_NOT_SPECIFIED", actionName ) ); //$NON-NLS-1$
        result = false;
      }
    } else if ( actionDefinition instanceof SqlConnectionAction ) {
      SqlConnectionAction sqlConnectionAction = (SqlConnectionAction) actionDefinition;
      IActionInput dbUrl = sqlConnectionAction.getDbUrl();
      IActionInput jndi = sqlConnectionAction.getJndi();
      if ( ( jndi == ActionInputConstant.NULL_INPUT ) && ( dbUrl == ActionInputConstant.NULL_INPUT ) ) {
        error( Messages.getInstance().getErrorString(
          "SQLBaseComponent.ERROR_0002_CONNECTION_NOT_SPECIFIED", actionName ) ); //$NON-NLS-1$
        result = false;
      }
View Full Code Here

    try {

      if ( actionDefinition instanceof AbstractRelationalDbAction ) {
        AbstractRelationalDbAction relationalDbAction = (AbstractRelationalDbAction) actionDefinition;
        // Added by Arijit Chatterjee
        IActionInput queryTimeoutInput = relationalDbAction.getQueryTimeout();
        IActionInput maxRowsInput = relationalDbAction.getMaxRows();
        IActionInput readOnlyInput = relationalDbAction.getReadOnly();

        String baseQuery = getQuery();
        if ( baseQuery == null ) {
          error( Messages.getInstance().getErrorString(
              "SQLBaseComponent.ERROR_0001_QUERY_NOT_SPECIFIED", actionDefinition.getDescription() ) ); //$NON-NLS-1$
          return false;
        }

        IPreparedComponent sharedConnection = (IPreparedComponent) relationalDbAction.getSharedConnection().getValue();

        if ( readOnlyInput != ActionInputConstant.NULL_INPUT ) {
          this.setReadOnly( readOnlyInput.getBooleanValue() );
        }

        if ( sharedConnection != null ) {
          connectionOwner = false;
          IPentahoConnection conn = sharedConnection.shareConnection();
View Full Code Here

          "ComponentBase.ERROR_0001_UNKNOWN_ACTION_TYPE", getActionDefinition().getElement().asXML() ) ); //$NON-NLS-1$
      result = false;
    } else {
      EmailAction emailAction = (EmailAction) getActionDefinition();

      IActionInput to = emailAction.getTo();
      IActionInput subject = emailAction.getSubject();
      IActionInput plainMsg = emailAction.getMessagePlain();
      IActionInput htmlMsg = emailAction.getMessageHtml();

      if ( to == ActionInputConstant.NULL_INPUT ) {
        error( Messages.getInstance().getErrorString( "Email.ERROR_0001_TO_NOT_DEFINED", getActionName() ) ); //$NON-NLS-1$
        result = false;
      } else if ( subject == ActionInputConstant.NULL_INPUT ) {
View Full Code Here

      XQueryAction xQueryAction = (XQueryAction) actionDefinition;

      // Not implemented yet
      // IActionInput queryTimeoutInput = xQueryAction.getQueryTimeout();

      IActionInput maxRowsInput = xQueryAction.getMaxRows();
      if ( maxRowsInput != ActionInputConstant.NULL_INPUT ) {
        this.setMaxRows( maxRowsInput.getIntValue() );
      }

      IPreparedComponent sharedConnection = (IPreparedComponent) xQueryAction.getSharedConnection().getValue();
      if ( sharedConnection != null ) {
        connectionOwner = false;
View Full Code Here

TOP

Related Classes of org.pentaho.actionsequence.dom.IActionInput

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.