Package step.plugins.compare
Class AbstractCompareFunctionHandler
- java.lang.Object
-
- step.functions.handler.AbstractFunctionHandler<javax.json.JsonObject,javax.json.JsonObject>
-
- step.functions.handler.JsonBasedFunctionHandler
-
- step.plugins.compare.AbstractCompareFunctionHandler
-
- Direct Known Subclasses:
ImageCompareFunctionHandler
,PdfTestFunctionHandler
public abstract class AbstractCompareFunctionHandler extends step.functions.handler.JsonBasedFunctionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACTUAL
static String
ACTUAL_FILE_ON_AGENT
protected CompareScenarioServices
compareScenarioServices
static int
DEFAULT_LINE_HEIGHT
static String
EXPECTED
static String
EXPECTED_FILE_ON_AGENT
static String
LINE_HEIGHT_PROP
-
Constructor Summary
Constructors Constructor Description AbstractCompareFunctionHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
compareInitialize()
abstract String
getActualFileName()
protected abstract AbstractDocumentToImageService
getDocToImageService()
abstract String
getExpectedFileName()
protected abstract AbstractExtractionService
getExtractionService(Map<String,String> props)
protected abstract String
getKeywordName()
protected abstract String
getScenarioDirProperty()
File
getWorkingDir()
protected abstract String
getWorkingDirPath()
step.functions.io.Output<javax.json.JsonObject>
handle(step.functions.io.Input<javax.json.JsonObject> input)
void
initialize()
protected InputStream
readAttachment(step.functions.io.Input<javax.json.JsonObject> input, String attachmentName)
-
Methods inherited from class step.functions.handler.JsonBasedFunctionHandler
getInputPayloadClass, getOutputPayloadClass
-
Methods inherited from class step.functions.handler.AbstractFunctionHandler
delegate, delegate, getCurrentContext, getCurrentContext, getFileVersionId, getFunctionHandlerFactory, getProperties, getTokenReservationSession, getTokenSession, mergeAllProperties, pushLocalApplicationContext, pushLocalApplicationContext, pushLocalFolderApplicationContext, pushLocalFolderApplicationContext, pushRemoteApplicationContext, pushRemoteApplicationContext, retrieveFileVersion, runInContext, runInContext, setApplicationContextBuilder, setFileManagerClient, setFunctionHandlerFactory, setProperties, setTokenReservationSession, setTokenSession
-
-
-
-
Field Detail
-
LINE_HEIGHT_PROP
public static final String LINE_HEIGHT_PROP
- See Also:
- Constant Field Values
-
EXPECTED
public static final String EXPECTED
- See Also:
- Constant Field Values
-
ACTUAL
public static final String ACTUAL
- See Also:
- Constant Field Values
-
ACTUAL_FILE_ON_AGENT
public static final String ACTUAL_FILE_ON_AGENT
- See Also:
- Constant Field Values
-
EXPECTED_FILE_ON_AGENT
public static final String EXPECTED_FILE_ON_AGENT
- See Also:
- Constant Field Values
-
DEFAULT_LINE_HEIGHT
public static final int DEFAULT_LINE_HEIGHT
- See Also:
- Constant Field Values
-
compareScenarioServices
protected CompareScenarioServices compareScenarioServices
-
-
Method Detail
-
getScenarioDirProperty
protected abstract String getScenarioDirProperty()
-
getKeywordName
protected abstract String getKeywordName()
-
getDocToImageService
protected abstract AbstractDocumentToImageService getDocToImageService()
-
getExtractionService
protected abstract AbstractExtractionService getExtractionService(Map<String,String> props)
-
getActualFileName
public abstract String getActualFileName()
-
getExpectedFileName
public abstract String getExpectedFileName()
-
handle
public step.functions.io.Output<javax.json.JsonObject> handle(step.functions.io.Input<javax.json.JsonObject> input) throws Exception
- Specified by:
handle
in classstep.functions.handler.AbstractFunctionHandler<javax.json.JsonObject,javax.json.JsonObject>
- Throws:
Exception
-
readAttachment
protected InputStream readAttachment(step.functions.io.Input<javax.json.JsonObject> input, String attachmentName)
-
getWorkingDirPath
protected abstract String getWorkingDirPath()
-
getWorkingDir
public File getWorkingDir()
-
compareInitialize
protected abstract void compareInitialize()
-
initialize
public void initialize()
- Overrides:
initialize
in classstep.functions.handler.AbstractFunctionHandler<javax.json.JsonObject,javax.json.JsonObject>
-
-