Package org.pentaho.platform.api.engine

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


    // the defaults include http so we are good to go
  }

  @Override
  protected void addServiceEndPoints( AxisService axisService ) {
    IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
    String endPoint1 = requestContext.getContextPath() + "content/ws-run/" + axisService.getName(); //$NON-NLS-1$
    axisService.setEPRs( new String[] { endPoint1 } );
  }
View Full Code Here


                }
              }
            }
          }
        }
        IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
        HttpOutputHandler outputHandler = createOutputHandler( response, outputStream );
        outputHandler.setSession( userSession );

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

        // Build string
        while ( ( c = is.read() ) >= 0 ) {
          sb.append( (char) c );
        }

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

        String flashContent =
          ChartBeansGeneratorUtil
            .mergeOpenFlashChartHtmlTemplate( sb.toString().replaceAll( "\"", "\\\\\"" ), //$NON-NLS-1$ //$NON-NLS-2$
              contextPath + "/" + this.getSwfPath() + "/" + getSwfName() ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
View Full Code Here

      solutionEngine = PentahoSystem.get( ISolutionEngine.class, session );
      solutionEngine.init( session );
      solutionEngine.setlistener( execListener );

      SimpleParameterProvider parameterProvider = new SimpleParameterProvider( parameters );
      IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
      String url = requestContext.getContextPath();
      // Modifications by Ezequiel Cuellar
      // Old code.
      // String baseUrl = PentahoSystem.getApplicationContext().getBaseUrl();
      // New code. Since the SubActionComponent is being instantiated below to return feedback
      // it is necesary to configure the baseUrl to include the ViewAction.
View Full Code Here

    // add the runtime context so that PentahoResourceData class can get access to the solution repo
    // generator.setObject(PentahoResourceData.PENTAHO_RUNTIME_CONTEXT_KEY, getRuntimeContext());

    URL url = null;
    IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
    try {
      url = new URL( requestContext.getContextPath() ); //$NON-NLS-1$ //$NON-NLS-2$
    } catch ( Exception e ) {
      // a null URL is ok
      warn( Messages.getInstance().getString( "JFreeReportLoadComponent.WARN_COULD_NOT_CREATE_URL" ) ); //$NON-NLS-1$
    }
View Full Code Here

  @Override
  public Document getXmlContent() {

    // Create a document that describes the result
    Document result = DocumentHelper.createDocument();
    IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
    setXslProperty( "baseUrl", requestContext.getContextPath() ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    setXslProperty( "fullyQualifiedServerUrl", PentahoSystem.getApplicationContext().getFullyQualifiedServerURL() ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    String mapName = "chart" + AbstractChartComponent.chartCount++; //$NON-NLS-1$
    Document chartDefinition = jcrHelper.getSolutionDocument( definitionPath, RepositoryFilePermission.READ );

    if ( chartDefinition == null ) {
View Full Code Here

  @Override
  public Document getXmlContent() {

    // Create a document that describes the result
    Document result = DocumentHelper.createDocument();
    IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
    String contextPath = requestContext.getContextPath();

    setXslProperty( "baseUrl", contextPath + "/" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    String mapName = "chart" + AbstractChartComponent.chartCount++; //$NON-NLS-1$
    Document chartDefinition = jcrHelper.getSolutionDocument( definitionPath, RepositoryFilePermission.READ );
View Full Code Here

      SimpleParameterProvider parameterProvider = new SimpleParameterProvider( parameters );

      HashMap<String, IParameterProvider> parameterProviderMap = new HashMap<String, IParameterProvider>();
      parameterProviderMap.put( IParameterProvider.SCOPE_REQUEST, parameterProvider );

      IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
      IPentahoUrlFactory urlFactory = new SimpleUrlFactory( requestContext.getContextPath() ); //$NON-NLS-1$

      String processName = description;
      boolean persisted = false;
      List messages = new ArrayList();
View Full Code Here

            } else if ( outputName.equals( ChartComponent.HTML_MAPPING_HTML ) ) {

              outputValue = mapString;

            } else if ( outputName.equals( ChartComponent.BASE_URL_OUTPUT ) ) {
              IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
              outputValue = requestContext.getContextPath();

            } else if ( outputName.equals( ChartComponent.CONTEXT_PATH_OUTPUT ) ) {
              IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
              outputValue = requestContext.getContextPath();
            } else if ( outputName.equals( ChartComponent.FULLY_QUALIFIED_SERVER_URL_OUTPUT ) ) {

              IApplicationContext applicationContext = PentahoSystem.getApplicationContext();
              if ( applicationContext != null ) {
                outputValue = applicationContext.getFullyQualifiedServerURL();
              } else {
                IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
                outputValue = requestContext.getContextPath();
              }
            } else if ( outputName.equals( ChartComponent.HTML_IMG_TAG ) ) {

              outputValue = hasTemplate ? mapString : ""; //$NON-NLS-1$

              outputValue += "<img border=\"0\" "; //$NON-NLS-1$
              outputValue += "width=\"" + width + "\" "; //$NON-NLS-1$//$NON-NLS-2$
              outputValue += "height=\"" + height + "\" "; //$NON-NLS-1$//$NON-NLS-2$
              if ( hasTemplate ) {
                outputValue +=
                    "usemap=\"#" + fileResults[ChartComponent.MAP_NAME].getName().substring( 0,
                      fileResults[ ChartComponent.MAP_NAME ].getName().indexOf( '.' ) ) + "\" "; //$NON-NLS-1$//$NON-NLS-2$
              }
              IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
              String contextPath = requestContext.getContextPath();
              outputValue +=
                  "src=\"" + contextPath + "getImage?image=" + fileResults[ChartComponent.FILE_NAME].getName() + "\"/>"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$

            }
View Full Code Here

    if ( requestStr != null && requestStr.endsWith( WEB_CONTEXT_JS )
        && httpRequest.getAttribute( FILTER_APPLIED ) == null ) {
      httpRequest.setAttribute( FILTER_APPLIED, Boolean.TRUE );
      // split out a fully qualified url, guaranteed to have a trailing slash
      IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
      String contextPath = requestContext.getContextPath();
      try {
        response.setContentType( "text/javascript" ); //$NON-NLS-1$
        OutputStream out = response.getOutputStream();
        out.write( initialCommentBytes );
View Full Code Here

TOP

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

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.