Class TransformationOptionPair

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated
    @AlfrescoPublicApi
    public class TransformationOptionPair
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    A pair of transformation options that specify A) a max value over which the source is not read (throws an Exception) or B) a limit over which no more of the source is read (returns EOF) Each pair represents a values such as an elapse time, KBytes read or number of pages read. It is only meaningful for a either the max or limit value to be set. There is one pair of values for each transformer and another pair passed in via the options parameter for each individual transformation. The later is for specific types of transformation, such as thumbnail generation. When this occurs values are combined, by using the lowest of the four values.
    Author:
    Alan Davis
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TransformationOptionPair.Action
      Deprecated.
      Action to take place for a given pair of values.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void append​(java.lang.StringBuilder sb, java.lang.String optMaxKey, java.lang.String optLimitKey)
      Deprecated.
       
      TransformationOptionPair combine​(TransformationOptionPair that)
      Deprecated.
      Returns a TransformationOptionPair that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionPair.
      TransformationOptionPair combineUpper​(TransformationOptionPair that)
      Deprecated.
      Returns a TransformationOptionPair that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionPair so that they return the lowest common denominator of the two limits .
      void defaultTo​(TransformationOptionPair pair)
      Deprecated.
      This method overrides rather than defaults values into the supplied pair (as the name might suggest), but because of the order in which it is called, this results in the correct defaults being set.
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      TransformationOptionPair.Action getAction()
      Deprecated.
       
      long getLimit()
      Deprecated.
       
      long getMax()
      Deprecated.
       
      long getValue()
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      void set​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap, java.lang.String optMaxKey, java.lang.String optLimitKey, java.lang.String exceptionMessage)
      Deprecated.
       
      void setLimit​(long limit, java.lang.String exceptionMessage)
      Deprecated.
       
      void setMax​(long max, java.lang.String exceptionMessage)
      Deprecated.
       
      boolean supported()
      Deprecated.
      Indicates if the limit allows a transformation to take place at all.
      java.util.Map<java.lang.String,​java.lang.Object> toMap​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap, java.lang.String optMaxKey, java.lang.String optLimitKey)
      Deprecated.
       
      java.lang.String toString​(java.lang.String max, java.lang.String limit)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

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

      • TransformationOptionPair

        public TransformationOptionPair()
        Deprecated.
    • Method Detail

      • getMax

        public long getMax()
        Deprecated.
      • setMax

        public void setMax​(long max,
                           java.lang.String exceptionMessage)
        Deprecated.
      • getLimit

        public long getLimit()
        Deprecated.
      • setLimit

        public void setLimit​(long limit,
                             java.lang.String exceptionMessage)
        Deprecated.
      • getValue

        public long getValue()
        Deprecated.
      • supported

        public boolean supported()
        Deprecated.
        Indicates if the limit allows a transformation to take place at all. If 0, it would not be possible.
        Returns:
        true if a transformation is possible.
      • defaultTo

        public void defaultTo​(TransformationOptionPair pair)
        Deprecated.
        This method overrides rather than defaults values into the supplied pair (as the name might suggest), but because of the order in which it is called, this results in the correct defaults being set.

        A call to this method overrides any values in the supplied pair parameter with those in this Object. The supplied pair parameter is being gradually built up by initially setting the most general values and then more specific values for each level. As a result 'default' values from the more general levels will still exist at the end if more specific ones have not been supplied.

        Parameters:
        pair - to be set
      • toString

        public java.lang.String toString​(java.lang.String max,
                                         java.lang.String limit)
        Deprecated.
      • toMap

        public java.util.Map<java.lang.String,​java.lang.Object> toMap​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap,
                                                                            java.lang.String optMaxKey,
                                                                            java.lang.String optLimitKey)
        Deprecated.
      • append

        public void append​(java.lang.StringBuilder sb,
                           java.lang.String optMaxKey,
                           java.lang.String optLimitKey)
        Deprecated.
      • set

        public void set​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap,
                        java.lang.String optMaxKey,
                        java.lang.String optLimitKey,
                        java.lang.String exceptionMessage)
        Deprecated.
      • combine

        public TransformationOptionPair combine​(TransformationOptionPair that)
        Deprecated.
        Returns a TransformationOptionPair that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionPair.
      • combineUpper

        public TransformationOptionPair combineUpper​(TransformationOptionPair that)
        Deprecated.
        Returns a TransformationOptionPair that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionPair so that they return the lowest common denominator of the two limits .
      • 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