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
private  int autoRetryCount
          number of autoretries for a file in case of IOException (network error)
private  boolean clipboardImageEnabled
          shows whether adding image from clipboard enabled (default true)
private  java.lang.String clipboardImageFormat
          image format to use when adding image from clipboard, supported formats are: jpg (default), png
private  java.lang.String clipboardImageNameFormat
          image file name patten to give when adding image from clipboard, see http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html default: "paste 0", this will result with files named sequentally: "paste 1", "paste 2" and so on.
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
static java.lang.String DATA_FLAVOR_FILE
          file data flavor
static java.lang.String DATA_FLAVOR_IMAGE
          image data flavor
private static java.lang.String DEFAULT_HTTP_UPLOADER_CLASS_NAME
          default http uploader class name
private  boolean deleteTempFilesOnRemove
          shows if temp files should be deleted as they remove from uploader (true by default)
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 fileNamePatternDescription
          file name pattern description (appears in open file dialog)
private  java.lang.String fileParameterName
          file parameter name (for POST request)
static java.lang.String FTP_APPE
          ftp APPE command
static java.lang.String FTP_REST
          ftp REST command
private  java.lang.String ftpResumeCommand
          preferred ftp resume command, acceptable values are "REST" (default) and "APPE".
private  java.lang.String generalPurposeCheckboxTooltip
          use general purpose checkbox tooltip
private  java.lang.String generalPurposeCheckParamName
          general purpose check parameter name for upload files, if not null, each upload file will contain checkbox with tooltip message specified by generalPurposeCheckboxTooltip, applet will post parameter with value "true" or "false" (no value is same as false) corresponding to checkbox state.
private  java.lang.String httpUploaderClassName
          http uploader class name
private  boolean ignoreFileAddErrors
          shows if errors occured during directory add should be silently ignored (true by default)
static java.lang.String IMAGE_SCALE_CALLBACK
          image scale dimension callback specifier prefix, if dimension starts with it, then remainder specifies JS function name to execute to retrieve proper dimension for image scaling.
static java.lang.String IMAGE_SCALE_MODIFIER_COVER
          image scale dimension modifier to cover the box with scaled image
static java.lang.String IMAGE_SCALE_MODIFIER_COVER_ROTATE
          Deprecated image scale dimension modifier same as cover, but before scaling image will be rotated so it's orientation will match box orientation
static java.lang.String IMAGE_SCALE_MODIFIER_CROP
          image scale prefix for callback function
static java.lang.String IMAGE_SCALE_MODIFIER_CROP_ROTATE
          Deprecated image scale dimension modified same as crop, but before scaling image will be rotated so it's orientation will match box orientation
static java.lang.String IMAGE_SCALE_MODIFIER_FIT
          image scale dimension modifier to fit scaled image in the box
static java.lang.String IMAGE_SCALE_MODIFIER_FIT_ROTATE
          Deprecated image scale dimension modifier same as fit, but before scaling image will be rotated so it's orientation will match box orientation
static java.lang.String IMAGE_SCALE_MODIFIER_ROTATE
          image scale dimension modifier to rotate image so it's orientation will match box orientation
private  boolean imageEditorEnabled
          shows whether image editor is enabled
private  int imageLoadPixelsMax
          the maximum size of image to load
private  double imageMaxMpx
          maximum allowed image megapixels to add
private  boolean imageRotateEnabled
          shows whether image rotate is enabled
private  int imageSubsamplingFactor
          Subsampling factor (SF) for loading images.
private static UploaderConfig instance
          instance
private  boolean jmmExtensionHints
          jmimemagic, whether or not to use extension to optimize order of content tests, (true by default)
private  boolean jmmOnlyMimeMatch
          jmimemagic, only try to get mime type, no submatches are processed when true, (false by default)
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  boolean metadataCheckRequiredFields
          disable upload if required metadata fields not filled
private  java.lang.String metadataDescriptorUrl
          metadata descriptor url
private  java.lang.String mimeTypePattern
          allowed file mime type regex pattern to apply for files, null for all
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_ORIGINAL_IMAGE_MIMETYPE
          original image mimetype parameter
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  java.lang.String preferredPasteDataFlavor
          preferred paste data flavor for adding file from clipboard data.
