Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.IActionParameter


    while ( it.hasNext() ) {
      String paramName = (String) it.next();
      Object paramValue = getInputValue( paramName );
      if ( ( paramValue == null ) || ( "".equals( paramValue ) ) ) //$NON-NLS-1$
      {
        IActionParameter paramParameter = getInputParameter( paramName );
        if ( paramParameter.getPromptStatus() == IActionParameter.PROMPT_PENDING ) {
          parameterUINeeded = true;
          continue;
        }
        if ( isParameterUIAvailable() ) {
          // The parameter value was not provided, and we are allowed
View Full Code Here


            // now grab any outputs
            Iterator outputNameIterator = context.getOutputNames().iterator();
            while ( outputNameIterator.hasNext() ) {

              String attributeName = (String) outputNameIterator.next();
              IActionParameter output = context.getOutputParameter( attributeName );

              Object data = output.getValue();
              if ( data != null ) {
                session.removeAttribute( attributeName );
                session.setAttribute( attributeName, data );
              }
            }
View Full Code Here

            // now grab any outputs
            Iterator outputNameIterator = context.getOutputNames().iterator();
            while ( outputNameIterator.hasNext() ) {

              String attributeName = (String) outputNameIterator.next();
              IActionParameter output = context.getOutputParameter( attributeName );

              Object data = output.getValue();
              if ( data != null ) {
                PentahoSystem.globalAttributes.remove( attributeName );
                PentahoSystem.globalAttributes.put( attributeName, data );
              }
            }
View Full Code Here

  public void testRSCompareOK() {
    startTest();
    IRuntimeContext context = run( "/samples/rules/ResultSetTest.xaction" );
    assertEquals( IRuntimeContext.RUNTIME_STATUS_SUCCESS, context.getStatus() );
    IActionParameter rtn = context.getOutputParameter( "COMPARERESULT" );
    assertNotNull( rtn );
    String compareResult = rtn.getStringValue();
    assertEquals( compareResult, "No Mismatches" );
    finishTest();
  }
View Full Code Here

    if ( isDefinedResource( AbstractJFreeReportComponent.REPORTGENERATEDEFN_REPORTDEFN ) ) {
      return true;
    }

    if ( isDefinedInput( AbstractJFreeReportComponent.REPORTGENERATEDEFN_REPORTDEFN ) ) {
      IActionParameter o = getInputParameter( AbstractJFreeReportComponent.REPORTGENERATEDEFN_REPORTDEFN );
      if ( ( o != null ) && ( o.getValue() instanceof String ) ) {
        return true;
      }
      return false;
    }
View Full Code Here

  private MasterReport getReportFromInputParam() throws ResourceException, UnsupportedEncodingException, IOException {
    MasterReport report = null;

    if ( isDefinedInput( AbstractJFreeReportComponent.REPORTGENERATEDEFN_REPORTDEFN ) ) {
      IActionParameter o = getInputParameter( AbstractJFreeReportComponent.REPORTGENERATEDEFN_REPORTDEFN );
      if ( o != null ) {
        String repDef = o.getStringValue();
        ReportGenerator generator = ReportGenerator.getInstance();
        IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
        URL url = null;
        try {
          url = new URL( requestContext.getContextPath() );
View Full Code Here

      return null;
    }

    if ( actionOutput != null ) {
      if ( context.getOutputNames().contains( actionOutput ) ) {
        IActionParameter output = context.getOutputParameter( actionOutput );
        IPentahoResultSet results = output.getValueAsResultSet();
        if ( results != null ) {
          results = results.memoryCopy();
        }
        return results;
      } else {
        // this is an error
        return null;
      }
    } else {
      for ( Object objAp : context.getOutputNames() ) {
        IActionParameter output = (IActionParameter) objAp;
        if ( output.getType().equalsIgnoreCase( IActionParameter.TYPE_RESULT_SET ) ) {
          IPentahoResultSet results = output.getValueAsResultSet();
          if ( results != null ) {
            results = results.memoryCopy();
          }
          return results;
        }
View Full Code Here

    IRuntimeContext context =
        run( "/test/platform/ContentOutputTest.xaction", parameterProvider, testName, CO_TEST_EXTN ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_STATUS_SUCCESS, context.getStatus() ); //$NON-NLS-1$

    IActionParameter rtn = context.getOutputParameter( "content" ); //$NON-NLS-1$
    assertNotNull( rtn );
    InputStream is = this.getInputStreamFromOutput( testName, CO_TEST_EXTN );
    assertNotNull( is ); // Did the test execute properly...
    String lookingFor = "This is sample output from the content-output component."; //$NON-NLS-1$
    String wasRead = FileHelper.getStringFromInputStream( is );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.IActionParameter

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.