Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey


  private boolean parseDataDefinition(final String parameterFile) throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final SubReportDataDefinition dataDefinition = (SubReportDataDefinition)
          performExternalParsing(parameterFile, SubReportDataDefinition.class, parameters);
      report.setDataFactory(dataDefinition.getDataFactory());
      report.setQuery(dataDefinition.getQuery());
      report.setQueryLimit(dataDefinition.getQueryLimit());
View Full Code Here


    final String[] names = rootHandler.getHelperObjectNames();
    final int length = names.length;
    for (int i = 0; i < length; i++)
    {
      final String name = names[i];
      final FactoryParameterKey key = new FactoryParameterKey(name);
      map.put(key, rootHandler.getHelperObject(name));
    }
    return map;
  }
View Full Code Here

      while (it.hasNext())
      {
        final Object o = it.next();
        if (o instanceof FactoryParameterKey)
        {
          final FactoryParameterKey fpk = (FactoryParameterKey) o;
          handler.setHelperObject(fpk.getName(), parameters.get(fpk));
        }
      }

      reader.parse(input);
View Full Code Here

      while (it.hasNext())
      {
        final Object o = it.next();
        if (o instanceof FactoryParameterKey)
        {
          final FactoryParameterKey fpk = (FactoryParameterKey) o;
          handler.setHelperObject(fpk.getName(), parameters.get(fpk));
        }
      }

      reader.parse(input);
View Full Code Here

  private boolean parseDataDefinition(final String parameterFile) throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final SubReportDataDefinition dataDefinition = (SubReportDataDefinition)
          performExternalParsing(parameterFile, SubReportDataDefinition.class, parameters);
      report.setDataFactory(dataDefinition.getDataFactory());
      report.setQuery(dataDefinition.getQuery());
      report.setQueryLimit(dataDefinition.getQueryLimit());
View Full Code Here

    final String[] names = rootHandler.getHelperObjectNames();
    final int length = names.length;
    for (int i = 0; i < length; i++)
    {
      final String name = names[i];
      final FactoryParameterKey key = new FactoryParameterKey(name);
      map.put(key, rootHandler.getHelperObject(name));
    }
    return map;
  }
View Full Code Here

      while (it.hasNext())
      {
        final Object o = it.next();
        if (o instanceof FactoryParameterKey)
        {
          final FactoryParameterKey fpk = (FactoryParameterKey) o;
          handler.setHelperObject(fpk.getName(), parameters.get(fpk));
        }
      }

      reader.parse(input);
View Full Code Here

      while (it.hasNext())
      {
        final Object o = it.next();
        if (o instanceof FactoryParameterKey)
        {
          final FactoryParameterKey fpk = (FactoryParameterKey) o;
          handler.setHelperObject(fpk.getName(), parameters.get(fpk));
        }
      }

      reader.parse(input);
View Full Code Here

      String fullyQualifiedServerURL = PentahoSystem.getApplicationContext().getFullyQualifiedServerURL();

      HashMap<FactoryParameterKey, Object> helperObjects = new HashMap<FactoryParameterKey, Object>();

      helperObjects.put( new FactoryParameterKey( "pentahoBaseURL" ), fullyQualifiedServerURL ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

      // trim out the server and port
      helperObjects.put( new FactoryParameterKey( "serverBaseURL" ), getBaseServerURL( fullyQualifiedServerURL ) );
      //$NON-NLS-1$

      helperObjects.put(
          new FactoryParameterKey( "solutionRoot" ), PentahoSystem.getApplicationContext().getSolutionPath( "" ) ); //$NON-NLS-1$ //$NON-NLS-2$

      // get the host:port portion only
      helperObjects.put( new FactoryParameterKey( "hostColonPort" ), getHostColonPort( fullyQualifiedServerURL ) ); //$NON-NLS-1$

      // get the requestContextPath
      helperObjects
          .put(
            new FactoryParameterKey( "requestContextPath" ),
            PentahoRequestContextHolder.getRequestContext().getContextPath() ); //$NON-NLS-1$

      Iterator it = getInputNames().iterator();
      while ( it.hasNext() ) {
        try {
          String inputName = (String) it.next();

          // do not store the data as it would always force a cache refresh and it has no bearing
          // on how the report definition would be parsed
          if ( AbstractJFreeReportComponent.DATACOMPONENT_DATAINPUT.equals( inputName ) ) {
            continue;
          }

          String inputValue = getInputStringValue( inputName );
          helperObjects.put( new FactoryParameterKey( inputName ), inputValue );
        } catch ( Exception e ) {
          //ignore
        }
      }
View Full Code Here

      String fullyQualifiedServerUrl = PentahoSystem.getApplicationContext().getFullyQualifiedServerURL();

      HashMap helperObjects = new HashMap();

      helperObjects.put( new FactoryParameterKey( "pentahoBaseURL" ), fullyQualifiedServerUrl ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

      // trim out the server and port
      helperObjects.put( new FactoryParameterKey( "serverBaseURL" ), getBaseServerURL( fullyQualifiedServerUrl ) ); //$NON-NLS-1$

      helperObjects.put(
          new FactoryParameterKey( "solutionRoot" ), PentahoSystem.getApplicationContext().getSolutionPath( "" ) ); //$NON-NLS-1$ //$NON-NLS-2$

      // get the host:port portion only
      helperObjects.put( new FactoryParameterKey( "hostColonPort" ), getHostColonPort( fullyQualifiedServerUrl ) ); //$NON-NLS-1$

      // get the requestContextPath
      helperObjects
          .put(
            new FactoryParameterKey( "requestContextPath" ),
            PentahoRequestContextHolder.getRequestContext().getContextPath() ); //$NON-NLS-1$

      Iterator it = getInputNames().iterator();
      while ( it.hasNext() ) {
        try {
          String inputName = (String) it.next();
          String inputValue = getInputStringValue( inputName );
          helperObjects.put( new FactoryParameterKey( inputName ), inputValue );
        } catch ( Exception e ) {
          //ignore
        }
      }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey

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.