Class TransformerConfigMBeanImpl
- java.lang.Object
-
- org.alfresco.repo.content.transform.TransformerConfigMBeanImpl
-
- All Implemented Interfaces:
TransformerConfigMBean
public class TransformerConfigMBeanImpl extends java.lang.Object implements TransformerConfigMBean
Implements the JMX interface for monitoring Content Transformer configuration and statistics.- Author:
- Alan Davis
-
-
Constructor Summary
Constructors Constructor Description TransformerConfigMBeanImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getContextNames()Lists the names of the contexts or uses.java.lang.String[]getCustomePropertyNames()Lists custom (non default) property names.java.lang.String[]getExtensionsAndMimetypes()Lists all configured mimetypes, proceeded by its primary file extension.java.lang.StringgetProperties(boolean listAll)Returns custom and default transformer propertiest.java.lang.String[]getTestFileExtensionsAndMimetypes()Lists the extensions of available test files.java.lang.String[]getTransformationDebugLog(int n)Returns the last n entries in the transformation debug log.java.lang.String[]getTransformationLog(int n)Returns the last n entries in the transformation log.java.lang.StringgetTransformationsByExtension(java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String use)Lists all possible transformations sorted by source and then target mimetype extension.java.lang.StringgetTransformationsByTransformer(java.lang.String simpleTransformerName, java.lang.String use)Lists all possible transformations sorted by Transformer name.java.lang.StringgetTransformationStatistics(java.lang.String simpleTransformerName, java.lang.String sourceExtension, java.lang.String targetExtension)Lists the transformation statistics for the current node.java.lang.String[]getTransformerNames()Lists the names of all top level transformers.java.lang.Stringhelp()Returns a description of each method and its parameters.java.lang.StringremoveProperties(java.lang.String propertyNames)Removes transformer properties.voidsetContentTransformerRegistry(ContentTransformerRegistry transformerRegistry)voidsetMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)java.lang.StringsetProperties(java.lang.String propertyNamesAndValues)Adds or replaces new transformer properties.voidsetTransformerConfig(TransformerConfig transformerConfig)voidsetTransformerDebug(TransformerDebug transformerDebug)voidsetTransformerDebugLog(org.alfresco.repo.content.transform.LogEntries transformerDebugLog)voidsetTransformerLog(org.alfresco.repo.content.transform.LogEntries transformerLog)java.lang.StringtestTransform(java.lang.String simpleTransformerName, java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String use)Transforms a small test file from one mimetype to another and then shows the debug of the transform, which would indicate if it was successful or even if it was possible.
-
-
-
Method Detail
-
setContentTransformerRegistry
public void setContentTransformerRegistry(ContentTransformerRegistry transformerRegistry)
-
setTransformerDebug
public void setTransformerDebug(TransformerDebug transformerDebug)
-
setTransformerConfig
public void setTransformerConfig(TransformerConfig transformerConfig)
-
setMimetypeService
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
-
setTransformerLog
public void setTransformerLog(org.alfresco.repo.content.transform.LogEntries transformerLog)
-
setTransformerDebugLog
public void setTransformerDebugLog(org.alfresco.repo.content.transform.LogEntries transformerDebugLog)
-
getTransformerNames
public java.lang.String[] getTransformerNames()
Description copied from interface:TransformerConfigMBeanLists the names of all top level transformers.- Specified by:
getTransformerNamesin interfaceTransformerConfigMBean
-
getExtensionsAndMimetypes
public java.lang.String[] getExtensionsAndMimetypes()
Description copied from interface:TransformerConfigMBeanLists all configured mimetypes, proceeded by its primary file extension.- Specified by:
getExtensionsAndMimetypesin interfaceTransformerConfigMBean
-
getTransformationsByTransformer
public java.lang.String getTransformationsByTransformer(java.lang.String simpleTransformerName, java.lang.String use)Description copied from interface:TransformerConfigMBeanLists all possible transformations sorted by Transformer name.- Specified by:
getTransformationsByTransformerin interfaceTransformerConfigMBean- Parameters:
simpleTransformerName- to be checked. If null all transformers are included.use- or context in which the transformation will be used ("doclib", "index", "webpreview", "syncRule", "asyncRule"...) or null for the default.
-
getTransformationsByExtension
public java.lang.String getTransformationsByExtension(java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String use)Description copied from interface:TransformerConfigMBeanLists all possible transformations sorted by source and then target mimetype extension.- Specified by:
getTransformationsByExtensionin interfaceTransformerConfigMBean- Parameters:
sourceExtension- to be checked. If null all source mimetypes are included.targetExtension- to be checked. If null all target mimetypes are included.use- or context in which the transformation will be used ("doclib", "index", "webpreview", "syncRule", "asyncRule"...) or null for the default.
-
getTransformationStatistics
public java.lang.String getTransformationStatistics(java.lang.String simpleTransformerName, java.lang.String sourceExtension, java.lang.String targetExtension)Description copied from interface:TransformerConfigMBeanLists the transformation statistics for the current node.- Specified by:
getTransformationStatisticsin interfaceTransformerConfigMBean- Parameters:
simpleTransformerName- to be checked. If null all transformers are included.sourceExtension- to be checked. If null all source mimetypes are included.targetExtension- to be checked. If null all target mimetypes are included.
-
getTransformationLog
public java.lang.String[] getTransformationLog(int n)
Description copied from interface:TransformerConfigMBeanReturns the last n entries in the transformation log.- Specified by:
getTransformationLogin interfaceTransformerConfigMBean
-
getTransformationDebugLog
public java.lang.String[] getTransformationDebugLog(int n)
Description copied from interface:TransformerConfigMBeanReturns the last n entries in the transformation debug log.- Specified by:
getTransformationDebugLogin interfaceTransformerConfigMBean
-
getProperties
public java.lang.String getProperties(boolean listAll)
Description copied from interface:TransformerConfigMBeanReturns custom and default transformer propertiest.- Specified by:
getPropertiesin interfaceTransformerConfigMBean- Parameters:
listAll- list both default and custom values, otherwise includes only custom values.
-
setProperties
public java.lang.String setProperties(java.lang.String propertyNamesAndValues)
Description copied from interface:TransformerConfigMBeanAdds or replaces new transformer properties.- Specified by:
setPropertiesin interfaceTransformerConfigMBean- Returns:
- a confirmation or failure message
-
removeProperties
public java.lang.String removeProperties(java.lang.String propertyNames)
Description copied from interface:TransformerConfigMBeanRemoves transformer properties.- Specified by:
removePropertiesin interfaceTransformerConfigMBean- Parameters:
propertyNames- to be removed. Any values after the property name are ignored.- Returns:
- a confirmation or failure message
-
testTransform
public java.lang.String testTransform(java.lang.String simpleTransformerName, java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String use)Description copied from interface:TransformerConfigMBeanTransforms a small test file from one mimetype to another and then shows the debug of the transform, which would indicate if it was successful or even if it was possible.- Specified by:
testTransformin interfaceTransformerConfigMBean- Parameters:
simpleTransformerName- to be used. If not specified the ContentService is used to select one.sourceExtension- used to identify the mimetypetargetExtension- used to identify the mimetypeuse- or context in which to test the transformation ("doclib", "index", "webpreview", "syncRule", "asyncRule"...) or blank for the default.";- Returns:
- Text indicating if the transform was possible and any debug
-
getContextNames
public java.lang.String[] getContextNames()
Description copied from interface:TransformerConfigMBeanLists the names of the contexts or uses.- Specified by:
getContextNamesin interfaceTransformerConfigMBean
-
getCustomePropertyNames
public java.lang.String[] getCustomePropertyNames()
Description copied from interface:TransformerConfigMBeanLists custom (non default) property names.- Specified by:
getCustomePropertyNamesin interfaceTransformerConfigMBean
-
getTestFileExtensionsAndMimetypes
public java.lang.String[] getTestFileExtensionsAndMimetypes()
Description copied from interface:TransformerConfigMBeanLists the extensions of available test files.- Specified by:
getTestFileExtensionsAndMimetypesin interfaceTransformerConfigMBean
-
help
public java.lang.String help()
Description copied from interface:TransformerConfigMBeanReturns a description of each method and its parameters.- Specified by:
helpin interfaceTransformerConfigMBean
-
-