private  boolean preserveImageFormat
          shows whether image format should be preserved if possible (gif, png supported), otherwise all transformed image encoded to jpeg
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  int regionPixelsMax
          the maximum size of region to use for image scaling by regions
private  boolean removeUploadedFiles
          shows whether uploaded files should be removed
private  java.lang.String requestEncoding
          request encoding to use (UTF-8 by default)
private  java.lang.String requestProperties
          upload request properties (headers) Multiple properties should be separated by '|' character, key/value should be separated by '=', special characters should be escaped by '\\uXXXX', for example '='=\\u003d
private  java.lang.String resumeCheckUrl
          resume check url
private  boolean saveImageTransformations
          shows whether image transformations made in the image editor should be saved and send to the server as xml Possible elements include:
private  java.lang.String scaledInstanceDimensions
          scaled instance target box dimensions (comma separated, for example "100x100xcrop,200x200xmin,400x400xmax").
private  java.lang.String scaledInstanceNames
          scaled instance names (comma separated, e.g.
private  java.lang.String scaledInstancePreserveMetadata
          preserve metadata for scaled images, this could be one or multiple (comma separated) value(s), true or false
private  java.lang.String scaledInstanceQualityFactors
          scaled instance quality factors (0-worse quality, 1000-best), (comma spearated, fo example, "900,800,700");
private  boolean scaledInstanceRecompressAndUploadSmaller
          if image was not transformed, just recompress that and compare file size to original, then upload smaller file (original or recompressed)
private  java.lang.String scaledInstanceScaleMode
          scale mode for scaled images, this could be one or multiple (comma separated) value(s) from list: smooth, fast, bilinear, lanczos (default)
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 sendFileLastModified
          shows whether lastModified attribute should be send for a file
private  boolean sendFilePath
          send file path
private  boolean sendImageMetadata
          send image metadata data as xml (use file attribute named "imageMetadataXml").
private  boolean sendOriginalImageMimetype
          send original image mimetype (valid if using image scaling) with "originalImageMimetype" parameter
private  java.lang.String skipZippingFilesPattern
          prevent zipping single files that match pattern.
private  boolean stretchImages
          shows whether can resize smaller images to bigger dimension
private  java.lang.String uploaderListeners
          comma separated list of class names, that implements IUploaderListener interface.
private  java.lang.String uploadFormName
          form name, which values to POST with each upload request
private  boolean uploadOriginalImage
          shows whether original image should be uploaded along with scaled images (valid if uploadScaledImages=true), or if image was transformed with image editor (original file will be posted with "originalImage" file)
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 useJMimeMagic
          shows whether jmimemagic should be used for file mimetype retrieval, (false by default)
private  boolean useLosslessJpegTransformations
          shows whether it is necessary to use lossless jpeg transfromations whenever possible
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 useMetadata
          metadata enabled flag
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
private  boolean zipDirectoriesOnAdd
          add directory as zip flag
private  boolean zipPartitions
          shows whether individual partitions should be zipped before upload If partition zipped, upload parameter will be posted: zippedPartition=true.
 
Constructor Summary
UploaderConfig(jmaster.jumploader.model.api.IModel model)
          with model
 
Method Summary
 int getAutoRetryCount()
           
 java.lang.String getClipboardImageFormat()
           
 java.lang.String getClipboardImageNameFormat()
           
 java.lang.String getCompressionMode()
           
 java.lang.String getCookie()
           
 java.lang.String getFileNamePattern()
           
 java.lang.String getFileNamePatternDescription()
           
 java.lang.String getFileParameterName()
           
 java.lang.String getFtpResumeCommand()
           
 java.lang.String getGeneralPurposeCheckboxTooltip()
           
 java.lang.String getGeneralPurposeCheckParamName()
           
 java.lang.String getHttpUploaderClassName()
           
 int getImageLoadPixelsMax()
           
 double getImageMaxMpx()
           
 int getImageSubsamplingFactor()
           
static UploaderConfig getInstance()
          instance retrieval
 long getMaxFileLength()
           
 int getMaxFiles()
           
 java.lang.String getMaximumImageDimension()
           
 long getMaxLength()
           
 long getMaxTransferRate()
           
 java.lang.String getMetadataDescriptorUrl()
           
 java.lang.String getMimeTypePattern()
           
 long getMinFileLength()
           
 int getMinFiles()
           
 java.lang.String getMinimumImageDimension()
           
 long getPartitionLength()
           
 java.lang.String getPreferredPasteDataFlavor()
           
 int getRegionPixelsMax()
           
 java.lang.String getRequestEncoding()
           
 java.lang.String getRequestProperties()
           
 java.lang.String getResumeCheckUrl()
           
 java.lang.String getScaledInstanceDimensions()
           
 java.lang.String getScaledInstanceNames()
           
 java.lang.String getScaledInstancePreserveMetadata()
           
 java.lang.String getScaledInstanceQualityFactors()
           
 java.lang.String getScaledInstanceScaleMode()
           
 java.lang.String getScaledInstanceWatermarkNames()
           
 java.util.List getScaledInstanceWatermarks()
           
 java.lang.String getSkipZippingFilesPattern()
           
 java.lang.String getUploaderListeners()
           
 java.lang.String getUploadFormName()
           
 int getUploadThreadCount()
           
 java.lang.String getUploadUrl()
           
 java.lang.String getUserAgent()
           
 boolean isAddImagesOnly()
           
 boolean isClipboardImageEnabled()
           
 boolean isDeleteTempFilesOnRemove()
           
 boolean isDirectoriesEnabled()
           
 boolean isDuplicateFileEnabled()
           
 boolean isIgnoreFileAddErrors()
           
 boolean isImageEditorEnabled()
           
 boolean isImageRotateEnabled()
           
 boolean isJmmExtensionHints()
           
 boolean isJmmOnlyMimeMatch()
           
 boolean isMetadataCheckRequiredFields()
           
 boolean isPreserveImageFormat()
           
 boolean isPreserveRelativePath()
           
 boolean isRemoveUploadedFiles()
           
 boolean isSaveImageTransformations()
           
 boolean isScaledInstanceRecompressAndUploadSmaller()
           
 boolean isSendFileLastModified()
           
 boolean isSendFilePath()
           
 boolean isSendImageMetadata()
           
 boolean isSendOriginalImageMimetype()
           
 boolean isStretchImages()
           
 boolean isUploadOriginalImage()
           
 boolean isUploadQueueReorderingAllowed()
           
 boolean isUploadScaledImages()
           
 boolean isUploadScaledImagesNoZip()
           
 boolean isUrlEncodeParameters()
           
 boolean isUseJMimeMagic()
           
 boolean isUseLosslessJpegTransformations()
           
 boolean isUseMainFile()
           
 boolean isUseMd5()
           
 boolean isUseMetadata()
           
 boolean isUsePartitionMd5()
           
 boolean isZipDirectoriesOnAdd()
           
 boolean isZipPartitions()
           
 void setAddImagesOnly(boolean addImagesOnly)
           
 void setAutoRetryCount(int autoRetryCount)
           
 void setClipboardImageEnabled(boolean clipboardImageEnabled)
           
 void setClipboardImageFormat(java.lang.String clipboardImageFormat)
           
 void setClipboardImageNameFormat(java.lang.String clipboardImageNameFormat)
           
 void setCompressionMode(java.lang.String compressionMode)
           
 void setCookie(java.lang.String cookie)
           
 void setDeleteTempFilesOnRemove(boolean deleteTempFilesOnRemove)
           
 void setDirectoriesEnabled(boolean directoriesEnabled)
           
 void setDuplicateFileEnabled(boolean duplicateFileEnabled)
           
 void setFileNamePattern(java.lang.String fileNamePattern)
           
 void setFileNamePatternDescription(java.lang.String fileNamePatternDescription)
           
 void setFileParameterName(java.lang.String fileParameterName)
           
 void setFtpResumeCommand(java.lang.String ftpResumeCommand)
           
 void setGeneralPurposeCheckboxTooltip(java.lang.String generalPurposeCheckboxTooltip)
           
 void setGeneralPurposeCheckParamName(java.lang.String generalPurposeCheckParamName)
           
 void setHttpUploaderClassName(java.lang.String httpUploaderClassName)
           
 void setIgnoreFileAddErrors(boolean ignoreFileAddErrors)
           
 void setImageEditorEnabled(boolean imageEditorEnabled)
           
 void setImageLoadPixelsMax(int imageLoadPixelsMax)
           
 void setImageMaxMpx(double imageMaxMpx)
           
 void setImageRotateEnabled(boolean imageRotateEnabled)
           
 void setImageSubsamplingFactor(int imageSubsamplingFactor)
           
 void setJmmExtensionHints(boolean jmmExtensionHints)
           
 void setJmmOnlyMimeMatch(boolean jmmOnlyMimeMatch)
           
 void setMaxFileLength(long maxFileLength)
           
 void setMaxFiles(int maxFiles)
           
 void setMaximumImageDimension(java.lang.String maximumImageDimension)
           
 void setMaxLength(long maxLength)
           
 void setMaxTransferRate(long maxTransferRate)
           
 void setMetadataCheckRequiredFields(boolean metadataCheckRequiredFields)
           
 void setMetadataDescriptorUrl(java.lang.String metadataDescriptorUrl)
           
 void setMimeTypePattern(java.lang.String mimeTypePattern)
           
 void setMinFileLength(long minFileLength)
           
 void setMinFiles(int minFiles)
           
 void setMinimumImageDimension(java.lang.String minimumImageDimension)
           
 void setPartitionLength(long partitionLength)
           
 void setPreferredPasteDataFlavor(java.lang.String preferredPasteDataFlavor)
           
 void setPreserveImageFormat(boolean preserveImageFormat)
           
 void setPreserveRelativePath(boolean preserveRelativePath)
           
 void setRegionPixelsMax(int regionPixelsMax)
           
 void setRemoveUploadedFiles(boolean removeUploadedFiles)
           
 void setRequestEncoding(java.lang.String requestEncoding)
           
 void setRequestProperties(java.lang.String requestProperties)
           
 void setResumeCheckUrl(java.lang.String resumeCheckUrl)
           
 void setSaveImageTransformations(boolean saveImageTransformations)
           
 void setScaledInstanceDimensions(java.lang.String scaledInstanceDimensions)
           
 void setScaledInstanceNames(java.lang.String scaledInstanceNames)
           
 void setScaledInstancePreserveMetadata(java.lang.String scaledInstancePreserveMetadata)
           
 void setScaledInstanceQualityFactors(java.lang.String scaledInstanceQualityFactors)
           
 void setScaledInstanceRecompressAndUploadSmaller(boolean scaledInstanceRecompressAndUploadSmaller)
           
 void setScaledInstanceScaleMode(java.lang.String scaledInstanceScaleMode)
           
 void setScaledInstanceWatermarkNames(java.lang.String scaledInstanceWatermarkNames)
           
 void setScaledInstanceWatermarks(java.util.List scaledInstanceWatermarks)
           
 void setSendFileLastModified(boolean sendFileLastModified)
           
 void setSendFilePath(boolean sendFilePath)
           
 void setSendImageMetadata(boolean sendImageMetadata)
           
 void setSendOriginalImageMimetype(boolean sendOriginalImageMimetype)
           
 void setSkipZippingFilesPattern(java.lang.String skipZippingFilesPattern)
           
 void setStretchImages(boolean stretchImages)
           
 void setUploaderListeners(java.lang.String uploaderListeners)
           
 void setUploadFormName(java.lang.String uploadFormName)
           
 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 setUseJMimeMagic(boolean useJMimeMagic)
           
 void setUseLosslessJpegTransformations(boolean useLosslessJpegTransformations)
           
 void setUseMainFile(boolean useMainFile)
           
 void setUseMd5(boolean useMd5)
           
 void setUseMetadata(boolean useMetadata)
           
 void setUsePartitionMd5(boolean usePartitionMd5)
           
 void setUserAgent(java.lang.String userAgent)
           
 void setZipDirectoriesOnAdd(boolean zipDirectoriesOnAdd)
           
 void setZipPartitions(boolean zipPartitions)
           
 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

IMAGE_SCALE_MODIFIER_FIT

public static final java.lang.String IMAGE_SCALE_MODIFIER_FIT
image scale dimension modifier to fit scaled image in the box

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_ROTATE

public static final java.lang.String IMAGE_SCALE_MODIFIER_ROTATE
image scale dimension modifier to rotate image so it's orientation will match box orientation

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_COVER

public static final java.lang.String IMAGE_SCALE_MODIFIER_COVER
image scale dimension modifier to cover the box with scaled image

See Also:
Constant Field Values

IMAGE_SCALE_CALLBACK

public static final java.lang.String IMAGE_SCALE_CALLBACK
image scale dimension callback specifier prefix, if dimension starts with it, then remainder specifies JS function name to execute to retrieve proper dimension for image scaling. callback should accept 2 parameters: IUploadFile (file being scaled) and String (scaled instance name)

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_FIT_ROTATE

public static final java.lang.String IMAGE_SCALE_MODIFIER_FIT_ROTATE
Deprecated image scale dimension modifier same as fit, but before scaling image will be rotated so it's orientation will match box orientation

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_CROP_ROTATE

public static final java.lang.String IMAGE_SCALE_MODIFIER_CROP_ROTATE
Deprecated image scale dimension modified same as crop, but before scaling image will be rotated so it's orientation will match box orientation

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_COVER_ROTATE

public static final java.lang.String IMAGE_SCALE_MODIFIER_COVER_ROTATE
Deprecated image scale dimension modifier same as cover, but before scaling image will be rotated so it's orientation will match box orientation

See Also:
Constant Field Values

IMAGE_SCALE_MODIFIER_CROP

public static final java.lang.String IMAGE_SCALE_MODIFIER_CROP
image scale prefix for callback function

See Also:
Constant Field Values

PARAM_ORIGINAL_IMAGE_MIMETYPE

public static final java.lang.String PARAM_ORIGINAL_IMAGE_MIMETYPE
original image mimetype parameter

See Also:
Constant Field Values

DATA_FLAVOR_FILE

public static final java.lang.String DATA_FLAVOR_FILE
file data flavor

See Also:
Constant Field Values

DATA_FLAVOR_IMAGE

public static final java.lang.String DATA_FLAVOR_IMAGE
image data flavor

See Also:
Constant Field Values

FTP_REST

public static final java.lang.String FTP_REST
ftp REST command

See Also:
Constant Field Values

FTP_APPE

public static final java.lang.String FTP_APPE
ftp APPE command

See Also:
Constant Field Values

instance

private static UploaderConfig instance
instance


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


fileNamePatternDescription

private java.lang.String fileNamePatternDescription
file name pattern description (appears in open file dialog)


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.


imageSubsamplingFactor

private int imageSubsamplingFactor
Subsampling factor (SF) for loading images. Subsampling (S) (for both x and y axis) calculated with formula S = 1 + MPX / SF, where MPX is number of image megapixels (rounded). read here about image subsampling: http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/IIOParam.html#setSourceSubsampling(int, int, int, int) Subsampling allows to read large images using reasonable amount of memory.


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 if uploadScaledImages=true), or if image was transformed with image editor (original file will be posted with "originalImage" file)


