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.service.cmr.repository
Class TransformationOptionLimits
java.lang.Object
  org.alfresco.service.cmr.repository.TransformationOptionLimits
All Implemented Interfaces:
Serializable

public class TransformationOptionLimits
extends Object
implements Serializable
Represents maximum source values (that result in exceptions if exceeded) or limits on source values (that result in EOF (End Of File) being returned early). Options exist for elapse time, KBytes read or number of pages read.
Author:
Alan Davis
See Also:
Serialized Form

Field Summary
static String
KBYTES_MESSAGE
static String
OPT_MAX_PAGES
static String
OPT_MAX_SOURCE_SIZE_K_BYTES
static String
OPT_PAGE_LIMIT
static String
OPT_READ_LIMIT_K_BYTES
static String
OPT_READ_LIMIT_TIME_MS
static String
OPT_TIMEOUT_MS
static String
PAGES_MESSAGE
static String
TIME_MESSAGE
Constructor Summary
TransformationOptionLimits()
Method Summary
combine(TransformationOptionLimits that)
          Returns a TransformationOptionLimits that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionLimits.
combineUpper(TransformationOptionLimits that)
          Returns a TransformationOptionLimits that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionLimits so that they return the lowest common denominator of the limits .
void
defaultTo(TransformationOptionLimits limits)
           This method overrides rather than defaults values into the supplied limits (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(Object obj)
getKBytesPair()
int
getMaxPages()
long
getMaxSourceSizeKBytes()
int
getPageLimit()
getPagesPair()
long
getReadLimitKBytes()
long
getReadLimitTimeMs()
long
getTimeoutMs()
getTimePair()
int
hashCode()
static Map<String,Object>
removeFromMap(Map<String,Object> optionsMap)
void
set(Map<String,Object> optionsMap)
void
setMaxPages(int maxPages)
void
setMaxSourceSizeKBytes(long maxSourceSizeKBytes)
void
setPageLimit(int pageLimit)
void
setReadLimitKBytes(long readLimitKBytes)
void
setReadLimitTimeMs(long readLimitTimeMs)
void
setTimeoutMs(long timeoutMs)
boolean
supported()
          Indicates if the limits allow a transformation to take place at all.
toMap(Map<String,Object> optionsMap)
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Field Detail
KBYTES_MESSAGE
public static final String KBYTES_MESSAGE
See Also:
Constant Field Values

OPT_MAX_PAGES
public static final String OPT_MAX_PAGES
See Also:
Constant Field Values

OPT_MAX_SOURCE_SIZE_K_BYTES
public static final String OPT_MAX_SOURCE_SIZE_K_BYTES
See Also:
Constant Field Values

OPT_PAGE_LIMIT
public static final String OPT_PAGE_LIMIT
See Also:
Constant Field Values

OPT_READ_LIMIT_K_BYTES
public static final String OPT_READ_LIMIT_K_BYTES
See Also:
Constant Field Values

OPT_READ_LIMIT_TIME_MS
public static final String OPT_READ_LIMIT_TIME_MS
See Also:
Constant Field Values

OPT_TIMEOUT_MS
public static final String OPT_TIMEOUT_MS
See Also:
Constant Field Values

PAGES_MESSAGE
public static final String PAGES_MESSAGE
See Also:
Constant Field Values

TIME_MESSAGE
public static final String TIME_MESSAGE
See Also:
Constant Field Values
Constructor Detail
TransformationOptionLimits
public TransformationOptionLimits()
Method Detail
defaultTo
public void defaultTo(TransformationOptionLimits limits)
This method overrides rather than defaults values into the supplied limits (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 limits parameter with those in this Object. The supplied limits parameter is being gradually built up by initially setting the most general limits 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:
limits - to be set

getTimePair
public TransformationOptionPair getTimePair()

getTimeoutMs
public long getTimeoutMs()

setTimeoutMs
public void setTimeoutMs(long timeoutMs)

getReadLimitTimeMs
public long getReadLimitTimeMs()

setReadLimitTimeMs
public void setReadLimitTimeMs(long readLimitTimeMs)

getKBytesPair
public TransformationOptionPair getKBytesPair()

getMaxSourceSizeKBytes
public long getMaxSourceSizeKBytes()

setMaxSourceSizeKBytes
public void setMaxSourceSizeKBytes(long maxSourceSizeKBytes)

getReadLimitKBytes
public long getReadLimitKBytes()

setReadLimitKBytes
public void setReadLimitKBytes(long readLimitKBytes)

getPagesPair
public TransformationOptionPair getPagesPair()

getMaxPages
public int getMaxPages()

setMaxPages
public void setMaxPages(int maxPages)

getPageLimit
public int getPageLimit()

setPageLimit
public void setPageLimit(int pageLimit)

supported
public boolean supported()
Indicates if the limits allow a transformation to take place at all. If any of the limits are 0, it would not be possible.
Returns:
true if a transformation is possible.

toMap
public Map<String,ObjecttoMap(Map<String,Object> optionsMap)

removeFromMap
public static Map<String,ObjectremoveFromMap(Map<String,Object> optionsMap)

set
public void set(Map<String,Object> optionsMap)

toString
public String toString()
Overrides:
toString in class Object

combine
public TransformationOptionLimits combine(TransformationOptionLimits that)
Returns a TransformationOptionLimits that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionLimits.

combineUpper
public TransformationOptionLimits combineUpper(TransformationOptionLimits that)
Returns a TransformationOptionLimits that has getter methods that combine the the values from the getter methods of this and the supplied TransformationOptionLimits so that they return the lowest common denominator of the limits .

hashCode
public int hashCode()
Overrides:
hashCode in class Object

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

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.