Class ContentTransformerHelper

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void deprecatedSetter​(java.lang.String sourceMimetype, java.lang.String targetMimetype, java.lang.String suffixAndValue)
      Deprecated.
      Called by deprecated property setter methods that should no longer be called by Spring configuration as the values are now set using global properties.
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      java.lang.String getBeanName()
      Deprecated.
      Returns the Spring bean name.
      java.lang.String getComments​(boolean available)
      Deprecated.
      Overridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations.
      protected java.lang.String getCommentsOnlySupports​(java.util.List<java.lang.String> sourceMimetypes, java.util.List<java.lang.String> targetMimetypes, boolean available)
      Deprecated.
      Helper method for getComments(boolean) to create a line that indicates which source and target mimetypes it supports.
      protected java.lang.String getExtensionOrAny​(java.lang.String mimetype)
      Deprecated.
       
      protected java.lang.String getMimetype​(org.alfresco.service.cmr.repository.ContentAccessor content)
      Deprecated.
      Convenience to fetch and check the mimetype for the given content
      protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
      Deprecated.
       
      java.lang.String getName()
      Deprecated.
      Returns transformer name.
      static java.lang.String getSimpleName​(ContentTransformer transformer)
      Deprecated.
      Returns the simple form of the transformer name, which has had the normal "transformer." prefix to the Spring bean name removed.
      int hashCode()
      Deprecated.
       
      boolean isExplicitTransformation​(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
      Deprecated.
      Should now use priority and unsupported transformer properties.
      boolean isSupportedTransformation​(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
      Deprecated.
       
      protected java.lang.String onlySupports​(java.lang.String sourceMimetype, java.lang.String targetMimetype, boolean available)
      Deprecated.
      Helper method for getComments(boolean) to create a line that indicates which source and target mimetypes it supports.
      void register()
      Deprecated.
      THIS IS A CUSTOM SPRING INIT METHOD
      void setBeanName​(java.lang.String beanName)
      Deprecated.
      Sets the Spring bean name.
      void setExplicitTransformations​(java.util.List<ExplictTransformationDetails> explicitTransformations)
      Deprecated.
      supported transformations are now set with global properties rather than spring configuration.
      void setMimetypeService​(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
      Deprecated.
      Helper setter of the mimetype service.
      void setSupportedTransformations​(java.util.List<SupportedTransformation> supportedTransformations)
      Deprecated.
      supported transformations are now set with global properties rather than spring configuration.
      void setTransformerConfig​(TransformerConfig transformerConfig)
      Deprecated.
       
      void setUnsupportedTransformations​(java.util.List<SupportedTransformation> unsupportedTransformations)
      Deprecated.
      supported transformations are now set with global properties rather than spring configuration.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ContentTransformerHelper

        public ContentTransformerHelper()
        Deprecated.
    • Method Detail

      • setMimetypeService

        public void setMimetypeService​(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
        Deprecated.
        Helper setter of the mimetype service. This is not always required.
        Parameters:
        mimetypeService - MimetypeService
      • getMimetypeService

        protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
        Deprecated.
        Returns:
        Returns the mimetype helper
      • setExplicitTransformations

        public void setExplicitTransformations​(java.util.List<ExplictTransformationDetails> explicitTransformations)
        Deprecated.
        supported transformations are now set with global properties rather than spring configuration.
      • setSupportedTransformations

        public void setSupportedTransformations​(java.util.List<SupportedTransformation> supportedTransformations)
        Deprecated.
        supported transformations are now set with global properties rather than spring configuration.
      • setUnsupportedTransformations

        public void setUnsupportedTransformations​(java.util.List<SupportedTransformation> unsupportedTransformations)
        Deprecated.
        supported transformations are now set with global properties rather than spring configuration.
      • setTransformerConfig

        public void setTransformerConfig​(TransformerConfig transformerConfig)
        Deprecated.
      • getMimetype

        protected java.lang.String getMimetype​(org.alfresco.service.cmr.repository.ContentAccessor content)
        Deprecated.
        Convenience to fetch and check the mimetype for the given content
        Parameters:
        content - the reader/writer for the content
        Returns:
        Returns the mimetype for the content
        Throws:
        org.alfresco.error.AlfrescoRuntimeException - if the content doesn't have a mimetype
      • isSupportedTransformation

        public boolean isSupportedTransformation​(java.lang.String sourceMimetype,
                                                 java.lang.String targetMimetype,
                                                 TransformationOptions options)
        Deprecated.
      • setBeanName

        public void setBeanName​(java.lang.String beanName)
        Deprecated.
        Sets the Spring bean name.
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
      • register

        public void register()
        Deprecated.
        THIS IS A CUSTOM SPRING INIT METHOD
      • getBeanName

        public java.lang.String getBeanName()
        Deprecated.
        Returns the Spring bean name.
      • getName

        public java.lang.String getName()
        Deprecated.
        Returns transformer name. Uses the Spring bean name, but if null uses the class name.
      • getSimpleName

        public static java.lang.String getSimpleName​(ContentTransformer transformer)
        Deprecated.
        Returns the simple form of the transformer name, which has had the normal "transformer." prefix to the Spring bean name removed.
      • deprecatedSetter

        protected void deprecatedSetter​(java.lang.String sourceMimetype,
                                        java.lang.String targetMimetype,
                                        java.lang.String suffixAndValue)
        Deprecated.
        Called by deprecated property setter methods that should no longer be called by Spring configuration as the values are now set using global properties.
        Parameters:
        sourceMimetype - so that the source extension can be worked out once the mimetypeService has been set.
        targetMimetype - so that the target extension can be worked out once the mimetypeService has been set.
        suffixAndValue - that should be used.
      • getExtensionOrAny

        protected java.lang.String getExtensionOrAny​(java.lang.String mimetype)
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • getCommentsOnlySupports

        protected java.lang.String getCommentsOnlySupports​(java.util.List<java.lang.String> sourceMimetypes,
                                                           java.util.List<java.lang.String> targetMimetypes,
                                                           boolean available)
        Deprecated.
        Helper method for getComments(boolean) to create a line that indicates which source and target mimetypes it supports.
        Parameters:
        available - TODO
        Returns:
        a String of the form "# only supports xxx, yyy or zzz to aaa or bb\n".
      • onlySupports

        protected java.lang.String onlySupports​(java.lang.String sourceMimetype,
                                                java.lang.String targetMimetype,
                                                boolean available)
        Deprecated.
        Helper method for getComments(boolean) to create a line that indicates which source and target mimetypes it supports.
        Parameters:
        sourceMimetype - String
        targetMimetype - String
        available - TODO
        Returns:
        a String of the form "# only supports xxx to aaa\n".
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Overrides:
        equals in class java.lang.Object