scaledInstanceNames

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


scaledInstanceDimensions

private java.lang.String scaledInstanceDimensions
scaled instance target box dimensions (comma separated, for example "100x100xcrop,200x200xmin,400x400xmax"). each dimension also accepts scaling modifier, which could be: max (default) - image will be scaled to maximum size that fits in the box min - image will be scaled to minimum size that covers the box crop - image will be scaled to minimum size that covers the box, then cropped to fit in the box


scaledInstanceQualityFactors

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


scaledInstanceRecompressAndUploadSmaller

private boolean scaledInstanceRecompressAndUploadSmaller
if image was not transformed, just recompress that and compare file size to original, then upload smaller file (original or recompressed)


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


sendOriginalImageMimetype

private boolean sendOriginalImageMimetype
send original image mimetype (valid if using image scaling) with "originalImageMimetype" parameter


scaledInstancePreserveMetadata

private java.lang.String scaledInstancePreserveMetadata
preserve metadata for scaled images, this could be one or multiple (comma separated) value(s), true or false


scaledInstanceScaleMode

private java.lang.String scaledInstanceScaleMode
scale mode for scaled images, this could be one or multiple (comma separated) value(s) from list: smooth, fast, bilinear, lanczos (default)


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


imageRotateEnabled

private boolean imageRotateEnabled
shows whether image rotate 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


