public class ConversionServiceImpl extends DefaultComponent implements ConversionService
ConversionService
.Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_EP |
static String |
CONVERTER_EP |
Constructor and Description |
---|
ConversionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
BlobHolder |
convert(String converterName,
BlobHolder blobHolder,
Map<String,Serializable> parameters)
Converts a Blob given a converter name.
|
BlobHolder |
convertToMimeType(String destinationMimeType,
BlobHolder blobHolder,
Map<String,Serializable> parameters)
Converts a Blob given a target destination MimeType.
|
static String |
getCacheBasePath() |
static Converter |
getConverter(String converterName) |
static ConverterDescriptor |
getConverterDescriptor(String converterName) |
String |
getConverterName(String sourceMimeType,
String destinationMimeType)
Gets the convertName given a source and destination MimeType.
|
List<String> |
getConverterNames(String sourceMimeType,
String destinationMimeType)
Gets the available convertNames given a source and destination MimeType.
|
static long |
getGCIntervalInMinutes() |
static int |
getMaxCacheSizeInKB() |
List<String> |
getRegistredConverters()
Returns the names of the registered converters.
|
static boolean |
isCacheEnabled() |
ConverterCheckResult |
isConverterAvailable(String converterName)
Checks for converter availability.
|
ConverterCheckResult |
isConverterAvailable(String converterName,
boolean refresh)
Checks for converter availability.
|
boolean |
isSourceMimeTypeSupported(String converterName,
String sourceMimeType)
Returns true if the converter supports the given
sourceMimeType ,
false otherwise. |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor)
Component implementation.
|
static void |
registerConverter(ConverterDescriptor desc) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public static final String CONVERTER_EP
public static final String CONFIG_EP
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
public static ConverterDescriptor getConverterDescriptor(String converterName)
public static long getGCIntervalInMinutes()
public static void registerConverter(ConverterDescriptor desc)
public static int getMaxCacheSizeInKB()
public static boolean isCacheEnabled()
public static String getCacheBasePath()
public List<String> getRegistredConverters()
ConversionService
getRegistredConverters
in interface ConversionService
public BlobHolder convert(String converterName, BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionService
convert
in interface ConversionService
ConversionException
public BlobHolder convertToMimeType(String destinationMimeType, BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionService
convertToMimeType
in interface ConversionService
ConversionException
public List<String> getConverterNames(String sourceMimeType, String destinationMimeType)
ConversionService
getConverterNames
in interface ConversionService
public String getConverterName(String sourceMimeType, String destinationMimeType)
ConversionService
getConverterName
in interface ConversionService
public ConverterCheckResult isConverterAvailable(String converterName) throws ConversionException
ConversionService
Result can be:
ConverterNotRegistered
if converter is not registered.
Result can be taken from an internal cache.
isConverterAvailable
in interface ConversionService
ConversionException
public ConverterCheckResult isConverterAvailable(String converterName, boolean refresh) throws ConversionException
ConversionService
Result can be:
ConverterNotRegistered
if converter is not registered.
isConverterAvailable
in interface ConversionService
ConversionException
public boolean isSourceMimeTypeSupported(String converterName, String sourceMimeType)
ConversionService
sourceMimeType
,
false otherwise.isSourceMimeTypeSupported
in interface ConversionService
Copyright © 2013 Nuxeo SA. All Rights Reserved.