Examples of deriveKey()


Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

    assertTrue("Serialized version does not contain the correct schema information", serializedVersion //$NON-NLS-1$
        .startsWith(STRING_SERIALIZATION_PREFIX + resourceLoader.getClass().getName() + ';'));
    assertTrue("Serialized version should contain the filename", serializedVersion.endsWith(URL1)); //$NON-NLS-1$

    // Create a key as a relative path from the above key
    key = manager.deriveKey(key, "images/pentaho_logo.png");
    assertNotNull(key);
    serializedVersion = resourceLoader.serialize(key, key);
    assertNotNull(serializedVersion);
    assertTrue("Serialized verison does not start with the correct header", serializedVersion //$NON-NLS-1$
        .startsWith(STRING_SERIALIZATION_PREFIX));
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

    final OutputStream outputStream = bundle.createEntry("test.properties", "text/plain");
    p1.store(outputStream, "run 1");
    outputStream.close();

    final ResourceManager resourceManager = bundle.getResourceManager();
    final ResourceKey key = resourceManager.deriveKey(bundle.getBundleMainKey(), "test.properties");
    final Resource res1 = resourceManager.create(key, null, Properties.class);
    assertEquals(p1, res1.getResource());

    bundle.removeEntry("test.properties");
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

      {
        key = manager.createKey(value);
      }
      else if (value instanceof String)
      {
        key = manager.deriveKey(baseKey, (String) value);
      }
      else
      {
        throw new FunctionEvaluationException
            ("Failed to create URI: Resource loading failed: Key not derivable");
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

      if (base != null)
      {
        try
        {
          return resourceManager.deriveKey(base, uri);
        }
        catch (ResourceKeyCreationException ex)
        {
          // ignore ..
        }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

    }

    try
    {
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey key = resourceManager.deriveKey(getRootHandler().getSource(), href);
      final Resource resource = resourceManager.create(key, null, MasterReport.class);
      report = (MasterReport) resource.getResource();
    }
    catch (ResourceException re)
    {
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

      final ResourceKey key = getRootHandler().getSource();
      final ResourceManager manager = getRootHandler().getResourceManager();
      try
      {
        final ResourceKey derivedKey = manager.deriveKey(key, href);
        final Resource resource = manager.create(derivedKey, null, DataFactory.class);
        getRootHandler().getDependencyCollector().add(resource);
        dataFactory = (DataFactory) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

        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);
      if (maybeReport == null)
      {
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

        final ResourceManager resourceManager = getRootHandler().getResourceManager();

        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "styles.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, OfficeStylesCollection.class);
            final OfficeStylesCollection styles =
                    (OfficeStylesCollection) resource.getResource();
            if (styles != null)
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

        final ResourceKey contextKey = getRootHandler().getContext();
        final ResourceManager resourceManager = getRootHandler().getResourceManager();
        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "content.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, JFreeReport.class);
            final OfficeDocument doc = (OfficeDocument) resource.getResource();
            if (doc != null)
            {
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

      final ResourceKey resourceKey;
      final ResourceKey contextKey = getContextKey();
      if (contextKey != null)
      {
        final ResourceManager resourceManager = getResourceManager();
        resourceKey = resourceManager.deriveKey(contextKey, getXqueryDataFile());
        return resourceManager.load(resourceKey);
      }
    }
    catch (ResourceException re)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.