skipZippingFilesPattern

private java.lang.String skipZippingFilesPattern
prevent zipping single files that match pattern. Sample pattern for common archive files: ^.+\.(?i)((zip)|(rar)|(tar)|(gz))$


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)


sendImageMetadata

private boolean sendImageMetadata
send image metadata data as xml (use file attribute named "imageMetadataXml"). XML format is: [?xml version="1.0" encoding="UTF-8"?] [metadata] [directory name="Exif"] [tag type="0x010f" name="Make" desc="Canon"/] ... [more tags] [/directory] ... [more directories] [/metadata]


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"


useMetadata

private boolean useMetadata
metadata enabled flag


metadataDescriptorUrl

private java.lang.String metadataDescriptorUrl
metadata descriptor url


metadataCheckRequiredFields

private boolean metadataCheckRequiredFields
disable upload if required metadata fields not filled


mimeTypePattern

private java.lang.String mimeTypePattern
allowed file mime type regex pattern to apply for files, null for all


useJMimeMagic

private boolean useJMimeMagic
shows whether jmimemagic should be used for file mimetype retrieval, (false by default)


jmmExtensionHints

private boolean jmmExtensionHints
jmimemagic, whether or not to use extension to optimize order of content tests, (true by default)


jmmOnlyMimeMatch

