Package com.avoka.fc.core.service.impl
Class TikaMediaTypeScanService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.impl.TikaMediaTypeScanService
-
- All Implemented Interfaces:
IMediaTypeScanService
,IServiceDefinitionAware
public class TikaMediaTypeScanService extends BaseService implements IMediaTypeScanService, IServiceDefinitionAware
Provides Tika Media Type Scan Service.- Since:
- 20.11.0
-
-
Constructor Summary
Constructors Constructor Description TikaMediaTypeScanService()
-
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.ServiceDefinition
getServiceDefinition()
Return the service definition for the service.void
setServiceDefinition(ServiceDefinition serviceDefinition)
Set the service definition for the service.-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
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
-
getServiceDefinition
public ServiceDefinition getServiceDefinition()
Description copied from interface:IServiceDefinitionAware
Return the service definition for the service.- Specified by:
getServiceDefinition
in interfaceIServiceDefinitionAware
- Returns:
- the service definition for the service.
-
setServiceDefinition
public void setServiceDefinition(ServiceDefinition serviceDefinition)
Description copied from interface:IServiceDefinitionAware
Set the service definition for the service.- Specified by:
setServiceDefinition
in interfaceIServiceDefinitionAware
- Parameters:
serviceDefinition
- the service definition for the service.
-
-