Package org.pentaho.actionsequence.dom

Examples of org.pentaho.actionsequence.dom.IActionDefinition


              List actionDefinitionsList = actionSequence.getActionDefinitionsAndSequences();
              int i = 0;
              boolean done = false;

              while ( ( actionDefinitionsList.size() > i ) && !done ) {
                IActionDefinition actionDefinition = (IActionDefinition) actionDefinitionsList.get( i );
                String componentName = actionDefinition.getComponentName();
                if ( ( componentName != null ) && ( componentName.length() > 0 ) ) {
                  fileName = componentName;
                  done = true;
                } else {
                  i++;
View Full Code Here


  private static final long serialVersionUID = 2100433825305016185L;

  @Override
  public IActionDefinition getActionDefinition() {

    IActionDefinition generic = super.getActionDefinition();

    ActionSequenceParameterMgr paramMgr = new ActionSequenceParameterMgr( getRuntimeContext(), getSession() );

    SqlDataAction action = new SqlDataAction( generic.getElement(), paramMgr );

    return action;
  }
View Full Code Here

  }

  @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 ) {
View Full Code Here

   *
   * @see org.pentaho.component.ComponentBase#execute()
   */
  @Override
  protected boolean executeAction() {
    IActionDefinition actionDefinition = getActionDefinition();
    tmpOutputs = new HashMap(); // Make sure we start with an empty list in
    boolean result = true;
    if ( actionDefinition instanceof CopyParamAction ) {
      executeCopyAction( (CopyParamAction) actionDefinition );
    } else if ( actionDefinition instanceof FormatMsgAction ) {
View Full Code Here

          List actionDefinitionsList = actionSequence.getActionDefinitionsAndSequences();
          int i = 0;
          boolean done = false;

          while ( ( actionDefinitionsList.size() > i ) && ( !done ) ) {
            IActionDefinition actionDefinition = (IActionDefinition) actionDefinitionsList.get( i );
            String componentName = actionDefinition.getComponentName();
            if ( ( componentName != null ) && ( componentName.length() > 0 ) ) {
              fileName = componentName;
              done = true;
            } else {
              ++i;
View Full Code Here

   */
  @Override
  public boolean validateAction() {
    boolean result = true;

    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;
      }
    } else {
      error( Messages.getInstance().getErrorString(
          "ComponentBase.ERROR_0001_UNKNOWN_ACTION_TYPE", actionDefinition.getElement().asXML() ) ); //$NON-NLS-1$
      result = false;
    }
    return result;
  }
View Full Code Here

   * the query but delay execution.
   *
   */
  @Override
  protected boolean executeAction() {
    IActionDefinition actionDefinition = getActionDefinition();
    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();

View Full Code Here

          warn( Messages.getInstance().getString( "SQLBaseComponent.WARN_FALL_BACK_TO_NONSCROLLABLE" ) ); //$NON-NLS-1$
        }
      }

      boolean live = true;
      IActionDefinition actionDefinition = getActionDefinition();
      if ( actionDefinition instanceof AbstractRelationalDbAction ) {
        AbstractRelationalDbAction relationalDbAction = (AbstractRelationalDbAction) actionDefinition;
        live = relationalDbAction.getLive().getBooleanValue( false );
      }
View Full Code Here

            List actionDefinitionsList = actionSequence.getActionDefinitionsAndSequences();
            int i = 0;
            boolean done = false;

            while ( ( actionDefinitionsList.size() > i ) && !done ) {
              IActionDefinition actionDefinition = (IActionDefinition) actionDefinitionsList.get( i );
              String componentName = actionDefinition.getComponentName();
              if ( ( componentName != null ) && ( componentName.length() > 0 ) ) {
                fileName = componentName;
                done = true;
              } else {
                i++;
View Full Code Here

  }

  @Override
  protected boolean validateAction() {
    boolean result = false;
    IActionDefinition actionDefinition = getActionDefinition();

    if ( actionDefinition instanceof XQueryAction ) {
      XQueryAction xQueryAction = (XQueryAction) actionDefinition;
      if ( ( xQueryAction.getSourceXml() == ActionInputConstant.NULL_INPUT )
        && ( xQueryAction.getXmlDocument() == null ) ) {
        error( Messages.getInstance()
          .getString( "XQueryBaseComponent.ERROR_0008_SOURCE_NOT_DEFINED", getActionName() ) ); //$NON-NLS-1$
      } else if ( xQueryAction.getQuery() == ActionInputConstant.NULL_INPUT ) {
        error( Messages.getInstance().getErrorString(
          "XQueryBaseComponent.ERROR_0001_QUERY_NOT_SPECIFIED", getActionName() ) ); //$NON-NLS-1$
      } else if ( ( xQueryAction.getOutputPreparedStatement() == null ) && ( xQueryAction.getOutputResultSet()
        == null ) ) {
        error( Messages.getInstance().getErrorString(
          "XQueryBaseComponent.ERROR_0003_OUTPUT_NOT_SPECIFIED", getActionName() ) ); //$NON-NLS-1$
      } else {
        result = true;
      }
    } else if ( actionDefinition instanceof XQueryConnectionAction ) {
      XQueryConnectionAction xQueryConnectionAction = (XQueryConnectionAction) actionDefinition;
      if ( xQueryConnectionAction.getOutputConnection() == null ) {
        error( Messages.getInstance().getErrorString(
          "XQueryBaseComponent.ERROR_0003_OUTPUT_NOT_SPECIFIED", getActionName() ) ); //$NON-NLS-1$
      } else {
        result = true;
      }
    } else {
      error( Messages.getInstance().getErrorString(
        "ComponentBase.ERROR_0001_UNKNOWN_ACTION_TYPE", actionDefinition.getElement().asXML() ) ); //$NON-NLS-1$
    }
    return result;
  }
View Full Code Here

TOP

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

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.