private boolean jmmOnlyMimeMatch
jmimemagic, only try to get mime type, no submatches are processed when true, (false by default)


autoRetryCount

private int autoRetryCount
number of autoretries for a file in case of IOException (network error)


useLosslessJpegTransformations

private boolean useLosslessJpegTransformations
shows whether it is necessary to use lossless jpeg transfromations whenever possible


generalPurposeCheckParamName

private java.lang.String generalPurposeCheckParamName
general purpose check parameter name for upload files, if not null, each upload file will contain checkbox with tooltip message specified by generalPurposeCheckboxTooltip, applet will post parameter with value "true" or "false" (no value is same as false) corresponding to checkbox state.


generalPurposeCheckboxTooltip

private java.lang.String generalPurposeCheckboxTooltip
use general purpose checkbox tooltip


uploaderListeners

private java.lang.String uploaderListeners
comma separated list of class names, that implements IUploaderListener interface. these will be instantited and added to uploader on init


imageMaxMpx

private double imageMaxMpx
maximum allowed image megapixels to add


uploadFormName

private java.lang.String uploadFormName
form name, which values to POST with each upload request


preserveImageFormat

private boolean preserveImageFormat
shows whether image format should be preserved if possible (gif, png supported), otherwise all transformed image encoded to jpeg


