public class TransformerConfigImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements TransformerConfig
ALL_SUFFIXES, ANY, AVAILABLE, CONTENT, DEBUG_ENTRIES, DEFAULT_TRANSFORMER, ENTRIES, ERROR_TIME, EXTENSIONS, FAILOVER, INITIAL_COUNT, INITIAL_TIME, LIMIT_PAIR_SUFFIXES, LIMIT_SUFFIXES, LOG_ENTRIES, MAX_PAGES, MAX_SOURCE_SIZE_K_BYTES, MIMETYPES, NO_SUFFIXES, PAGE_LIMIT, PIPE, PIPELINE, PREFIX, PRIORITY, PRIORITY_DEFAULT, PRIORITY_EXPLICIT, READ_LIMIT_K_BYTES, READ_LIMIT_TIME_MS, SEPARATORS, SUMMARY_TRANSFORMER_NAME, SUPPORTED, THRESHOLD_COUNT, TIMEOUT_MS, TRANSFORMER, USE| Constructor and Description |
|---|
TransformerConfigImpl() |
| Modifier and Type | Method and Description |
|---|---|
TransformationOptionLimits |
getLimits(ContentTransformer transformer,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
java.lang.String use)
Returns the limits defined for the combination of transformer, sourceMimetype and targetMimetype.
|
int |
getPriority(ContentTransformer transformer,
java.lang.String sourceMimetype,
java.lang.String targetMimetype)
Returns the priority of the specified transformer for the the combination of source and target mimetype.
|
java.lang.String |
getProperties(boolean changesOnly)
Returns a sorted set of all transformer properties, their values and includes
comments about the properties.
|
java.lang.String |
getProperty(java.lang.String name)
Returns a transformer property value.
|
TransformerStatistics |
getStatistics(ContentTransformer transformer,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
boolean createNew)
Returns and creates if needed the
TransformerStatistics object for the combination of
transformer, sourceMimetype and targetMimetype. |
int |
getThresholdCount(ContentTransformer transformer,
java.lang.String sourceMimetype,
java.lang.String targetMimetype)
Returns the threshold of the transformer.
|
void |
initialise()
Called by spring after bean is initialised.
|
boolean |
isSupportedTransformation(ContentTransformer transformer,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Returns true if the supplied mimetype transformation pair is allowed by the list of supported
and unsupported transformations.
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
int |
removeProperties(java.lang.String propertyNames)
Removes transformer properties.
|
void |
setContentService(ContentService contentService) |
void |
setContentTransformerRegistry(ContentTransformerRegistry transformerRegistry) |
void |
setGlobalProperties(java.util.Properties globalProperties) |
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Sets of the mimetype service.
|
int |
setProperties(java.lang.String propertyNamesAndValues)
Sets a transformer property values.
|
void |
setTransformerDebug(TransformerDebug transformerDebug) |
void |
setTransformerDebugLog(TransformerDebugLog transformerDebugLog) |
void |
setTransformerLog(TransformerLog transformerLog) |
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService - public void setContentService(ContentService contentService)
public void setContentTransformerRegistry(ContentTransformerRegistry transformerRegistry)
public void setTransformerDebug(TransformerDebug transformerDebug)
public void setTransformerLog(TransformerLog transformerLog)
public void setTransformerDebugLog(TransformerDebugLog transformerDebugLog)
public void setGlobalProperties(java.util.Properties globalProperties)
public void initialise()
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBeanprotected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanpublic java.lang.String getProperty(java.lang.String name)
getProperty in interface TransformerConfigname - of the property.null if not set.public java.lang.String getProperties(boolean changesOnly)
TransformerConfiggetProperties in interface TransformerConfigchangesOnly - only custom values will be included.public int setProperties(java.lang.String propertyNamesAndValues)
setProperties in interface TransformerConfigpropertyNamesAndValues - new line separated name and valuespublic int removeProperties(java.lang.String propertyNames)
TransformerConfigremoveProperties in interface TransformerConfigpropertyNames - new line separated names. Any values will be ignored.public TransformerStatistics getStatistics(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.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.getStatistics in interface TransformerConfigtransformer - 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.public TransformationOptionLimits getLimits(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype, java.lang.String use)
getLimits in interface TransformerConfiguse - to which the limits will be put. For example "index", "webpreview", "doclib", "syncRule",
"aysncRule". null is the default.public boolean isSupportedTransformation(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
isSupportedTransformation in interface TransformerConfigoptions - not currently usedpublic int getPriority(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype)
getPriority in interface TransformerConfigPRIORITY_EXPLICIT (50). By default transformers have a default of 100.public int getThresholdCount(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype)
getThresholdCount in interface TransformerConfigCopyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.