jmaster.jumploader.model.api.config
Class UploaderConfig

java.lang.Object
  extended by jmaster.jumploader.model.api.config.UploaderConfig

public class UploaderConfig
extends java.lang.Object

UploaderConfig


Field Summary
private  boolean addImagesOnly
          shows whether images only allowed
static java.lang.String COMPRESSION_MODE_ZIP_ON_ADD
          zip file will be created for each file added to the queue
private  java.lang.String compressionMode
          compression mode, see constants
private  java.lang.String cookie
          cookie
private static java.lang.String DEFAULT_HTTP_UPLOADER_CLASS_NAME
          default http uploader class name
private  boolean directoriesEnabled
          shows whether folder addition enabled (will expand and add all files)
private  boolean duplicateFileEnabled
          duplicate files enabled
static java.lang.String ERROR_RESPONSE_PREFIX
          error response token
private  java.lang.String fileNamePattern
          allowed file name (not path) regex pattern, null for all
private  java.lang.String fileParameterName
          file parameter name (for POST request)
private  java.lang.String httpUploaderClassName
          http uploader class name
private  boolean imageEditorEnabled
          shows whether image editor is enabled
private  long maxFileLength
          max file length allowed (per file), -1 if unlimited
private  int maxFiles
          max files in a list, -1 if unlimited
private  java.lang.String maximumImageDimension
          maximum image size allowed ({width}x{height})
private  long maxLength
          max files length allowed (total), -1 if unlimited
private  long maxTransferRate
          maximum transfer rate (bytes/sec)
private  long minFileLength
          min file length allowed (per file), -1 if unlimited
private  int minFiles
          min files in a list, -1 if unlimited
private  java.lang.String minimumImageDimension
          minimum image size allowed ({width}x{height})
static java.lang.String PARAM_FILE_ID
          file id parameter name
static java.lang.String PARAM_FILE_LENGTH
          file length parameter name
static java.lang.String PARAM_FILE_NAME
          file name parameter name
static java.lang.String PARAM_FILE_PATH
          file path parameter name
static java.lang.String PARAM_MD5
          MD5
static java.lang.String PARAM_PARTITION_COUNT
          partition count
static java.lang.String PARAM_PARTITION_INDEX
          partition index parameter name
static java.lang.String PARAM_PARTITION_MD5
          partition MD5
private  long partitionLength
          partitionLength
private  boolean preserveRelativePath
          shows whether file relative path should be preserved as "relativePath" attribute value when adding directory in explode mode (i.e. not zipping folder content, but adding all the files in that directory recursively).
private static java.lang.String PROPERTY
          property file
private  java.lang.String requestEncoding
          request encoding to use (UTF-8 by default)
private  java.lang.String resumeCheckUrl
          resume check url
private  java.lang.String scaledInstanceDimensions
          scaled instance dimensions (comma separated, for example "100x100,200x200,400x400")
