Class AdminUiTransformerDebug
java.lang.Object
org.alfresco.repo.content.transform.TransformerDebug
org.alfresco.repo.content.transform.AdminUiTransformerDebug
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class AdminUiTransformerDebug
extends TransformerDebug
implements org.springframework.context.ApplicationContextAware
Provides methods to support the Admin UI Test Transform actions.
- Author:
- adavis
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.repo.content.transform.TransformerDebug
TransformerDebug.Call, TransformerDebug.ExtensionLookup, TransformerDebug.Frame, TransformerDebug.ThreadInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LocalTransformServiceRegistryprotected org.alfresco.transform.registry.TransformServiceRegistryFields inherited from class org.alfresco.repo.content.transform.TransformerDebug
extensionLookup, FINISHED_IN, MIMETYPE_METADATA_EMBED, MIMETYPE_METADATA_EXTRACT, mimetypeService, multiLineLog, NO_TRANSFORMERS, nodeService, SOURCE_ENCODING, SOURCE_NODE_REF, TARGET_ENCODING, TIMEOUT, TRANSFORM_NAMESPACE, TRANSFORM_SERVICE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactiveTransformer(String sourceMimetype, String targetMimetype, int transformerCount, String priority, String transformName, long maxSourceSizeKBytes, boolean firstTransformer) voidgetSourceMimetypes(String sourceExtension) Returns a collection of mimetypes ordered by extension, but unlike the version in MimetypeService throws an exception if the sourceExtension is supplied but does not match a mimetype.getTargetMimetypes(String sourceExtension, String targetExtension, Collection<String> sourceMimetypes) Identical to getSourceMimetypes for the target, but avoids doing the look up if the sourceExtension is the same as the tragetExtension, so will have the same result.String[]voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetContentService(ContentService contentService) voidsetLocalTransformServiceRegistry(LocalTransformServiceRegistry localTransformServiceRegistry) voidsetRemoteTransformServiceRegistry(org.alfresco.transform.registry.TransformServiceRegistry remoteTransformServiceRegistry) voidsetRepositoryHelper(Repository repositoryHelper) voidsetSynchronousTransformClient(SynchronousTransformClient transformClient) voidsetTransactionService(TransactionService transactionService) testTransform(String sourceExtension, String targetExtension) transformationsByExtension(String sourceExtension, String targetExtension, boolean toString) Returns a String and /or debug that provides a list of supported transformations sorted by source and target mimetype extension.Methods inherited from class org.alfresco.repo.content.transform.TransformerDebug
debug, debug, debugTransformServiceRequest, debugTransformServiceResponse, debugTransformServiceResponsePostConsume, debugTransformServiceResponsePreConsume, debugUsingPreviousReference, fileSize, getFilename, getMimetypeExt, getRenditionName, getSourceAndTargetExt, getStringBuilder, isEnabled, isMetadataEmbedMimetype, isMetadataExtractMimetype, log, log, logBasicDetails, ms, pop, popMisc, popTransform, pushMisc, pushTransform, replaceWithMetadataExtensionIfEmbedOrExtract, setCause, setDebugOutput, setExtensionLookup, setMimetypeService, setNodeService, setPreviousTransformId, setStringBuilder, setTransformerDebugLog, setTransformerLog, spaces, toString
-
Field Details
-
remoteTransformServiceRegistry
protected org.alfresco.transform.registry.TransformServiceRegistry remoteTransformServiceRegistry -
localTransformServiceRegistry
-
-
Constructor Details
-
AdminUiTransformerDebug
public AdminUiTransformerDebug()
-
-
Method Details
-
setLocalTransformServiceRegistry
public void setLocalTransformServiceRegistry(LocalTransformServiceRegistry localTransformServiceRegistry) -
setRemoteTransformServiceRegistry
public void setRemoteTransformServiceRegistry(org.alfresco.transform.registry.TransformServiceRegistry remoteTransformServiceRegistry) -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
setContentService
-
setSynchronousTransformClient
-
getRepositoryHelper
-
setRepositoryHelper
-
getTransactionService
-
setTransactionService
-
afterPropertiesSet
- Overrides:
afterPropertiesSetin classTransformerDebug- Throws:
Exception
-
transformationsByExtension
public String transformationsByExtension(String sourceExtension, String targetExtension, boolean toString) Returns a String and /or debug that provides a list of supported transformations sorted by source and target mimetype extension. Used in the Test Transforms Admin UI.- Parameters:
sourceExtension- restricts the list to one source extension. Unrestricted if null.targetExtension- restricts the list to one target extension. Unrestricted if null.toString- indicates that a String value should be returned in addition to any debug.
-
activeTransformer
-
getSourceMimetypes
Returns a collection of mimetypes ordered by extension, but unlike the version in MimetypeService throws an exception if the sourceExtension is supplied but does not match a mimetype.- Parameters:
sourceExtension- to restrict the collection to one entry- Throws:
IllegalArgumentException- if there is no match. The message indicates this.
-
getTargetMimetypes
public Collection<String> getTargetMimetypes(String sourceExtension, String targetExtension, Collection<String> sourceMimetypes) Identical to getSourceMimetypes for the target, but avoids doing the look up if the sourceExtension is the same as the tragetExtension, so will have the same result.- Parameters:
sourceExtension- used to restrict the sourceMimetypestargetExtension- to restrict the collection to one entrysourceMimetypes- that match the sourceExtension- Throws:
IllegalArgumentException- if there is no match. The message indicates this.
-
testTransform
-
getTestFileExtensionsAndMimetypes
-