com.thalesgroup.dtkit.metrics.model
Class InputMetric

java.lang.Object
  extended by com.thalesgroup.dtkit.metrics.model.InputMetric
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InputMetricOther, InputMetricXSL

public abstract class InputMetric
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
InputMetric()
           
 
Method Summary
 void convert(File inputFile, File outFile)
          Convert an input file to an output file Give your conversion process Input and Output files are relatives to the filesystem where the process is executed on (like Hudson agent)
abstract  void convert(File inputFile, File outFile, Map<String,Object> params)
          Convert an input file to an output file Give your conversion process Input and Output files are relatives to the filesystem where the process is executed on (like Hudson agent)
 boolean equals(Object o)
          --------------------------------------------------------

HASHCODE() AND EQUALS() for comparaison

--------------------------------------------------------

 InputMetricType getInputMetricType()
          Gives the input metric type (XSL or Other) according the subclass type
 List<ValidationError> getInputValidationErrors()
          Gets all input validation errors
 String getLabel()
          The label of the tool
 OutputMetric getOutputFormatType()
          Gives the output format type (given by the format model)
 List<ValidationError> getOutputValidationErrors()
          Gets all output validation errors
 String getToolName()
          The name of the current tool
 InputType getToolType()
          Gives the metric tool type (TEST, COVERAGE, MEASURE, VIOLATION)
 String getToolVersion()
          The version of the current tool
 int hashCode()
           
 boolean isDefault()
           
 void setInputMetricType(InputMetricType inputMetricType)
           
 void setInputValidationErrors(List<ValidationError> inputValidationErrors)
           
 void setLabel(String label)
           
 void setOutputFormatType(OutputMetric outputFormatType)
           
 void setOutputValidationErrors(List<ValidationError> outputValidationErrors)
           
 void setToolName(String toolName)
          --------------------------------------------------------

SETTERS for JAX-RS Layer

--------------------------------------------------------

 void setToolType(InputType toolType)
           
 void setToolVersion(String toolVersion)
           
abstract  boolean validateInputFile(File inputXMLFile)
           
abstract  boolean validateOutputFile(File inputXMLFile)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputMetric

public InputMetric()
Method Detail

getToolName

public String getToolName()
The name of the current tool

Returns:
the tool name

getToolVersion

public String getToolVersion()
The version of the current tool

Returns:
the tool version

isDefault

public boolean isDefault()

getLabel

public String getLabel()
The label of the tool

Returns:
the label metric

getInputMetricType

public InputMetricType getInputMetricType()
Gives the input metric type (XSL or Other) according the subclass type

Returns:
the input metric type

getToolType

public InputType getToolType()
Gives the metric tool type (TEST, COVERAGE, MEASURE, VIOLATION)

Returns:
the input object

getOutputFormatType

public OutputMetric getOutputFormatType()
Gives the output format type (given by the format model)

Returns:
the Output format type (usually retrieved by the format model library as junit-model.jar or tusar-model.jar)

convert

public void convert(File inputFile,
                    File outFile)
             throws ConversionException
Convert an input file to an output file Give your conversion process Input and Output files are relatives to the filesystem where the process is executed on (like Hudson agent)

Parameters:
inputFile - the input file to convert
outFile - the output file to convert
Throws:
ConversionException - an application Exception to throw when there is an error of conversion The exception is catched by the API client (as Hudson plugin)

convert

public abstract void convert(File inputFile,
                             File outFile,
                             Map<String,Object> params)
                      throws ConversionException
Convert an input file to an output file Give your conversion process Input and Output files are relatives to the filesystem where the process is executed on (like Hudson agent)

Parameters:
inputFile - the input file to convert
outFile - the output file to convert
params - the conversion parameters
Throws:
ConversionException - an application Exception to throw when there is an error of conversion The exception is catched by the API client (as Hudson plugin)

validateInputFile

public abstract boolean validateInputFile(File inputXMLFile)
                                   throws ValidationException
Throws:
ValidationException

validateOutputFile

public abstract boolean validateOutputFile(File inputXMLFile)
                                    throws ValidationException
Throws:
ValidationException

getInputValidationErrors

public List<ValidationError> getInputValidationErrors()
Gets all input validation errors

Returns:
the list of all input validation errors

getOutputValidationErrors

public List<ValidationError> getOutputValidationErrors()
Gets all output validation errors

Returns:
the list of all output validation errors

setInputValidationErrors

public void setInputValidationErrors(List<ValidationError> inputValidationErrors)

setOutputValidationErrors

public void setOutputValidationErrors(List<ValidationError> outputValidationErrors)

setToolName

public void setToolName(String toolName)
--------------------------------------------------------

SETTERS for JAX-RS Layer

--------------------------------------------------------


setToolVersion

public void setToolVersion(String toolVersion)

setLabel

public void setLabel(String label)

setInputMetricType

public void setInputMetricType(InputMetricType inputMetricType)

setToolType

public void setToolType(InputType toolType)

setOutputFormatType

public void setOutputFormatType(OutputMetric outputFormatType)

equals

public boolean equals(Object o)
--------------------------------------------------------

HASHCODE() AND EQUALS() for comparaison

--------------------------------------------------------

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2004-2011. All Rights Reserved.