saveImageTransformations

private boolean saveImageTransformations
shows whether image transformations made in the image editor should be saved and send to the server as xml Possible elements include:


zipPartitions

private boolean zipPartitions
shows whether individual partitions should be zipped before upload If partition zipped, upload parameter will be posted: zippedPartition=true.


removeUploadedFiles

private boolean removeUploadedFiles
shows whether uploaded files should be removed


imageLoadPixelsMax

private int imageLoadPixelsMax
the maximum size of image to load


regionPixelsMax

private int regionPixelsMax
the maximum size of region to use for image scaling by regions


clipboardImageEnabled

private boolean clipboardImageEnabled
shows whether adding image from clipboard enabled (default true)


clipboardImageFormat

private java.lang.String clipboardImageFormat
image format to use when adding image from clipboard, supported formats are: jpg (default), png


clipboardImageNameFormat

private java.lang.String clipboardImageNameFormat
image file name patten to give when adding image from clipboard, see http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html default: "paste 0", this will result with files named sequentally: "paste 1", "paste 2" and so on.


requestProperties

private java.lang.String requestProperties
upload request properties (headers) Multiple properties should be separated by '|' character, key/value should be separated by '=', special characters should be escaped by '\\uXXXX', for example '='=\\u003d


ignoreFileAddErrors

