Package com.avoka.fc.core.service.fluent
Class FluentMediaTypeScanService
- java.lang.Object
-
- com.avoka.fc.core.service.fluent.AbstractFluentService
-
- com.avoka.fc.core.service.fluent.FluentMediaTypeScanService
-
- All Implemented Interfaces:
IFluentService
,IMediaTypeScanService
,IServiceDefinitionAware
,IUnitTestableService
public class FluentMediaTypeScanService extends AbstractFluentService implements IMediaTypeScanService
Provides service for scanning file attachments media type.- Since:
- 20.11.0
-
-
Field Summary
-
Fields inherited from interface com.avoka.fc.core.service.fluent.IFluentService
PARAM_ACTION_PROPERTIES, PARAMS_FILEDATA, PARAMS_FILENAME, PARAMS_FORM, PARAMS_FORM_XML, PARAMS_FUNC_PARAM, PARAMS_JOB, PARAMS_JOB_ACTION, PARAMS_PARAMS, PARAMS_REQUEST, PARAMS_ROWS, PARAMS_SVC_DEF, PARAMS_TEST_PARAMS, PARAMS_TXN, PARAMS_USER
-
-
Constructor Summary
Constructors Constructor Description FluentMediaTypeScanService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
detectMediaType(String fileName, byte[] fileData)
Detects the media type of a given document.String
getErrorType()
-
Methods inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
createExceptionAndLog, getCause, getClient, getCommitChanges, getExecutionTimeout, getFunctionTrigger, getGroovyScript, getGroovyServiceLog, getLogger, getRequestUser, getServiceDefinition, getServiceNameAndVersion, getServiceTimeout, getSlf4jLogger, getTestLogOutput, invoke, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, runUnitTest, setCommitChanges, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setLogger, setServiceDefinition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avoka.fc.core.service.IMediaTypeScanService
isFileOfMediaType
-
-
-
-
Method Detail
-
detectMediaType
public String detectMediaType(String fileName, byte[] fileData)
Description copied from interface:IMediaTypeScanService
Detects the media type of a given document.- Specified by:
detectMediaType
in interfaceIMediaTypeScanService
fileData
- the first few bytes of document data- Returns:
- media type of the document
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
-
-