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
- Direct Known Subclasses:
LegacyTransformerDebug
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.Frame, TransformerDebug.ThreadInfo, TransformerDebug.UnavailableTransformer
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalTransformServiceRegistrylocalTransformServiceRegistryImplprotected org.alfresco.transform.client.registry.TransformServiceRegistryremoteTransformServiceRegistry-
Fields inherited from class org.alfresco.repo.content.transform.TransformerDebug
FINISHED_IN, logger, mimetypeService, NO_TRANSFORMERS, nodeService, TRANSFORM_SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description AdminUiTransformerDebug()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactiveTransformer(java.lang.String sourceMimetype, java.lang.String targetMimetype, int transformerCount, java.lang.String priority, java.lang.String transformName, long maxSourceSizeKBytes, boolean firstTransformer)voidafterPropertiesSet()RepositorygetRepositoryHelper()java.util.Collection<java.lang.String>getSourceMimetypes(java.lang.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.java.util.Collection<java.lang.String>getTargetMimetypes(java.lang.String sourceExtension, java.lang.String targetExtension, java.util.Collection<java.lang.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.java.lang.String[]getTestFileExtensionsAndMimetypes()TransactionServicegetTransactionService()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetContentService(ContentService contentService)voidsetLocalTransformServiceRegistryImpl(LocalTransformServiceRegistry localTransformServiceRegistryImpl)voidsetRemoteTransformServiceRegistry(org.alfresco.transform.client.registry.TransformServiceRegistry remoteTransformServiceRegistry)voidsetRepositoryHelper(Repository repositoryHelper)voidsetSynchronousTransformClient(SynchronousTransformClient transformClient)voidsetTransactionService(TransactionService transactionService)java.lang.StringtestTransform(java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String renditionName)java.lang.StringtransformationsByExtension(java.lang.String sourceExtension, java.lang.String targetExtension, boolean toString, boolean format42, boolean onlyNonDeterministic, java.lang.String renditionName)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, debug, debugTransformServiceRequest, debugTransformServiceResponse, fileSize, getFileName, getMimetypeExt, getStringBuilder, isEnabled, log, log, logBasicDetails, ms, pop, popMisc, popTransform, pushMisc, pushTransform, setCause, setDebugOutput, setMimetypeService, setNodeService, setStringBuilder, setTransformerDebugLog, setTransformerLog, spaces, toString
-
-
-
-
Field Detail
-
remoteTransformServiceRegistry
protected org.alfresco.transform.client.registry.TransformServiceRegistry remoteTransformServiceRegistry
-
localTransformServiceRegistryImpl
protected LocalTransformServiceRegistry localTransformServiceRegistryImpl
-
-
Method Detail
-
setLocalTransformServiceRegistryImpl
public void setLocalTransformServiceRegistryImpl(LocalTransformServiceRegistry localTransformServiceRegistryImpl)
-
setRemoteTransformServiceRegistry
public void setRemoteTransformServiceRegistry(org.alfresco.transform.client.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
public void setContentService(ContentService contentService)
-
setSynchronousTransformClient
public void setSynchronousTransformClient(SynchronousTransformClient transformClient)
-
getRepositoryHelper
public Repository getRepositoryHelper()
-
setRepositoryHelper
public void setRepositoryHelper(Repository repositoryHelper)
-
getTransactionService
public TransactionService getTransactionService()
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Overrides:
afterPropertiesSetin classTransformerDebug- Throws:
java.lang.Exception
-
transformationsByExtension
public java.lang.String transformationsByExtension(java.lang.String sourceExtension, java.lang.String targetExtension, boolean toString, boolean format42, boolean onlyNonDeterministic, java.lang.String renditionName)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.format42- ignoredonlyNonDeterministic- ignoredrenditionName- ignored
-
activeTransformer
protected void activeTransformer(java.lang.String sourceMimetype, java.lang.String targetMimetype, int transformerCount, java.lang.String priority, java.lang.String transformName, long maxSourceSizeKBytes, boolean firstTransformer)
-
getSourceMimetypes
public java.util.Collection<java.lang.String> getSourceMimetypes(java.lang.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.- Parameters:
sourceExtension- to restrict the collection to one entry- Throws:
java.lang.IllegalArgumentException- if there is no match. The message indicates this.
-
getTargetMimetypes
public java.util.Collection<java.lang.String> getTargetMimetypes(java.lang.String sourceExtension, java.lang.String targetExtension, java.util.Collection<java.lang.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:
java.lang.IllegalArgumentException- if there is no match. The message indicates this.
-
testTransform
public java.lang.String testTransform(java.lang.String sourceExtension, java.lang.String targetExtension, java.lang.String renditionName)
-
getTestFileExtensionsAndMimetypes
public java.lang.String[] getTestFileExtensionsAndMimetypes()
-
-