private boolean ignoreFileAddErrors
shows if errors occured during directory add should be silently ignored (true by default)


preferredPasteDataFlavor

private java.lang.String preferredPasteDataFlavor
preferred paste data flavor for adding file from clipboard data. Acceptable values are "file" (default) and "image". For example, when image copied with Internet Explorer both data flavors added to cipboard - file reference and bitmap image data. This parameter defines preferred data to be added for uploading.


ftpResumeCommand

private java.lang.String ftpResumeCommand
preferred ftp resume command, acceptable values are "REST" (default) and "APPE".


deleteTempFilesOnRemove

private boolean deleteTempFilesOnRemove
shows if temp files should be deleted as they remove from uploader (true by default)

Constructor Detail

UploaderConfig

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

Method Detail

getInstance

public static UploaderConfig getInstance()
instance retrieval


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)

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)

getImageSubsamplingFactor

public int getImageSubsamplingFactor()

setImageSubsamplingFactor

public void setImageSubsamplingFactor(int imageSubsamplingFactor)

isUseMetadata

public boolean isUseMetadata()

setUseMetadata

public void setUseMetadata(boolean useMetadata)

getMetadataDescriptorUrl

public java.lang.String getMetadataDescriptorUrl()

setMetadataDescriptorUrl

public void setMetadataDescriptorUrl(java.lang.String metadataDescriptorUrl)

getMimeTypePattern

public java.lang.String getMimeTypePattern()

setMimeTypePattern

public void setMimeTypePattern(java.lang.String mimeTypePattern)

isUseJMimeMagic

public boolean isUseJMimeMagic()

setUseJMimeMagic

public void setUseJMimeMagic(boolean useJMimeMagic)

isJmmExtensionHints

public boolean isJmmExtensionHints()

setJmmExtensionHints

public void setJmmExtensionHints(boolean jmmExtensionHints)

isJmmOnlyMimeMatch

public boolean isJmmOnlyMimeMatch()

setJmmOnlyMimeMatch

public void setJmmOnlyMimeMatch(boolean jmmOnlyMimeMatch)

isImageRotateEnabled

public boolean isImageRotateEnabled()

setImageRotateEnabled

public void setImageRotateEnabled(boolean imageRotateEnabled)

isMetadataCheckRequiredFields

public boolean isMetadataCheckRequiredFields()

setMetadataCheckRequiredFields

public void setMetadataCheckRequiredFields(boolean metadataCheckRequiredFields)

isSendImageMetadata

public boolean isSendImageMetadata()

setSendImageMetadata

public void setSendImageMetadata(boolean sendImageMetadata)

getAutoRetryCount

public int getAutoRetryCount()

setAutoRetryCount

public void setAutoRetryCount(int autoRetryCount)

isUseLosslessJpegTransformations

public boolean isUseLosslessJpegTransformations()

setUseLosslessJpegTransformations

public void setUseLosslessJpegTransformations(boolean useLosslessJpegTransformations)

getGeneralPurposeCheckParamName

public java.lang.String getGeneralPurposeCheckParamName()

setGeneralPurposeCheckParamName

public void setGeneralPurposeCheckParamName(java.lang.String generalPurposeCheckParamName)

getGeneralPurposeCheckboxTooltip

public java.lang.String getGeneralPurposeCheckboxTooltip()

setGeneralPurposeCheckboxTooltip

public void setGeneralPurposeCheckboxTooltip(java.lang.String generalPurposeCheckboxTooltip)

getUploaderListeners

public java.lang.String getUploaderListeners()

setUploaderListeners

public void setUploaderListeners(java.lang.String uploaderListeners)

getImageMaxMpx