private  java.lang.String scaledInstanceNames
          scaled instance names (comma separated, e.g.
private  java.lang.String scaledInstanceQualityFactors
          scaled instance quality factors (0-worse quality, 1000-best), (comma spearated, fo example, "900,800,700");
private  java.lang.String scaledInstanceWatermarkNames
          scaled instance watermark names to apply, use null for skip (comma spearated, fo example, "null,mediumWatermark,null");
private  java.util.List scaledInstanceWatermarks
          initialized watermarks
private  boolean sendExif
          send image exif data as xml
private  boolean sendFileLastModified
          shows whether lastModified attribute should be send for a file
private  boolean sendFilePath
          send file path
private  boolean stretchImages
          shows whether can resize smaller images to bigger dimension
private  boolean zipDirectoriesOnAdd
          add directory as zip flag
private  boolean uploadOriginalImage
          shows whether original image should be uploaded along with scaled images, valid only if uploadScaledImages=true
private  boolean uploadQueueReorderingAllowed
          shows whether upload queue reardering allowed (false by default)
private  boolean uploadScaledImages
          shows whether scaled images should be uploaded.
private  boolean uploadScaledImagesNoZip
          shows whether scaled images should be uploaded not zipped (multiple files on one request).
private  int uploadThreadCount
          upload thread count
private  java.lang.String uploadUrl
          upload url
private  boolean urlEncodeParameters
          shows whether filename parameters sent to server should be urlencoded
private  boolean useMainFile
          shows whether main file should be used
private  boolean useMd5
          use MD5 hash, if true, MD5 value will be send with last partition upload request
private  boolean usePartitionMd5
          use MD5 hash for each partition, if true, MD5 value for current partition will be send with each partition upload request
private  java.lang.String userAgent
          user agent
 
Constructor Summary
UploaderConfig(jmaster.jumploader.model.api.IModel model)
          with model
 
Method Summary
 java.lang.String getCompressionMode()
           
 java.lang.String getCookie()
           
 java.lang.String getFileNamePattern()
           
 java.lang.String getFileParameterName()
           
 java.lang.String getHttpUploaderClassName()
           
 long getMaxFileLength()
           
 int getMaxFiles()
           
 java.lang.String getMaximumImageDimension()
           
 long getMaxLength()
           
 long getMaxTransferRate()
           
 long getMinFileLength()
           
 int getMinFiles()
           
 java.lang.String getMinimumImageDimension()
           
 long getPartitionLength()
           
 java.lang.String getRequestEncoding()
           
 java.lang.String getResumeCheckUrl()
           
 java.lang.String getScaledInstanceDimensions()
           
 java.lang.String getScaledInstanceNames()
           
 java.lang.String getScaledInstanceQualityFactors()
           
 java.lang.String getScaledInstanceWatermarkNames()
           
 java.util.List getScaledInstanceWatermarks()
           
 int getUploadThreadCount()
           
 java.lang.String getUploadUrl()
           
 java.lang.String getUserAgent()
           
 boolean isAddImagesOnly()
           
 boolean isDirectoriesEnabled()
           
 boolean isDuplicateFileEnabled()
           
 boolean isImageEditorEnabled()
           
 boolean isPreserveRelativePath()
           
 boolean isSendExif()
           
 boolean isSendFileLastModified()
           
 boolean isSendFilePath()
           
 boolean isStretchImages()
           
 boolean isZipDirectoriesOnAdd()
           
 boolean isUploadOriginalImage()
           
 boolean isUploadQueueReorderingAllowed()
           
 boolean isUploadScaledImages()
           
 boolean isUploadScaledImagesNoZip()
           
 boolean isUrlEncodeParameters()
           
 boolean isUseMainFile()
           
 boolean isUseMd5()
           
 boolean isUsePartitionMd5()
           
 void setAddImagesOnly(boolean addImagesOnly)
           
 void setCompressionMode(java.lang.String compressionMode)
           
 void setCookie(java.lang.String cookie)
           
 void setDirectoriesEnabled(boolean directoriesEnabled)
           
 void setDuplicateFileEnabled(boolean duplicateFileEnabled)
           
 void setFileNamePattern(java.lang.String fileNamePattern)
           
 void setFileParameterName(java.lang.String fileParameterName)
           
 void setHttpUploaderClassName(java.lang.String httpUploaderClassName)
           
 void setImageEditorEnabled(boolean imageEditorEnabled)
           
 void setMaxFileLength(long maxFileLength)
           
 void setMaxFiles(int maxFiles)
           
 void setMaximumImageDimension(java.lang.String maximumImageDimension)
           
 void setMaxLength(long maxLength)
           
 void setMaxTransferRate(long maxTransferRate)
           
 void setMinFileLength(long minFileLength)
           
 void setMinFiles(int minFiles)
           
 void setMinimumImageDimension(java.lang.String minimumImageDimension)
           
 void setPartitionLength(long partitionLength)
           
 void setPreserveRelativePath(boolean preserveRelativePath)
           
 void setRequestEncoding(java.lang.String requestEncoding)
           
 void setResumeCheckUrl(java.lang.String resumeCheckUrl)
           
 void setScaledInstanceDimensions(java.lang.String scaledInstanceDimensions)
           
 void setScaledInstanceNames(java.lang.String scaledInstanceNames)
           
 void setScaledInstanceQualityFactors(java.lang.String scaledInstanceQualityFactors)
           
 void setScaledInstanceWatermarkNames(java.lang.String scaledInstanceWatermarkNames)
           
 void setScaledInstanceWatermarks(java.util.List scaledInstanceWatermarks)
           
 void setSendExif(boolean sendExif)
           
 void setSendFileLastModified(boolean sendFileLastModified)
           
 void setSendFilePath(boolean sendFilePath)
           
 void setStretchImages(boolean stretchImages)
           
 void setZipDirectoriesOnAdd(boolean zipDirectoriesOnAdd)
           
 void setUploadOriginalImage(boolean uploadOriginalImage)
           
 void setUploadQueueReorderingAllowed(boolean uploadQueueReorderingAllowed)
           
 void setUploadScaledImages(boolean uploadScaledImages)
           
 void setUploadScaledImagesNoZip(boolean uploadScaledImagesNoZip)
           
 void setUploadThreadCount(int uploadThreadCount)
           
 void setUploadUrl(java.lang.String uploadUrl)
           
 void setUrlEncodeParameters(boolean urlEncodeParameters)
           
 void setUseMainFile(boolean useMainFile)
           
 void setUseMd5(boolean useMd5)
           
 void setUsePartitionMd5(boolean usePartitionMd5)
           
 void setUserAgent(java.lang.String userAgent)
           
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY

private static final java.lang.String PROPERTY
property file

See Also:
Constant Field Values

ERROR_RESPONSE_PREFIX

public static final java.lang.String ERROR_RESPONSE_PREFIX
error response token

See Also:
Constant Field Values

PARAM_FILE_ID

public static final java.lang.String PARAM_FILE_ID
file id parameter name

See Also:
Constant Field Values

PARAM_FILE_LENGTH

public static final java.lang.String PARAM_FILE_LENGTH
file length parameter name

See Also:
Constant Field Values

PARAM_FILE_NAME

public static final java.lang.String PARAM_FILE_NAME
file name parameter name

See Also:
Constant Field Values

PARAM_FILE_PATH

public static final java.lang.String PARAM_FILE_PATH
file path parameter name

See Also:
Constant Field Values

PARAM_PARTITION_INDEX

public static final java.lang.String PARAM_PARTITION_INDEX
partition index parameter name

See Also:
Constant Field Values

PARAM_PARTITION_COUNT

public static final java.lang.String PARAM_PARTITION_COUNT
partition count

See Also:
Constant Field Values

PARAM_MD5

public static final java.lang.String PARAM_MD5
MD5

See Also:
Constant Field Values

PARAM_PARTITION_MD5

public static final java.lang.String PARAM_PARTITION_MD5
partition MD5

See Also:
Constant Field Values

COMPRESSION_MODE_ZIP_ON_ADD

public static final java.lang.String COMPRESSION_MODE_ZIP_ON_ADD
zip file will be created for each file added to the queue

See Also:
Constant Field Values

DEFAULT_HTTP_UPLOADER_CLASS_NAME

private static final java.lang.String DEFAULT_HTTP_UPLOADER_CLASS_NAME
default http uploader class name

See Also:
Constant Field Values

uploadThreadCount

private int uploadThreadCount
upload thread count


uploadUrl

private java.lang.String uploadUrl
upload url


maxFiles

private int maxFiles
max files in a list, -1 if unlimited


maxFileLength

private long maxFileLength
max file length allowed (per file), -1 if unlimited


maxLength

private long maxLength
max files length allowed (total), -1 if unlimited


fileNamePattern

private java.lang.String fileNamePattern
allowed file name (not path) regex pattern, null for all


directoriesEnabled

private boolean directoriesEnabled
shows whether folder addition enabled (will expand and add all files)


duplicateFileEnabled

private boolean duplicateFileEnabled
duplicate files enabled


fileParameterName

private java.lang.String fileParameterName
file parameter name (for POST request)


partitionLength

private long partitionLength
partitionLength


userAgent

private java.lang.String userAgent
user agent


cookie

private java.lang.String cookie
cookie


useMd5

private boolean useMd5
use MD5 hash, if true, MD5 value will be send with last partition upload request


usePartitionMd5

private boolean usePartitionMd5
use MD5 hash for each partition, if true, MD5 value for current partition will be send with each partition upload request


minFiles

private int minFiles
min files in a list, -1 if unlimited


minFileLength

private long minFileLength
min file length allowed (per file), -1 if unlimited


uploadScaledImages

private boolean uploadScaledImages
shows whether scaled images should be uploaded. if true, uploaded file would be ZIP archive where entries are scaled images of original, entry count and names will match scaled instance names.


uploadScaledImagesNoZip

private boolean uploadScaledImagesNoZip
shows whether scaled images should be uploaded not zipped (multiple files on one request). in this case file parameter name will match scaled instance name


stretchImages

private boolean stretchImages
shows whether can resize smaller images to bigger dimension


uploadOriginalImage

private boolean uploadOriginalImage
shows whether original image should be uploaded along with scaled images, valid only if uploadScaledImages=true


scaledInstanceNames

private java.lang.String scaledInstanceNames
scaled instance names (comma separated, e.g. "small,medium,large")


scaledInstanceDimensions

private java.lang.String scaledInstanceDimensions
scaled instance dimensions (comma separated, for example "100x100,200x200,400x400")


scaledInstanceQualityFactors

private java.lang.String scaledInstanceQualityFactors
scaled instance quality factors (0-worse quality, 1000-best), (comma spearated, fo example, "900,800,700");


scaledInstanceWatermarkNames

private java.lang.String scaledInstanceWatermarkNames
scaled instance watermark names to apply, use null for skip (comma spearated, fo example, "null,mediumWatermark,null");


scaledInstanceWatermarks

private java.util.List scaledInstanceWatermarks
initialized watermarks


useMainFile

private boolean useMainFile
shows whether main file should be used


addImagesOnly

private boolean addImagesOnly
shows whether images only allowed


minimumImageDimension

private java.lang.String minimumImageDimension
minimum image size allowed ({width}x{height})


maximumImageDimension

private java.lang.String maximumImageDimension
maximum image size allowed ({width}x{height})


imageEditorEnabled

private boolean imageEditorEnabled
shows whether image editor is enabled


resumeCheckUrl

private java.lang.String resumeCheckUrl
resume check url


urlEncodeParameters

private boolean urlEncodeParameters
shows whether filename parameters sent to server should be urlencoded


sendFileLastModified

private boolean sendFileLastModified
shows whether lastModified attribute should be send for a file


compressionMode

private java.lang.String compressionMode
compression mode, see constants


zipDirectoriesOnAdd

private boolean zipDirectoriesOnAdd
add directory as zip flag


sendFilePath

private boolean sendFilePath
send file path


maxTransferRate

private long maxTransferRate
maximum transfer rate (bytes/sec)


httpUploaderClassName

private java.lang.String httpUploaderClassName
http uploader class name


uploadQueueReorderingAllowed

private boolean uploadQueueReorderingAllowed
shows whether upload queue reardering allowed (false by default)


requestEncoding

private java.lang.String requestEncoding
request encoding to use (UTF-8 by default)


sendExif

private boolean sendExif
send image exif data as xml


preserveRelativePath

private boolean preserveRelativePath
shows whether file relative path should be preserved as "relativePath" attribute value when adding directory in explode mode (i.e. not zipping folder content, but adding all the files in that directory recursively). For example, if adding directory c:/temp/d with files f1, f2, then file "relativePath" attribute values will be "d/f1" and ""d/f2"

Constructor Detail

UploaderConfig

public UploaderConfig(jmaster.jumploader.model.api.IModel model)
with model

Method Detail

toString

public java.lang.String toString()
toString

Overrides:
toString in class java.lang.Object

getCompressionMode

public java.lang.String getCompressionMode()

setCompressionMode

public void setCompressionMode(java.lang.String compressionMode)

isDirectoriesEnabled

public boolean isDirectoriesEnabled()

setDirectoriesEnabled

public void setDirectoriesEnabled(boolean directoriesEnabled)

isDuplicateFileEnabled

public boolean isDuplicateFileEnabled()

setDuplicateFileEnabled

public void setDuplicateFileEnabled(boolean duplicateFileEnabled)

getFileNamePattern

public java.lang.String getFileNamePattern()

setFileNamePattern

public void setFileNamePattern(java.lang.String fileNamePattern)

getMaxFileLength

public long getMaxFileLength()

setMaxFileLength

public void setMaxFileLength(long maxFileLength)

getMaxFiles

public int getMaxFiles()

setMaxFiles

public void setMaxFiles(int maxFiles)

getMaxLength

public long getMaxLength()

setMaxLength

public void setMaxLength(long maxLength)

getUploadThreadCount

public int getUploadThreadCount()

setUploadThreadCount

public void setUploadThreadCount(int uploadThreadCount)

getUploadUrl

public java.lang.String getUploadUrl()

setUploadUrl

public void setUploadUrl(java.lang.String uploadUrl)

getFileParameterName

public java.lang.String getFileParameterName()

setFileParameterName

public void setFileParameterName(java.lang.String fileParameterName)

getPartitionLength

public long getPartitionLength()

setPartitionLength

public void setPartitionLength(long partitionLength)

getUserAgent

public java.lang.String getUserAgent()

setUserAgent

public void setUserAgent(java.lang.String userAgent)

isUseMd5

public boolean isUseMd5()

setUseMd5

public void setUseMd5(boolean useMd5)

getMinFiles

public int getMinFiles()

setMinFiles

public void setMinFiles(int minFiles)

getScaledInstanceDimensions

public java.lang.String getScaledInstanceDimensions()

setScaledInstanceDimensions

public void setScaledInstanceDimensions(java.lang.String scaledInstanceDimensions)

getScaledInstanceNames

public java.lang.String getScaledInstanceNames()

setScaledInstanceNames

public void setScaledInstanceNames(java.lang.String scaledInstanceNames)

getScaledInstanceQualityFactors

public java.lang.String getScaledInstanceQualityFactors()

setScaledInstanceQualityFactors

public void setScaledInstanceQualityFactors(java.lang.String scaledInstanceQualityFactors)

isUploadScaledImages

public boolean isUploadScaledImages()

setUploadScaledImages

public void setUploadScaledImages(boolean uploadScaledImages)

getMinFileLength

public long getMinFileLength()

setMinFileLength

public void setMinFileLength(long minFileLength)

isUseMainFile

public boolean isUseMainFile()

setUseMainFile

public void setUseMainFile(boolean useMainFile)

isAddImagesOnly

public boolean isAddImagesOnly()

setAddImagesOnly

public void setAddImagesOnly(boolean addImagesOnly)

getMinimumImageDimension

public java.lang.String getMinimumImageDimension()

setMinimumImageDimension

public void setMinimumImageDimension(java.lang.String minimumImageDimension)

getMaximumImageDimension

public java.lang.String getMaximumImageDimension()

setMaximumImageDimension

public void setMaximumImageDimension(java.lang.String maximumImageDimension)

isImageEditorEnabled

public boolean isImageEditorEnabled()

setImageEditorEnabled

public void setImageEditorEnabled(boolean imageEditorEnabled)

getResumeCheckUrl

public java.lang.String getResumeCheckUrl()

setResumeCheckUrl

public void setResumeCheckUrl(java.lang.String resumeCheckUrl)

isUsePartitionMd5

public boolean isUsePartitionMd5()

setUsePartitionMd5

public void setUsePartitionMd5(boolean usePartitionMd5)

isUploadOriginalImage

public boolean isUploadOriginalImage()

setUploadOriginalImage

public void setUploadOriginalImage(boolean uploadOriginalImage)

isStretchImages

public boolean isStretchImages()

setStretchImages

public void setStretchImages(boolean stretchImages)

isUrlEncodeParameters

public boolean isUrlEncodeParameters()

setUrlEncodeParameters

public void setUrlEncodeParameters(boolean urlEncodeParameters)

isSendFileLastModified

public boolean isSendFileLastModified()

setSendFileLastModified

public void setSendFileLastModified(boolean sendFileLastModified)

isZipDirectoriesOnAdd

public boolean isZipDirectoriesOnAdd()

setZipDirectoriesOnAdd

public void setZipDirectoriesOnAdd(boolean zipDirectoriesOnAdd)

isSendFilePath

public boolean isSendFilePath()

setSendFilePath

public void setSendFilePath(boolean sendFilePath)

getMaxTransferRate

public long getMaxTransferRate()

setMaxTransferRate

public void setMaxTransferRate(long maxTransferRate)

getCookie

public java.lang.String getCookie()

setCookie

public void setCookie(java.lang.String cookie)

getHttpUploaderClassName

public java.lang.String getHttpUploaderClassName()

setHttpUploaderClassName

public void setHttpUploaderClassName(java.lang.String httpUploaderClassName)

isUploadQueueReorderingAllowed

public boolean isUploadQueueReorderingAllowed()

setUploadQueueReorderingAllowed

public void setUploadQueueReorderingAllowed(boolean uploadQueueReorderingAllowed)

getRequestEncoding

public java.lang.String getRequestEncoding()

setRequestEncoding

public void setRequestEncoding(java.lang.String requestEncoding)

isSendExif

public boolean isSendExif()

setSendExif

public void setSendExif(boolean sendExif)

getScaledInstanceWatermarkNames

public java.lang.String getScaledInstanceWatermarkNames()

setScaledInstanceWatermarkNames

public void setScaledInstanceWatermarkNames(java.lang.String scaledInstanceWatermarkNames)

getScaledInstanceWatermarks

public java.util.List getScaledInstanceWatermarks()

setScaledInstanceWatermarks

public void setScaledInstanceWatermarks(java.util.List scaledInstanceWatermarks)

isPreserveRelativePath

public boolean isPreserveRelativePath()

setPreserveRelativePath

public void setPreserveRelativePath(boolean preserveRelativePath)

isUploadScaledImagesNoZip

public boolean isUploadScaledImagesNoZip()

setUploadScaledImagesNoZip

public void setUploadScaledImagesNoZip(boolean uploadScaledImagesNoZip)