Package org.pentaho.reporting.libraries.resourceloader

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


    final HashMap map = new HashMap(input.getFactoryParameters());
    final Iterator it = this.helperObjects.keySet().iterator();
    while (it.hasNext())
    {
      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = new ResourceKey(input.getParent(),
        input.getSchema(), input.getIdentifier(), input.getFactoryParameters());
    final Resource resource = manager.create(key, contextKey, MasterReport.class);
View Full Code Here


  {
    final String file = attrs.getValue(getUri(), "href");
    if (file != null)
    {
      final Map parameters = deriveParseParameters();
      parameters.remove(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME));
      parameters.put(new FactoryParameterKey
          (ReportParserUtil.INCLUDE_PARSING_KEY), ReportParserUtil.INCLUDE_PARSING_VALUE);
      try
      {
        report = (SubReport) performExternalParsing(file, SubReport.class, parameters);
      }
View Full Code Here

      final HashMap map = new HashMap();
      final String[] names = rootHandler.getHelperObjectNames();
      for (int i = 0; i < names.length; i++)
      {
        final String name = names[i];
        final FactoryParameterKey key = new FactoryParameterKey(name);
        map.put(key, rootHandler.getHelperObject(name));
      }
      map.put(new FactoryParameterKey(ReportParserUtil.INCLUDE_PARSING_KEY), ReportParserUtil.INCLUDE_PARSING_VALUE);

      final ResourceKey target = resourceManager.deriveKey(source, file, map);
      final DependencyCollector dc = rootHandler.getDependencyCollector();

      final Object maybeReport = getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);
View Full Code Here

  private boolean parseLayout(final String layout) throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), report);
      parameters.put(new FactoryParameterKey(ReportParserUtil.INCLUDE_PARSING_KEY),
          ReportParserUtil.INCLUDE_PARSING_VALUE);
      final MasterReport report = (MasterReport) performExternalParsing(layout, MasterReport.class, parameters);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
View Full Code Here

  private boolean parseStyles(final String stylefile) throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), report);
      parameters.put(new FactoryParameterKey(ReportParserUtil.INCLUDE_PARSING_KEY),
          ReportParserUtil.INCLUDE_PARSING_VALUE);
      final MasterReport report = (MasterReport) performExternalParsing(stylefile, MasterReport.class, parameters);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
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 DataDefinition dataDefinition = (DataDefinition)
          performExternalParsing(parameterFile, DataDefinition.class, parameters);

      report.setQuery(dataDefinition.getQuery());
      report.setQueryLimit(dataDefinition.getQueryLimit());
View Full Code Here

  private boolean parseSettings(final String settingsFile) throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final BundleSettings settings = (BundleSettings)
          performExternalParsing(settingsFile, BundleSettings.class, parameters);
      // todo: Apply settings
      final Configuration configuration = settings.getConfiguration();
      final Enumeration configProperties = configuration.getConfigProperties();
View Full Code Here

  private boolean parseDataSchema() throws ParseException
  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final DataSchemaDefinition metaData = (DataSchemaDefinition)
          performExternalParsing("dataschema.xml", DataSchemaDefinition.class, parameters);
      report.setDataSchemaDefinition(metaData);
      return true;
    }
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

        .startsWith(STRING_SERIALIZATION_PREFIX + fileResourceLoader.getClass().getName() + ';'));
    assertTrue(
        "Serialized version should contain the filename", serializedVersion.endsWith(tempSubFile.getCanonicalPath())); //$NON-NLS-1$

    // Create a key with factory parameters
    factoryParameters.put(new FactoryParameterKey("this"), "that");
    factoryParameters.put(new FactoryParameterKey("null"), null);
    key = manager.createKey(tempFile, factoryParameters);
    serializedVersion = fileResourceLoader.serialize(key, key);

    assertNotNull("The returned key should not be null", key); //$NON-NLS-1$
    assertTrue("Serialized verison does not start with the correct header", serializedVersion //$NON-NLS-1$
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.