@AlfrescoPublicApi
public interface TransformerConfig
Modifier and Type | Field and Description |
---|---|
static Collection<String> |
ALL_SUFFIXES
All suffixes to property names used to transformer configuration
|
static String |
AMP
The suffix to property names to indicate which Alfresco AMPs the transformer is
available with.
|
static String |
ANY
Wild card mimetype and mimetype extension.
|
static String |
AVAILABLE
The suffix to property names to indicate that a transformer is available.
|
static String |
BLACKLIST
The suffix to property names for the blacklist.
|
static String |
CONTENT
Prefix before the transformer name of all property names that contain transformer
information
|
static String |
DEBUG_ENTRIES
The number of debug lines to keep.
|
static String |
DEFAULT_TRANSFORMER
The 'transformer name' for system wide defaults for all transformers
|
static String |
EDITION
The suffix to property names to indicate which Alfresco version the transformer is
available with.
|
static String |
ENTRIES |
static String |
ERROR_TIME
The suffix to property names for the error time.
|
static String |
EXTENSIONS
The separator between the transformer name and two mimetype extensions in a property name.
|
static String |
FAILOVER
The suffix to property names for creating dynamic failover transformers
|
static String |
INITIAL_COUNT
The suffix to property names for the the average count.
|
static String |
INITIAL_TIME
The suffix to property names for the the average time.
|
static String[][] |
LIMIT_PAIR_SUFFIXES
Suffix pairs (max and limit values) to property names used to define transformation limits
|
static Collection<String> |
LIMIT_SUFFIXES
Suffixes to property names used to define transformation limits
|
static String |
LOG_ENTRIES
The number of log lines to keep.
|
static String |
MAX_PAGES |
static String |
MAX_SOURCE_SIZE_K_BYTES
Suffixes for limits.
|
static String |
MIMETYPES
The separator between the transformer name and wildcarded mimetypes rather than extensions in a property name.
|
static Collection<String> |
NO_SUFFIXES
No suffixes to property names used to define transformer settings.
|
static String |
PAGE_LIMIT |
static char |
PIPE
Separator between transformers and mimetype extensions in a dynamic compound property value.
|
static String |
PIPELINE
The suffix to property names for creating dynamic complex transformers
|
static String |
PREFIX
The combined content and transformer name prefix of for all property names that contain
transformer information
|
static String |
PRIORITY
The suffix to property names for the priority.
|
static int |
PRIORITY_DEFAULT
By default transformers have a priority of 100.
|
static int |
PRIORITY_EXPLICIT
To support the historical concept of EXPLICIT transformers, all such transformers
are given a
PRIORITY_EXPLICIT (50). |
static String |
READ_LIMIT_K_BYTES |
static String |
READ_LIMIT_TIME_MS |
static String[] |
SEPARATORS
Both extension and minetype separators.
|
static String |
STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES
A white list of declared and detected mimetypes, that don't match, but should still be transformed.
|
static String |
SUMMARY_TRANSFORMER_NAME
Name given to the 'SUMMARY' dummy (does not exist) transformer that gathers data
from all root level transformations
|
static String |
SUPPORTED
The suffix to property names for supported and unsupported combinations.
|
static String |
THRESHOLD_COUNT
The suffix to property names for the threshold count.
|
static String |
TIMEOUT_MS |
static String |
TRANSFORMER
Prefix for all transformer names
|
static String |
USE
An optional separator appended after the normal suffix and following value that
identifies the 'use' or 'application' of the property.
|
Modifier and Type | Method and Description |
---|---|
List<org.alfresco.service.cmr.repository.NodeRef> |
getBlacklist(ContentTransformer transformer,
String sourceMimetype,
String targetMimetype)
Returns a list of blacklisted NodeRefs of the specified transformer for the the combination of source and target mimetype.
|
TransformationOptionLimits |
getLimits(ContentTransformer transformer,
String sourceMimetype,
String targetMimetype,
String use)
Returns the limits defined for the combination of transformer, sourceMimetype and targetMimetype.
|
int |
getPriority(ContentTransformer contentTransformerHelper,
String sourceMimetype,
String targetMimetype)
Returns the priority of the specified transformer for the the combination of source and target mimetype.
|
String |
getProperties(boolean changesOnly)
Returns a sorted set of all transformer properties, their values and includes
comments about the properties.
|
String |
getProperty(String name)
Returns a transformer property value.
|
TransformerStatistics |
getStatistics(ContentTransformer transformer,
String sourceMimetype,
String targetMimetype,
boolean createNew)
Returns and creates if needed the
TransformerStatistics object for the combination of
transformer, sourceMimetype and targetMimetype. |
int |
getThresholdCount(ContentTransformer contentTransformerHelper,
String sourceMimetype,
String targetMimetype)
Returns the threshold of the transformer.
|
boolean |
isSupportedTransformation(ContentTransformer transformer,
String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Returns true if the supplied mimetype transformation pair is allowed by the list of supported
and unsupported transformations.
|
int |
removeProperties(String propertyNames)
Removes transformer properties.
|
int |
setProperties(String propertyNamesAndValues)
Sets a transformer property values.
|
boolean |
strictMimetypeCheck(String declaredMimetype,
String detectedMimetype)
When strict mimetype checking is performed before a transformation, this method is called.
|
static final String ANY
static final String CONTENT
static final String TRANSFORMER
static final String PREFIX
static final String DEFAULT_TRANSFORMER
static final String SUMMARY_TRANSFORMER_NAME
static final String USE
static final String EXTENSIONS
static final String MIMETYPES
EXTENSIONS
.static final String[] SEPARATORS
static final String PIPELINE
static final String FAILOVER
static final String AVAILABLE
static final char PIPE
static final String SUPPORTED
static final String PRIORITY
static final String BLACKLIST
static final String EDITION
AMP
,
Constant Field Valuesstatic final String AMP
EDITION
,
Constant Field Valuesstatic final String THRESHOLD_COUNT
static final String ERROR_TIME
static final String INITIAL_TIME
static final String INITIAL_COUNT
static final String MAX_SOURCE_SIZE_K_BYTES
static final String TIMEOUT_MS
static final String MAX_PAGES
static final String READ_LIMIT_K_BYTES
static final String READ_LIMIT_TIME_MS
static final String PAGE_LIMIT
static final int PRIORITY_EXPLICIT
PRIORITY_EXPLICIT
(50). By default transformers have a default of 10.
A value of 5 allows better transformers to be added later.static final int PRIORITY_DEFAULT
static final Collection<String> LIMIT_SUFFIXES
static final String[][] LIMIT_PAIR_SUFFIXES
static final Collection<String> ALL_SUFFIXES
static final Collection<String> NO_SUFFIXES
static final String ENTRIES
static final String DEBUG_ENTRIES
static final String LOG_ENTRIES
static final String STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES
String getProperty(String name)
name
- of the property.null
if not set.String getProperties(boolean changesOnly)
changesOnly
- only custom values will be included.int removeProperties(String propertyNames)
propertyNames
- new line separated names. Any values will be ignored.IllegalArgumentException
- if the properties were not set or the
list contains errors.int setProperties(String propertyNamesAndValues)
propertyNamesAndValues
- new line separated name and valuesIllegalArgumentException
- the list contains errors.TransformerStatistics getStatistics(ContentTransformer transformer, String sourceMimetype, String targetMimetype, boolean createNew)
TransformerStatistics
object for the combination of
transformer, sourceMimetype and targetMimetype. When transformer is null this is the
system wide summary object for a combination of sourceMimetype and targetMimetype.
When both sourceMimetype and targetMimetype are null this is the transformer's summary
object. When all three parameters are null this is the system wide summary for all
transformers.transformer
- the transformer for which data is being recorded.sourceMimetype
- the source mimetype.targetMimetype
- the source mimetype.createNew
- indicates if a new object should be created if it does not exist.TransformerStatistics
.TransformationOptionLimits getLimits(ContentTransformer transformer, String sourceMimetype, String targetMimetype, String use)
transformer
- sourceMimetype
- targetMimetype
- use
- to which the limits will be put. For example "index", "webpreview", "doclib", "syncRule",
"aysncRule". null
is the default.boolean isSupportedTransformation(ContentTransformer transformer, String sourceMimetype, String targetMimetype, TransformationOptions options)
transformer
- sourceMimetype
- targetMimetype
- options
- not currently usedint getPriority(ContentTransformer contentTransformerHelper, String sourceMimetype, String targetMimetype)
contentTransformerHelper
- sourceMimetype
- targetMimetype
- PRIORITY_EXPLICIT
(50). By default transformers have a default of 100.List<org.alfresco.service.cmr.repository.NodeRef> getBlacklist(ContentTransformer transformer, String sourceMimetype, String targetMimetype)
transformer
- sourceMimetype
- targetMimetype
- boolean strictMimetypeCheck(String declaredMimetype, String detectedMimetype)
declaredMimetype
- the mimetype on the source nodedetectedMimetype
- returned by Tika having looked at the content.int getThresholdCount(ContentTransformer contentTransformerHelper, String sourceMimetype, String targetMimetype)
contentTransformerHelper
- sourceMimetype
- targetMimetype
- Copyright © 2005–2017 Alfresco Software. All rights reserved.