Package org.pentaho.platform.util.web

Examples of org.pentaho.platform.util.web.SimpleUrlFactory


      String xactionStr = ServiceTestHelper.getXAction( SOLUTION_PATH, "test/pojo/pojo5.xaction" );
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "pojo5.xaction", "empty action sequence test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "Action sequence execution failed", runtimeContext.getStatus(),
          IRuntimeContext.RUNTIME_STATUS_SUCCESS );
      IActionParameter param = runtimeContext.getOutputParameter( "output1" );
      assertNotNull( "param is null", param );
View Full Code Here


      PojoComponentTest.validateCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test", "invalid class setting test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "execute was called", false, PojoComponentTest.executeCalled );
      assertEquals( "validate was called", false, PojoComponentTest.validateCalled );
      assertEquals( "Action sequence validation succeeded", runtimeContext.getStatus(),
          IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL );
View Full Code Here

      PojoComponentTest.validateCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test", "invalid class setting test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "execute was called", false, PojoComponentTest.executeCalled );
      assertEquals( "validate was called", false, PojoComponentTest.validateCalled );
      assertEquals( "Action sequence validation succeeded", runtimeContext.getStatus(),
          IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL );
View Full Code Here

      PojoComponentTest.validateCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test", "invalid class setting test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "execute was called", false, PojoComponentTest.executeCalled );
      assertEquals( "validate was not called", true, PojoComponentTest.validateCalled );
      assertEquals( "Action sequence execution succeeded", runtimeContext.getStatus(),
          IRuntimeContext.RUNTIME_STATUS_FAILURE );
View Full Code Here

      PojoComponentTest.validateCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test", "invalid class setting test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "Action sequence succeeded", IRuntimeContext.RUNTIME_STATUS_SUCCESS, runtimeContext.getStatus() );
    } catch ( Exception e ) {
      // we should not get here
      e.printStackTrace();
View Full Code Here

      PojoComponentTest.validateCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test", "invalid class setting test", false, true, null, false, new HashMap(), null, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "Action sequence succeeded", runtimeContext.getStatus(), IRuntimeContext.RUNTIME_STATUS_FAILURE );
    } catch ( Exception e ) {
      // we should not get here
      e.printStackTrace();
View Full Code Here

      PojoComponentTest.setActionSequenceResourceCalled = false;
      IRuntimeContext runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  "test1.xaction", "empty action sequence test", false, true, null, false, new HashMap(), outputHandler, null, new SimpleUrlFactory( "" ), new ArrayList() ); //$NON-NLS-1$ //$NON-NLS-2$
      IActionParameter param = runtimeContext.getOutputParameter( "outputstream" );
      assertNotNull( "RuntimeContext is null", runtimeContext );
      assertEquals( "Action sequence execution failed", runtimeContext.getStatus(),
          IRuntimeContext.RUNTIME_STATUS_SUCCESS );
      assertTrue( "setResource was not called", PojoComponentTest.setResourceInputStreamCalled );
View Full Code Here

                                                    Map<String, IParameterProvider> parameterProviders,
                                                    IPentahoSession userSession, boolean forcePrompt,
                                                    List messages ) throws Exception {
    String processId = XactionUtil.class.getName();
    String instanceId = httpServletRequest.getParameter( "instance-id" ); //$NON-NLS-1$
    SimpleUrlFactory urlFactory = new SimpleUrlFactory( "" ); //$NON-NLS-1$
    ISolutionEngine solutionEngine = PentahoSystem.get( ISolutionEngine.class, userSession );
    ISystemSettings systemSettings = PentahoSystem.getSystemSettings();

    if ( solutionEngine == null ) {
      throw new ObjectFactoryException( "No Solution Engine" );
View Full Code Here

      outputHandler.setSession( userSession );

      IMimeTypeListener listener = new HttpMimeTypeListener( request, response );
      listener.setName( fileName );
      outputHandler.setMimeTypeListener( listener );
      SimpleUrlFactory urlFactory =
          new SimpleUrlFactory( requestContext.getContextPath()
            + "SolutionEngineInteractivityService?" ); //$NON-NLS-1$
      IParameterProvider requestParameters = new HttpRequestParameterProvider( request );
      setupOutputHandler( outputHandler, requestParameters );
      HttpServletRequestHandler requestHandler =
          getRequestHandler( request, response, userSession, requestParameters, outputStream,
View Full Code Here

    solutionEngine.init( pentahoSession );

    IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
    String contextPath = requestContext.getContextPath();

    IPentahoUrlFactory urlFactory = new SimpleUrlFactory( contextPath ); //$NON-NLS-1$

    IRuntimeContext runtime;
    IParameterProvider requestParmProvider = parameterProviders.get( "request" );
    if ( requestParmProvider.hasParameter( "obj_id" ) ) {
View Full Code Here

TOP

Related Classes of org.pentaho.platform.util.web.SimpleUrlFactory

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.