Class TransformationOptionPair

java.lang.Object
org.alfresco.service.cmr.repository.TransformationOptionPair
All Implemented Interfaces:
Serializable

@Deprecated @AlfrescoPublicApi public class TransformationOptionPair extends Object implements 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:
  • Constructor Details

    • TransformationOptionPair

      public TransformationOptionPair()
      Deprecated.
  • Method Details

    • getMax

      public long getMax()
      Deprecated.
    • setMax

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

      public long getLimit()
      Deprecated.
    • setLimit

      public void setLimit(long limit, 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.
    • getAction

      public TransformationOptionPair.Action getAction()
      Deprecated.
    • 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 String toString(String max, String limit)
      Deprecated.
    • toMap

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

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

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

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

      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 Object
    • equals

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