Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at */
 package pt.webdetails.cda.dataaccess;
 import  org.dom4j.Element;
 import  org.pentaho.reporting.engine.classic.core.DataFactory;
import  org.pentaho.reporting.engine.classic.extensions.datasources.kettle.KettleDataFactory;
import  org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import  org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
import  org.pentaho.reporting.libraries.resourceloader.ResourceManager;
Todo: Document me!

Date: 16.02.2010 Time: 13:20:39

Thomas Morgner.
public class KettleDataAccess extends PREDataAccess
  private String path;
  public KettleDataAccess(final Element element)
  public KettleDataAccess()
    final KettleDataFactory dataFactory = new KettleDataFactory();
    return dataFactory;
  public String getType()
    return "kettle";
    return .;
  public void setCdaSettings(pt.webdetails.cda.settings.CdaSettings cdaSettings) {
    final ResourceManager resourceManager = new ResourceManager();
    ResourceKey fileKey;
    try {
      fileKey = resourceManager.deriveKey(getCdaSettings().getContextKey(), "");
       = fileKey.getIdentifierAsString();
    } catch (ResourceKeyCreationException e) {
       = null;//shouldn't happen and will blow down the road
//  protected ResourceKey getResourceKey(){
//    return new ResourceKey(RepositoryResourceLoader.SOLUTION_SCHEMA_NAME, path, new HashMap<Object,Object>(0));
//  }
ContextKey is used to resolve the transformation file, and so must be stored in the cache key. We only use solution paths, only the path needs to be stored.
  public String getExtraCacheKey(){
    return ;
New to GrepCode? Check out our FAQ X