public double getImageMaxMpx()

setImageMaxMpx

public void setImageMaxMpx(double imageMaxMpx)

getUploadFormName

public java.lang.String getUploadFormName()

setUploadFormName

public void setUploadFormName(java.lang.String uploadFormName)

isPreserveImageFormat

public boolean isPreserveImageFormat()

setPreserveImageFormat

public void setPreserveImageFormat(boolean preserveImageFormat)

getFileNamePatternDescription

public java.lang.String getFileNamePatternDescription()

setFileNamePatternDescription

public void setFileNamePatternDescription(java.lang.String fileNamePatternDescription)

getSkipZippingFilesPattern

public java.lang.String getSkipZippingFilesPattern()

setSkipZippingFilesPattern

public void setSkipZippingFilesPattern(java.lang.String skipZippingFilesPattern)

isScaledInstanceRecompressAndUploadSmaller

public boolean isScaledInstanceRecompressAndUploadSmaller()

setScaledInstanceRecompressAndUploadSmaller

public void setScaledInstanceRecompressAndUploadSmaller(boolean scaledInstanceRecompressAndUploadSmaller)

isSendOriginalImageMimetype

public boolean isSendOriginalImageMimetype()

setSendOriginalImageMimetype

public void setSendOriginalImageMimetype(boolean sendOriginalImageMimetype)

isSaveImageTransformations

public boolean isSaveImageTransformations()

setSaveImageTransformations

public void setSaveImageTransformations(boolean saveImageTransformations)

isZipPartitions

public boolean isZipPartitions()

setZipPartitions

public void setZipPartitions(boolean zipPartitions)

isRemoveUploadedFiles

public boolean isRemoveUploadedFiles()

setRemoveUploadedFiles

public void setRemoveUploadedFiles(boolean removeUploadedFiles)

getRegionPixelsMax

public int getRegionPixelsMax()

setRegionPixelsMax

public void setRegionPixelsMax(int regionPixelsMax)

getImageLoadPixelsMax

public int getImageLoadPixelsMax()

setImageLoadPixelsMax

public void setImageLoadPixelsMax(int imageLoadPixelsMax)

getScaledInstancePreserveMetadata

public java.lang.String getScaledInstancePreserveMetadata()

setScaledInstancePreserveMetadata

public void setScaledInstancePreserveMetadata(java.lang.String scaledInstancePreserveMetadata)

getScaledInstanceScaleMode

public java.lang.String getScaledInstanceScaleMode()

setScaledInstanceScaleMode

public void setScaledInstanceScaleMode(java.lang.String scaledInstanceScaleMode)

isClipboardImageEnabled

public boolean isClipboardImageEnabled()

setClipboardImageEnabled

public void setClipboardImageEnabled(boolean clipboardImageEnabled)

getClipboardImageFormat

public java.lang.String getClipboardImageFormat()

setClipboardImageFormat

public void setClipboardImageFormat(java.lang.String clipboardImageFormat)

getClipboardImageNameFormat

public java.lang.String getClipboardImageNameFormat()

setClipboardImageNameFormat

public void setClipboardImageNameFormat(java.lang.String clipboardImageNameFormat)

getRequestProperties

public java.lang.String getRequestProperties()

setRequestProperties

public void setRequestProperties(java.lang.String requestProperties)

isIgnoreFileAddErrors

public boolean isIgnoreFileAddErrors()

setIgnoreFileAddErrors

public void setIgnoreFileAddErrors(boolean ignoreFileAddErrors)

getPreferredPasteDataFlavor

public java.lang.String getPreferredPasteDataFlavor()

setPreferredPasteDataFlavor

public void setPreferredPasteDataFlavor(java.lang.String preferredPasteDataFlavor)

getFtpResumeCommand

public java.lang.String getFtpResumeCommand()

setFtpResumeCommand

public void setFtpResumeCommand(java.lang.String ftpResumeCommand)

isDeleteTempFilesOnRemove

public boolean isDeleteTempFilesOnRemove()

setDeleteTempFilesOnRemove

public void setDeleteTempFilesOnRemove(boolean deleteTempFilesOnRemove)