Package org.pentaho.platform.engine.core.output

Examples of org.pentaho.platform.engine.core.output.MultiContentItem


          "RuntimeContext.ERROR_0021_INVALID_OUTPUT_REQUEST", outputName, actionSequence.getSequenceName() ) ); //$NON-NLS-1$
    } else {
      List destinationsList = parameter.getVariables();
      Iterator destinationsIterator = destinationsList.iterator();
      if ( destinationsList.size() > 1 ) {
        contentItem = new MultiContentItem();
      }
      while ( destinationsIterator.hasNext() ) {
        ActionParameterSource destination = (ActionParameterSource) destinationsIterator.next();

        String objectName = destination.getSourceName();
View Full Code Here


    ByteArrayOutputStream out2 = new ByteArrayOutputStream();

    SimpleContentItem item1 = new SimpleContentItem( out1 );
    SimpleContentItem item2 = new SimpleContentItem( out2 );

    MultiContentItem multiContent = new MultiContentItem();
    multiContent.addContentItem( item1 );
    multiContent.addContentItem( item2 );

    byte[] in = "abcd".getBytes();
    String outStr1 = "";
    String outStr2 = "";

    try {
      OutputStream multi = multiContent.getOutputStream( "" );
      multi.write( 'a' );
      multi.write( in, 1, 2 );
      multi.write( in );
      multiContent.closeOutputStream();
    } catch ( IOException e ) {
      // we should not get here
      assertEquals( "IOException", null, e );
    }
    outStr1 = new String( out1.toByteArray() );
View Full Code Here

    OutputStream out2 = new MockExceptionOutputStream();

    SimpleContentItem item1 = new SimpleContentItem( out1 );
    SimpleContentItem item2 = new SimpleContentItem( out2 );

    MultiContentItem multiContent = new MultiContentItem();
    multiContent.addContentItem( item1 );
    multiContent.addContentItem( item2 );

    byte[] in = "abcd".getBytes();
    String outStr1 = "";
    String outStr2 = "";

    try {
      OutputStream multi = multiContent.getOutputStream( "" );
      multi.write( 'a' );
      // we should not get here
      assertFalse( "IOException expected", true );
    } catch ( IOException e ) {
      assertNotNull( "IOException expected", e );
    }
    try {
      multiContent.closeOutputStream();
    } catch ( Exception e ) {
      // we should not get here
      assertEquals( "IOException", null, e );
    }
    outStr1 = new String( out1.toByteArray() );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.engine.core.output.MultiContentItem

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.