Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.content.transform
Class ProxyContentTransformer
java.lang.Object
  org.alfresco.repo.content.transform.ContentTransformerHelper
      org.alfresco.repo.content.transform.AbstractContentTransformerLimits
          org.alfresco.repo.content.transform.AbstractContentTransformer2
              org.alfresco.repo.content.transform.ProxyContentTransformer
All Implemented Interfaces:
ContentTransformer, ContentWorker, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.Aware

public class ProxyContentTransformer
extends AbstractContentTransformer2
Makes use of a ContentTransformerWorker to perform conversions.
Author:
dward

Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits
transformerDebug
Fields inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
transformerConfig
Constructor Summary
ProxyContentTransformer()
Method Summary
getComments(boolean available)
          Overridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations.
getWorker()
          Returns the worker that the converter uses
boolean
isTransformableMimetype(String sourceMimetype, String targetMimetype, TransformationOptions options)
          Indicates if this transformer is able to transform the given source mimetype to the target mimetype.
void
register()
          THIS IS A CUSTOM SPRING INIT METHOD
void
setWorker(ContentTransformerWorker worker)
protected void
transformInternal(ContentReader reader, ContentWriter writer, TransformationOptions options)
          Method to be implemented by subclasses wishing to make use of the common infrastructural code provided by this class.
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformer2
checkTransformable, getExecutorService, getTransformationTime, getTransformationTime, isTransformationLimitedInternally, recordError, recordTime, recordTime, setAdditionalThreadTimout, setExecutorService, setRegisterTransformer, setRegistry, setRetryTransformOnDifferentMimeType, setUseTimeoutThread, toString, transform, transform, transform
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits
getLimits, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isPageLimitSupported, isTransformable, isTransformable, isTransformableSize, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSupported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebug
Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.alfresco.repo.content.transform.ContentTransformer
getName, isExplicitTransformation
Constructor Detail
ProxyContentTransformer
public ProxyContentTransformer()
Method Detail
setWorker
public void setWorker(ContentTransformerWorker worker)
Parameters:
worker - the worker that the converter uses

getWorker
public ContentTransformerWorker getWorker()
Returns the worker that the converter uses

register
public void register()
THIS IS A CUSTOM SPRING INIT METHOD
Overrides:
register in class AbstractContentTransformer2

isTransformableMimetype
public boolean isTransformableMimetype(String sourceMimetype,
                                       String targetMimetype,
                                       TransformationOptions options)
Description copied from class: AbstractContentTransformerLimits
Indicates if this transformer is able to transform the given source mimetype to the target mimetype. If overridden, consider also overriding ContentTransformerHelper.getComments(boolean).
Specified by:
isTransformableMimetype in interface ContentTransformer
Overrides:
isTransformableMimetype in class AbstractContentTransformerLimits
Parameters:
sourceMimetype - the source mimetype
targetMimetype - the target mimetype
options - the transformation options
Returns:
boolean true if this content transformer can satify the mimetypes, false otherwise
See Also:
net.sf.jooreports.converter.DocumentFormatRegistry

getComments
public String getComments(boolean available)
Description copied from interface: ContentTransformer
Overridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations. Used when providing a list of properties to an administrators who may be setting other transformation properties, via JMX. Consider overriding if {link AbstractContentTransformerLimits.isTransformableMimetype(String, String, TransformationOptions) or ContentTransformerWorker.isTransformable(String, String, TransformationOptions) have been overridden.
Specified by:
getComments in interface ContentTransformer
Overrides:
getComments in class ContentTransformerHelper
Parameters:
available - indicates if the transformer has been registered and is available to be selected. false indicates that the transformer is only available as a component of a complex transformer.
Returns:
one line per property. The simple transformer name is returned by default as a comment.

transformInternal
protected void transformInternal(ContentReader reader,
                                 ContentWriter writer,
                                 TransformationOptions options)
                          throws Exception
Description copied from class: AbstractContentTransformer2
Method to be implemented by subclasses wishing to make use of the common infrastructural code provided by this class.
Overrides:
transformInternal in class AbstractContentTransformer2
Parameters:
reader - the source of the content to transform
writer - the target to which to write the transformed content
options - a map of options to use when performing the transformation. The map will never be null.
Throws:
Exception - exceptions will be handled by this class - subclasses can throw anything

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2016 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.