net.sf.jameleon.data
Class AbstractFileDrivableTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.LocationAwareTagSupport
          extended by net.sf.jameleon.JameleonTagSupport
              extended by net.sf.jameleon.data.AbstractDataDrivableTag
                  extended by net.sf.jameleon.data.AbstractFileDrivableTag
All Implemented Interfaces:
DataDrivable, BreakPoint, Attributable, DataDrivableResultRecordable, FunctionResultRecordable, SessionResultRecordable, DynaTag, LocationAware, Tag
Direct Known Subclasses:
AbstractCsvTag

public abstract class AbstractFileDrivableTag
extends AbstractDataDrivableTag

This DataDrivable implementation is for file based data sources.


Field Summary
protected  String charset
           
protected  File dataDir
           
protected  String fileName
           
 
Fields inherited from class net.sf.jameleon.data.AbstractDataDrivableTag
addt, breakPoint, countRow, dataDrivableRowResult, executer, failedOnCurrentRow, log, numOfRowFailures, parentFailed, previousStateDir, resultContainer, resultRecorder, rowData, stateStorer, stopTestExecutionOnFailure, tct, vars, xmlOut
 
Fields inherited from class net.sf.jameleon.JameleonTagSupport
attributes, broker, contextVars, fp, unsupportedAttributes
 
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport
columnNumber, elementTagName, lineNumber, scriptFileName
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
AbstractFileDrivableTag()
           
 
Method Summary
 File getDataDir()
          Gets the directory of where the data will be looked for.
 File getDataDir(boolean calculate)
          Gets the directory of where the data will be looked for.
 void setCharset(String charset)
          Sets the character set to use to read the data file in.
 void setDataDir(File dataDir)
          Sets the directory of where the data will be looked for.
 void setFile(String fileName)
          Sets the name of the file to use as a data source.
 
Methods inherited from class net.sf.jameleon.data.AbstractDataDrivableTag
addVariablesToRowData, createNewResult, destroyVariables, doTag, executeDrivableRow, getDataDrivableRowResult, getDataDriver, getDataExceptionMessage, getFailedOnCurrentRow, getKeyMapping, getLogger, getNewStateStoreLocation, getResultContainer, getRowData, getTagDescription, getTagTraceMsg, getTestCaseTag, getTraceKeyValuePairs, init, isBreakPoint, isCountRow, mapKeys, recordDataDrivableResult, recordFunctionResult, recordResult, recordSessionResult, recordThisResult, removeChildlessResult, setBreakPoint, setCountRow, setFailedOnCurrentRow, setResultError, setStopTestExecutionOnFailure, setUpDataDrivable, setupDataDriver, setVariablesInContext, traceMsg
 
Methods inherited from class net.sf.jameleon.JameleonTagSupport
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught
 
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent
 

Field Detail

dataDir

protected File dataDir

charset

protected String charset

fileName

protected String fileName
Constructor Detail

AbstractFileDrivableTag

public AbstractFileDrivableTag()
Method Detail

setCharset

public void setCharset(String charset)
Sets the character set to use to read the data file in.

Parameters:
charset - the character set to use to read the data file in.This attribute is recognized by Jameleon

setDataDir

public void setDataDir(File dataDir)
Sets the directory of where the data will be looked for. The baseDir is then prepended on this

Parameters:
dataDir - the directory of where the data will be looked for.This attribute is recognized by Jameleon

setFile

public void setFile(String fileName)
Sets the name of the file to use as a data source.

Parameters:
fileName - the name of the file to use as a data source.This attribute is recognized by Jameleon

getDataDir

public File getDataDir()
Gets the directory of where the data will be looked for.

Returns:
the directory of where the data will be looked for.

getDataDir

public File getDataDir(boolean calculate)
Gets the directory of where the data will be looked for.

Parameters:
calculate - - if set to false, then the plain old dataDir is return. otherwise a calculation is done to add baseDir and testEnvironment and organization.
Returns:
the directory of where the data will be looked for.


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.