001 package jmaster.jumploader.model.api.config;
002
003 import java.net.HttpURLConnection;
004 import java.util.ArrayList;
005 import java.util.HashMap;
006 import java.util.Iterator;
007 import java.util.List;
008 import java.util.Map;
009 import java.util.MissingResourceException;
010 import java.util.StringTokenizer;
011
012 import jmaster.jumploader.app.JumpLoaderVersion;
013 import jmaster.jumploader.model.api.IModel;
014 import jmaster.jumploader.model.impl.image.WatermarkConfig;
015 import jmaster.util.http.AbstractHttpUploader;
016 import jmaster.util.io.zip.IZipFileFilter;
017 import jmaster.util.io.zip.impl.SystemZipUtil;
018 import jmaster.util.lang.StringHelper;
019 import jmaster.util.property.Property;
020 import jmaster.util.property.PropertyFactory;
021 import jmaster.util.property.PropertyHelper;
022
023
024 /**
025 * UploaderConfig
026 *
027 * @author timur
028 */
029
030 public class UploaderConfig {
031 //---------------------------------------------------------------
032 // constants
033 //---------------------------------------------------------------
034 /**
035 * property file
036 */
037 private static final String PROPERTY = "UploaderConfig.properties";
038 /**
039 * error response token
040 */
041 public static final String ERROR_RESPONSE_PREFIX = "Error:";
042 /**
043 * file id parameter name
044 */
045 public static final String PARAM_FILE_ID = "fileId";
046 /**
047 * file length parameter name
048 */
049 public static final String PARAM_FILE_LENGTH = "fileLength";
050 /**
051 * file name parameter name
052 */
053 public static final String PARAM_FILE_NAME = "fileName";
054 /**
055 * file path parameter name
056 */
057 public static final String PARAM_FILE_PATH = "filePath";
058 /**
059 * partition index parameter name
060 */
061 public static final String PARAM_PARTITION_INDEX = "partitionIndex";
062 /**
063 * partition count
064 */
065 public static final String PARAM_PARTITION_COUNT = "partitionCount";
066 /**
067 * MD5
068 */
069 public static final String PARAM_MD5 = "md5";
070 /**
071 * partition MD5
072 */
073 public static final String PARAM_PARTITION_MD5 = "partitionMd5";
074 /**
075 * zip file will be created for each file added to the queue
076 */
077 public static final String COMPRESSION_MODE_ZIP_ON_ADD = "zipOnAdd";
078 /**
079 * default http uploader class name
080 */
081 private static final String DEFAULT_HTTP_UPLOADER_CLASS_NAME = "jmaster.util.http.UrlConnectionHttpUploader";
082 /**
083 * image scale dimension modifier to fit scaled image in the box
084 */
085 public static final String IMAGE_SCALE_MODIFIER_FIT = "fit";
086 /**
087 * image scale dimension modifier to rotate image so it's orientation will match box orientation
088 */
089 public static final String IMAGE_SCALE_MODIFIER_ROTATE = "rotate";
090 /**
091 * image scale dimension modifier to cover the box with scaled image
092 */
093 public static final String IMAGE_SCALE_MODIFIER_COVER = "cover";
094 /**
095 * image scale dimension callback specifier prefix, if dimension starts with it,
096 * then remainder specifies JS function name to execute to retrieve proper dimension for image scaling.
097 * callback should accept 2 parameters: IUploadFile (file being scaled) and String (scaled instance name)
098 */
099 public static final String IMAGE_SCALE_CALLBACK = "callback:";
100 /**
101 * image modifier to trim
102 */
103 public static final String IMAGE_MODIFIER_TRIM = "trim";
104 /**
105 * Deprecated
106 * image scale dimension modifier same as fit,
107 * but before scaling image will be rotated so it's orientation will match box orientation
108 */
109 public static final String IMAGE_SCALE_MODIFIER_FIT_ROTATE = "fitRotate";
110 /**
111 * Deprecated
112 * image scale dimension modified same as crop,
113 * but before scaling image will be rotated so it's orientation will match box orientation
114 */
115 public static final String IMAGE_SCALE_MODIFIER_CROP_ROTATE = "cropRotate";
116 /**
117 * Deprecated
118 * image scale dimension modifier same as cover,
119 * but before scaling image will be rotated so it's orientation will match box orientation
120 */
121 public static final String IMAGE_SCALE_MODIFIER_COVER_ROTATE = "coverRotate";
122 /**
123 * image scale prefix for callback function
124 */
125 public static final String IMAGE_SCALE_MODIFIER_CROP = "crop";
126 /**
127 * original image mimetype parameter
128 */
129 public static final String PARAM_ORIGINAL_IMAGE_MIMETYPE = "originalImageMimetype";
130 /**
131 * file data flavor
132 */
133 public static final String DATA_FLAVOR_FILE = "file";
134 /**
135 * image data flavor
136 */
137 public static final String DATA_FLAVOR_IMAGE = "image";
138 /**
139 * ftp REST command
140 */
141 public static final String FTP_REST = "REST";
142 /**
143 * ftp APPE command
144 */
145 public static final String FTP_APPE = "APPE";
146
147 public static final String ZIP_ENCRYPTION_METHOD_STANDARD = "standard";
148 public static final String ZIP_ENCRYPTION_METHOD_AES = "aes";
149 //---------------------------------------------------------------
150 // business methods
151 //---------------------------------------------------------------
152 /**
153 * apply request headers to given http connection
154 */
155 public void applyRequestProperties(HttpURLConnection httpConn) {
156 Map properties = new HashMap();
157 if( !StringHelper.isEmpty(getRequestProperties() ) ) {
158 properties = StringHelper.getProperties(getRequestProperties());
159 }
160 if( !StringHelper.isEmpty( getUserAgent() ) ) {
161 properties.put( "User-Agent", getUserAgent() );
162 } else {
163 properties.put( "User-Agent", JumpLoaderVersion.getApplicationName() );
164 }
165 if( !StringHelper.isEmpty( getCookie() ) ) {
166 properties.put( "Cookie", getCookie() );
167 }
168 for( Iterator i = properties.keySet().iterator(); i.hasNext(); ) {
169 String key = ( String )i.next();
170 String value = ( String )properties.get( key );
171 httpConn.setRequestProperty( key, value );
172 }
173 }
174 //---------------------------------------------------------------
175 // properties
176 //---------------------------------------------------------------
177 /**
178 * instance
179 */
180 private static UploaderConfig instance;
181 /**
182 * upload thread count
183 */
184 private int uploadThreadCount = 1;
185 /**
186 * upload url
187 */
188 private String uploadUrl = null;
189 /**
190 * max files in a list, -1 if unlimited
191 */
192 private int maxFiles = -1;
193 /**
194 * max file length allowed (per file), -1 if unlimited
195 */
196 private long maxFileLength = -1;
197 /**
198 * max files length allowed (total), -1 if unlimited
199 */
200 private long maxLength = -1;
201 /**
202 * allowed file name (not path) regex pattern, null for all
203 */
204 private String fileNamePattern = null;
205 /**
206 * file name pattern description (appears in open file dialog)
207 */
208 private String fileNamePatternDescription = null;
209 /**
210 * shows whether folder addition enabled (will expand and add all files)
211 */
212 private boolean directoriesEnabled = false;
213 /**
214 * duplicate files enabled
215 */
216 private boolean duplicateFileEnabled = false;
217 /**
218 * file parameter name (for POST request)
219 */
220 private String fileParameterName = "file";
221 /**
222 * partitionLength
223 */
224 private long partitionLength = -1;
225 /**
226 * user agent
227 */
228 private String userAgent = null;
229 /**
230 * cookie
231 */
232 private String cookie = null;
233 /**
234 * use MD5 hash, if true, MD5 value will be send with
235 * last partition upload request
236 */
237 private boolean useMd5 = false;
238 /**
239 * send hash with all partitions of uploaded file
240 */
241 private boolean calculateHashOnUploadBegin = false;
242 /**
243 * security algorithm to apply for hash calculation, MD5 by default,
244 * acceptable values: "SHA-1", "MD5", "SHA-256", and "SHA-512"
245 */
246 private String hashAlg = "MD5";
247 /**
248 * use MD5 hash for each partition, if true, MD5 value for current partition
249 * will be send with each partition upload request
250 */
251 private boolean usePartitionMd5 = false;
252 /**
253 * min files in a list, -1 if unlimited
254 */
255 private int minFiles = -1;
256 /**
257 * min file length allowed (per file), -1 if unlimited
258 */
259 private long minFileLength = -1;
260 /**
261 * shows whether scaled images should be uploaded.
262 * if true, uploaded file would be ZIP archive where entries are scaled images of original,
263 * entry count and names will match scaled instance names.
264 */
265 private boolean uploadScaledImages;
266 /**
267 * Subsampling factor (SF) for loading images.
268 * Subsampling (S) (for both x and y axis) calculated with formula S = 1 + MPX / SF,
269 * where MPX is number of image megapixels (rounded).
270 * read here about image subsampling: http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/IIOParam.html#setSourceSubsampling(int, int, int, int)
271 * Subsampling allows to read large images using reasonable amount of memory.
272 */
273 private int imageSubsamplingFactor = 7;
274 /**
275 * shows whether scaled images should be uploaded not zipped (multiple files on one request).
276 * in this case file parameter name will match scaled instance name
277 */
278 private boolean uploadScaledImagesNoZip;
279 /**
280 * shows whether can resize smaller images to bigger dimension
281 */
282 private boolean stretchImages = false;
283 /**
284 * shows whether original image should be uploaded along with scaled images (valid if uploadScaledImages=true),
285 * or if image was transformed with image editor (original file will be posted with "originalImage" file)
286 */
287 private boolean uploadOriginalImage;
288 /**
289 * scaled instance names (comma separated, e.g. "small,medium,large")
290 */
291 private String scaledInstanceNames;
292 /**
293 * scaled instance target box dimensions (comma separated, for example "100x100xcrop,200x200xfit,400x400xcover").
294 * Each dimension also accepts scaling operators chain (separated by "-") at the end prepended with "x" separator (for example 100x100xop1-op2...opN).
295 * Operator could be one of:
296 * - fit (default if nothing specified) — scale image to maximum size that fits in the box;
297 * - cover — scale imageto minimum size that covers the box;
298 * - crop — center image in the box and crop image margins that doesn't fit in the box;
299 * - rotate — rotate image 90 degrees if image orientation doesn't match box orientation.
300 * Example: 200x200-cover-crop will scale image to cover box, then crop scaled image to 200x200
301 */
302 private String scaledInstanceDimensions;
303 /**
304 * scaled instance quality factors (0-worse quality, 1000-best),
305 * (comma spearated, fo example, "900,800,700");
306 */
307 private String scaledInstanceQualityFactors;
308 /**
309 * if image was not transformed, just recompress that and compare file size to original,
310 * then upload smaller file (original or recompressed)
311 */
312 private boolean scaledInstanceRecompressAndUploadSmaller;
313 /**
314 * scaled instance watermark names to apply, use null for skip
315 * (comma spearated, fo example, "null,mediumWatermark,null");
316 */
317 private String scaledInstanceWatermarkNames;
318 /**
319 * initialized watermarks
320 */
321 private List scaledInstanceWatermarks;
322 /**
323 * comma separated list of patterns to use for scaled instance filenames,
324 * number of patterns could be equal or less to number of scaled instance names
325 * (if less, then last will be used, if not set scaled instance name will be used).
326 * following tokens will be replaced with:
327 * %fn% - original file name
328 * %in% - scaled instance name
329 * Image format extension will be added automatically
330 */
331 private String scaledInstanceFilenamePatterns;
332 /**
333 * send original image mimetype (valid if using image scaling) with "originalImageMimetype" parameter
334 */
335 private boolean sendOriginalImageMimetype;
336 /**
337 * preserve metadata for scaled images, this could be one or multiple (comma separated) value(s), true or false
338 */
339 private String scaledInstancePreserveMetadata = "false";
340 /**
341 * scale mode for scaled images, this could be one or multiple (comma separated) value(s) from list:
342 * smooth, fast, bilinear, lanczos (default)
343 */
344 private String scaledInstanceScaleMode = "lanczos";
345 /**
346 * shows whether main file should be used
347 */
348 private boolean useMainFile = false;
349 /**
350 * shows whether images only allowed
351 */
352 private boolean addImagesOnly = false;
353 /**
354 * minimum image size allowed ({width}x{height})
355 */
356 private String minimumImageDimension;
357 /**
358 * maximum image size allowed ({width}x{height})
359 */
360 private String maximumImageDimension;
361 /**
362 * shows whether image editor is enabled
363 */
364 private boolean imageEditorEnabled = true;
365 /**
366 * shows whether image rotate is enabled
367 */
368 private boolean imageRotateEnabled = false;
369 /**
370 * resume check url
371 */
372 private String resumeCheckUrl;
373 /**
374 * shows whether filename parameters sent to server should be urlencoded
375 */
376 private boolean urlEncodeParameters;
377 /**
378 * shows whether lastModified attribute should be send for a file
379 */
380 private boolean sendFileLastModified = true;
381 /**
382 * compression mode, see constants
383 */
384 private String compressionMode = null;
385 /**
386 * prevent zipping single files that match pattern.
387 * Sample pattern for common archive files: ^.+\.(?i)((zip)|(rar)|(tar)|(gz))$
388 */
389 private String skipZippingFilesPattern = null;
390 /**
391 * add directory as zip flag
392 */
393 private boolean zipDirectoriesOnAdd = false;
394 /**
395 * send file path
396 */
397 private boolean sendFilePath = false;
398 /**
399 * maximum transfer rate (bytes/sec)
400 */
401 private long maxTransferRate = -1;
402 /**
403 * http uploader class name
404 */
405 private String httpUploaderClassName = DEFAULT_HTTP_UPLOADER_CLASS_NAME;
406 /**
407 * shows whether upload queue reardering allowed (false by default)
408 */
409 private boolean uploadQueueReorderingAllowed = false;
410 /**
411 * request encoding to use (UTF-8 by default)
412 */
413 private String requestEncoding = "UTF-8";
414 /**
415 * send image metadata data as xml (use file attribute named "imageMetadataXml").
416 * XML format is:
417 * [?xml version="1.0" encoding="UTF-8"?]
418 * [metadata]
419 * [directory name="Exif"]
420 * [tag type="0x010f" name="Make" desc="Canon"/]
421 * ... [more tags]
422 * [/directory]
423 * ... [more directories]
424 * [/metadata]
425 */
426 private boolean sendImageMetadata = false;
427 /**
428 * encoding name to use for IPTC image metadata reading
429 */
430 private String iptcEncoding = "UTF-8";
431 /**
432 * shows whether file relative path should be preserved as "relativePath" attribute value
433 * when adding directory in explode mode (i.e. not zipping folder content,
434 * but adding all the files in that directory recursively).
435 * For example, if adding directory c:/temp/d with files f1, f2,
436 * then file "relativePath" attribute values will be "d/f1" and ""d/f2"
437 */
438 private boolean preserveRelativePath;
439 /**
440 * metadata enabled flag
441 */
442 private boolean useMetadata;
443 /**
444 * metadata descriptor url
445 */
446 private String metadataDescriptorUrl;
447 /**
448 * disable upload if required metadata fields not filled
449 */
450 private boolean metadataCheckRequiredFields = true;
451 /**
452 * allowed file mime type regex pattern to apply for files, null for all
453 */
454 private String mimeTypePattern = null;
455 /**
456 * shows whether jmimemagic should be used for file mimetype retrieval,
457 * (false by default)
458 */
459 private boolean useJMimeMagic = false;
460 /**
461 * jmimemagic, whether or not to use extension to optimize order of content tests,
462 * (true by default)
463 */
464 private boolean jmmExtensionHints = true;
465 /**
466 * jmimemagic, only try to get mime type, no submatches are processed when true,
467 * (false by default)
468 */
469 private boolean jmmOnlyMimeMatch = false;
470 /**
471 * number of autoretries for a file in case of IOException (network error)
472 */
473 private int autoRetryCount = 0;
474
475 /**
476 * autoretry delays (seconds, comma separated) before retries, examples:
477 * {null}: no delay before all retries;
478 * "1": 1 second delay before all retries;
479 * "1,5,20": 1 second delay before 1st retry, 5 second delay before 2nd retry,
480 * 20 second delay before 3rd and subsequent retries;
481 */
482 private String autoRetryDelays = null;
483
484 /**
485 * shows whether it is necessary to use lossless jpeg transfromations whenever possible
486 */
487 private boolean useLosslessJpegTransformations = false;
488 /**
489 * general purpose check parameter name for upload files, if not null,
490 * each upload file will contain checkbox
491 * with tooltip message specified by generalPurposeCheckboxTooltip,
492 * applet will post parameter with value "true" or "false" (no value is same as false)
493 * corresponding to checkbox state.
494 */
495 private String generalPurposeCheckParamName = null;
496 /**
497 * use general purpose checkbox tooltip
498 */
499 private String generalPurposeCheckboxTooltip = null;
500 /**
501 * comma separated list of class names, that implements IUploaderListener interface.
502 * these will be instantited and added to uploader on init
503 */
504 private String uploaderListeners = null;
505 /**
506 * maximum allowed image megapixels to add
507 */
508 private double imageMaxMpx = 0;
509 /**
510 * form name, which values to POST with each upload request
511 */
512 private String uploadFormName = null;
513 /**
514 * shows whether image format should be preserved if possible (gif, png supported),
515 * otherwise all transformed image encoded to jpeg
516 */
517 private boolean preserveImageFormat = false;
518 /**
519 * shows whether image transformations made in the image editor
520 * should be saved and send to the server as xml
521 * Possible elements include:
522 * <resize width="int" height="int"/>
523 * <rotate clockwise="boolean"/>
524 * <crop left="int" top="int" right="int" bottom="int"/>
525 * <grayscale/>
526 * <sepia/>
527 * <blur radius="int"/>
528 * <contrast contrast="float" brightness="float"/>
529 */
530 private boolean saveImageTransformations = false;
531 /**
532 * shows whether individual partitions should be zipped before upload
533 * If partition zipped, upload parameter will be posted: zippedPartition=true.
534 */
535 private boolean zipPartitions = false;
536 /**
537 * shows whether uploaded files should be removed
538 */
539 private boolean removeUploadedFiles = false;
540 /**
541 * the maximum size of image to load
542 */
543 private int imageLoadPixelsMax = 7000000;
544 /**
545 * the maximum size of region to use for image scaling by regions
546 */
547 private int regionPixelsMax = 3000000;
548 /**
549 * shows whether adding image from clipboard enabled (default true)
550 */
551 private boolean clipboardImageEnabled = true;
552 /**
553 * image format to use when adding image from clipboard, supported formats are:
554 * jpg (default), png
555 */
556 private String clipboardImageFormat = "jpg";
557 /**
558 * image file name patten to give when adding image from clipboard,
559 * see http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
560 * default: "paste 0", this will result with files named sequentally: "paste 1", "paste 2" and so on.
561 */
562 private String clipboardImageNameFormat = "paste 0";
563 /**
564 * shows whether adding text from clipboard enabled (default true)
565 */
566 private boolean clipboardTextEnabled = true;
567 /**
568 * text format to use when adding text from clipboard, (default txt)
569 */
570 private String clipboardTextFormat = "txt";
571 /**
572 * text file name patten to give when adding text from clipboard,
573 * see http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
574 * default: "paste 0", this will result with files named sequentally: "paste 1", "paste 2" and so on.
575 */
576 private String clipboardTextNameFormat = "paste 0";
577 /**
578 * upload request properties (headers)
579 * Multiple properties should be separated by '|' character, key/value should be separated by '=',
580 * special characters should be escaped by '\\uXXXX', for example '='=\\u003d
581 */
582 private String requestProperties;
583 /**
584 * shows if errors occured during directory add should be silently ignored
585 * (true by default)
586 */
587 private boolean ignoreFileAddErrors = true;
588 /**
589 * preferred paste data flavor for adding file from clipboard data.
590 * Acceptable values are "file" (default) and "image".
591 * For example, when image copied with Internet Explorer both data flavors added to cipboard -
592 * file reference and bitmap image data. This parameter defines preferred data to be added for uploading.
593 */
594 private String preferredPasteDataFlavor = DATA_FLAVOR_FILE;
595 /**
596 * preferred ftp resume command,
597 * acceptable values are "REST" (default) and "APPE".
598 */
599 private String ftpResumeCommand = FTP_REST;
600 /**
601 * shows if temp files should be deleted as they remove from uploader
602 * (true by default)
603 */
604 private boolean deleteTempFilesOnRemove = true;
605 /**
606 * move uploaded files to specified folder, if set, all the files succesfully uploaded will be moved there,
607 * null by default
608 */
609 private String moveUploadedFileToFolder;
610 /**
611 * a value used for maxColorDiff value of image border trimming
612 */
613 private String imageTrimMaxColorDiff = "0.045";
614 /**
615 * add all the files using listed environment variables (comma-separated), i.e.: ENV_VAR_1,ENV_VAR_2,...,ENV_VAR_N
616 */
617 private String addFilesByEnv = null;
618 /**
619 * shows whether upload should stop after every file
620 */
621 private boolean uploadOneByOne = false;
622 /**
623 * http upload request method (POST by default)
624 */
625 private String httpUploadRequestMethod = "POST";
626 /**
627 * prefix to give for each uploaded file name after upload
628 */
629 private String renameUploadedFilePrefix = null;
630 /**
631 * zip util class name to use for zipping (must implement IZipUtil interface).
632 * default value is jmaster.util.io.zip.impl.SystemZipUtil.
633 * Another option is jmaster.zip4j.Zip4JZipUtil that supports encryption
634 */
635 private String zipUtilClassName = SystemZipUtil.class.getName();
636 /**
637 * callback javascript method name for accepting rejecting files being added to zip (when zipping folder).
638 * method should take two args of type java.io.File -
639 * file currently being added to zip and root directory added to zip,
640 * and third parameter: UploadFile (upload queue entry)
641 * File type could be retrieved using file.getAbsolutePath(), name - file.getName(),
642 * size - file.getLength(), directory - file.isDirectory(), file - file.isFile().
643 * function should return boolean: true - add to zip, false - skip.
644 */
645 private String zipFileFilterCallback = null;
646 /**
647 * zip file filter
648 */
649 private IZipFileFilter zipFileFilter;
650 /**
651 * zip encryption method, could be one of:
652 * null (none, default value), standard or aes.
653 * currently this works with Zip4JZipUtil only.
654 */
655 private String zipEncryptionMethod;
656 /**
657 * zip encryption password
658 */
659 private String zipEncryptionPassword;
660 /**
661 * shows whether document processor should wait until editor releases file lock (true by default)
662 */
663 private boolean documentProcessorWaitForFileUnlock = true;
664 /**
665 * upload form multipart boundary, generated random by default (i.e. "----------pQlAaKoQZknFjOby4zNkQX")
666 */
667 private String multipartBoundary = AbstractHttpUploader.generateRandomBoundary();
668 /**
669 * native command for unix systems to open file.
670 * by default this command is "open{|}${filePath}", but this may not work on some systems,
671 * so solution could be analyzing client request and setting proper command to open file
672 * (i.e. "gnome-open{|}${filePath}" works for ubuntu)
673 */
674 private String openFileUnixCmd;
675 /**
676 * shows whether start upload enabled when have only failed item(s) in a queue.
677 * start upload will retry all failed item(s) in this case.
678 * false by default.
679 */
680 private boolean retryFailedWhenStartUpload;
681 /**
682 * shows whether zipping should be done in a single thread
683 * (false by default)
684 */
685 private boolean singleZippingThread = false;
686 //---------------------------------------------------------------
687 // constructors
688 //---------------------------------------------------------------
689 /**
690 * with model
691 */
692 public UploaderConfig( IModel model ) {
693 super();
694 instance = this;
695 //
696 // inject properties, if present
697 try {
698 PropertyFactory pf = PropertyFactory.getInstance();
699 Property pr = pf.getProperty( PROPERTY );
700 PropertyHelper ph = PropertyHelper.getInstance();
701 ph.injectProperties( this, pr, null );
702 //
703 // init watermarks
704 UploaderConfig uc = this;
705 if( uc.getScaledInstanceWatermarkNames() != null ) {
706 StringTokenizer st = new StringTokenizer( uc.getScaledInstanceWatermarkNames(), "," );
707 int n = st.countTokens();
708 List watermarks = new ArrayList();
709 for( int i = 0; i < n; i++ ) {
710 String wmname = st.nextToken();
711 if( !"null".equals( wmname ) ) {
712 String wmprops = pr.getProperty( wmname );
713 WatermarkConfig wmc = new WatermarkConfig();
714 Property pr2 = PropertyHelper.makeProperty( wmprops, ";" );
715 PropertyHelper.getInstance().injectProperties( wmc, pr2, null );
716 watermarks.add( wmc );
717 } else {
718 watermarks.add( null );
719 }
720 }
721 uc.setScaledInstanceWatermarks( watermarks );
722 }
723 } catch( MissingResourceException ignore ) {
724 }
725 }
726 /**
727 * instance retrieval
728 */
729 public static UploaderConfig getInstance() {
730 return instance;
731 }
732 //---------------------------------------------------------------
733 // property accessors
734 //---------------------------------------------------------------
735 /**
736 * toString
737 */
738 public String toString() {
739 return "" +
740 "uploadThreadCount=" + uploadThreadCount + "\r\n" +
741 "uploadUrl=" + uploadUrl + "\r\n" +
742 "maxFiles=" + maxFiles + "\r\n" +
743 "maxFileLength=" + maxFileLength + "\r\n" +
744 "maxLength=" + maxLength + "\r\n" +
745 "fileNamePattern=" + fileNamePattern + "\r\n" +
746 "fileNamePatternDescription=" + fileNamePatternDescription + "\r\n" +
747 "directoriesEnabled=" + directoriesEnabled + "\r\n" +
748 "duplicateFileEnabled=" + duplicateFileEnabled + "\r\n" +
749 "fileParameterName=" + fileParameterName + "\r\n" +
750 "partitionLength=" + partitionLength + "\r\n" +
751 "userAgent=" + userAgent + "\r\n" +
752 "cookie=" + cookie + "\r\n" +
753 "useMd5=" + useMd5 + "\r\n" +
754 "hashAlg=" + hashAlg + "\r\n" +
755 "usePartitionMd5=" + usePartitionMd5 + "\r\n" +
756 "minFiles=" + minFiles + "\r\n" +
757 "minFileLength=" + minFileLength + "\r\n" +
758 "uploadScaledImages=" + uploadScaledImages + "\r\n" +
759 "uploadScaledImagesNoZip=" + uploadScaledImagesNoZip + "\r\n" +
760 "stretchImages=" + stretchImages + "\r\n" +
761 "uploadOriginalImage=" + uploadOriginalImage + "\r\n" +
762 "scaledInstanceNames=" + scaledInstanceNames + "\r\n" +
763 "scaledInstanceDimensions=" + scaledInstanceDimensions + "\r\n" +
764 "scaledInstanceQualityFactors=" + scaledInstanceQualityFactors + "\r\n" +
765 "scaledInstanceRecompressAndUploadSmaller=" + scaledInstanceRecompressAndUploadSmaller + "\r\n" +
766 "scaledInstanceWatermarkNames=" + scaledInstanceWatermarkNames + "\r\n" +
767 "scaledInstancePreserveMetadata=" + scaledInstancePreserveMetadata + "\r\n" +
768 "scaledInstanceScaleMode=" + scaledInstanceScaleMode + "\r\n" +
769 "scaledInstanceFilenamePatterns=" + scaledInstanceFilenamePatterns + "\r\n" +
770 "sendOriginalImageMimetype=" + sendOriginalImageMimetype + "\r\n" +
771 "imageSubsamplingFactor=" + imageSubsamplingFactor + "\r\n" +
772 "useMainFile=" + useMainFile + "\r\n" +
773 "addImagesOnly=" + addImagesOnly + "\r\n" +
774 "minimumImageDimension=" + minimumImageDimension + "\r\n" +
775 "maximumImageDimension=" + minimumImageDimension + "\r\n" +
776 "imageEditorEnabled=" + imageEditorEnabled + "\r\n" +
777 "imageRotateEnabled=" + imageRotateEnabled + "\r\n" +
778 "resumeCheckUrl=" + resumeCheckUrl + "\r\n" +
779 "urlEncodeParameters=" + urlEncodeParameters + "\r\n" +
780 "sendFileLastModified=" + sendFileLastModified + "\r\n" +
781 "compressionMode=" + compressionMode + "\r\n" +
782 "zipDirectoriesOnAdd=" + zipDirectoriesOnAdd + "\r\n" +
783 "sendFilePath=" + sendFilePath + "\r\n" +
784 "maxTransferRate=" + maxTransferRate + "\r\n" +
785 "httpUploaderClassName=" + httpUploaderClassName + "\r\n" +
786 "uploadQueueReorderingAllowed=" + uploadQueueReorderingAllowed + "\r\n" +
787 "requestEncoding=" + requestEncoding + "\r\n" +
788 "sendImageMetadata=" + sendImageMetadata + "\r\n" +
789 "preserveRelativePath=" + preserveRelativePath + "\r\n" +
790 "useMetadata=" + useMetadata + "\r\n" +
791 "metadataDescriptorUrl=" + metadataDescriptorUrl + "\r\n" +
792 "metadataCheckRequiredFields=" + metadataCheckRequiredFields + "\r\n" +
793 "mimeTypePattern=" + mimeTypePattern + "\r\n" +
794 "useJMimeMagic=" + useJMimeMagic + "\r\n" +
795 "jmmExtensionHints=" + jmmExtensionHints + "\r\n" +
796 "jmmOnlyMimeMatch=" + jmmOnlyMimeMatch + "\r\n" +
797 "autoRetryCount=" + autoRetryCount + "\r\n" +
798 "autoRetryDelays=" + autoRetryDelays + "\r\n" +
799 "useLosslessJpegTransformations=" + useLosslessJpegTransformations + "\r\n" +
800 "generalPurposeCheckParamName=" + generalPurposeCheckParamName + "\r\n" +
801 "generalPurposeCheckboxTooltip=" + generalPurposeCheckboxTooltip + "\r\n" +
802 "uploaderListeners=" + uploaderListeners + "\r\n" +
803 "imageMaxMpx=" + imageMaxMpx + "\r\n" +
804 "uploadFormName=" + uploadFormName + "\r\n" +
805 "preserveImageFormat=" + preserveImageFormat + "\r\n" +
806 "saveImageTransformations=" + saveImageTransformations + "\r\n" +
807 "zipPartitions=" + zipPartitions + "\r\n" +
808 "removeUploadedFiles=" + removeUploadedFiles + "\r\n" +
809 "imageLoadPixelsMax=" + imageLoadPixelsMax + "\r\n" +
810 "regionPixelsMax=" + regionPixelsMax + "\r\n" +
811 "clipboardImageEnabled=" + clipboardImageEnabled + "\r\n" +
812 "clipboardImageFormat=" + clipboardImageFormat + "\r\n" +
813 "clipboardImageNameFormat=" + clipboardImageNameFormat + "\r\n" +
814 "clipboardTextEnabled=" + clipboardTextEnabled + "\r\n" +
815 "clipboardTextFormat=" + clipboardTextFormat + "\r\n" +
816 "clipboardTextNameFormat=" + clipboardTextNameFormat + "\r\n" +
817 "requestProperties=" + requestProperties + "\r\n" +
818 "ignoreFileAddErrors=" + ignoreFileAddErrors + "\r\n" +
819 "preferredPasteDataFlavor=" + preferredPasteDataFlavor + "\r\n" +
820 "ftpResumeCommand=" + ftpResumeCommand + "\r\n" +
821 "deleteTempFilesOnRemove=" + deleteTempFilesOnRemove + "\r\n" +
822 "iptcEncoding=" + iptcEncoding + "\r\n" +
823 "moveUploadedFileToFolder=" + moveUploadedFileToFolder + "\r\n" +
824 "imageTrimMaxColorDiff=" + imageTrimMaxColorDiff + "\r\n" +
825 "addFilesByEnv=" + addFilesByEnv + "\r\n" +
826 "uploadOneByOne=" + uploadOneByOne + "\r\n" +
827 "calculateHashOnUploadBegin=" + calculateHashOnUploadBegin + "\r\n" +
828 "httpUploadRequestMethod=" + httpUploadRequestMethod + "\r\n" +
829 "renameUploadedFilePrefix=" + renameUploadedFilePrefix + "\r\n" +
830 "zipUtilClassName=" + zipUtilClassName + "\r\n" +
831 "zipFileFilterCallback=" + zipFileFilterCallback + "\r\n" +
832 "zipFileFilter=" + zipFileFilter + "\r\n" +
833 "zipEncryptionMethod=" + zipEncryptionMethod + "\r\n" +
834 "zipEncryptionPassword=" + zipEncryptionPassword + "\r\n" +
835 "documentProcessorWaitForFileUnlock=" + documentProcessorWaitForFileUnlock + "\r\n" +
836 "multipartBoundary=" + multipartBoundary + "\r\n" +
837 "openFileUnixCmd=" + openFileUnixCmd + "\r\n" +
838 "retryFailedWhenStartUpload=" + retryFailedWhenStartUpload + "\r\n" +
839 "singleZippingThread=" + singleZippingThread + "\r\n" +
840 "";
841 }
842 public String getCompressionMode() {
843 return compressionMode;
844 }
845 public void setCompressionMode(String compressionMode) {
846 this.compressionMode = compressionMode;
847 }
848 public boolean isDirectoriesEnabled() {
849 return directoriesEnabled;
850 }
851 public void setDirectoriesEnabled(boolean directoriesEnabled) {
852 this.directoriesEnabled = directoriesEnabled;
853 }
854 public boolean isDuplicateFileEnabled() {
855 return duplicateFileEnabled;
856 }
857 public void setDuplicateFileEnabled(boolean duplicateFileEnabled) {
858 this.duplicateFileEnabled = duplicateFileEnabled;
859 }
860 public String getFileNamePattern() {
861 return fileNamePattern;
862 }
863 public void setFileNamePattern(String fileNamePattern) {
864 this.fileNamePattern = StringHelper.isEmpty( fileNamePattern ) ?
865 null : fileNamePattern;
866 }
867 public long getMaxFileLength() {
868 return maxFileLength;
869 }
870 public void setMaxFileLength(long maxFileLength) {
871 this.maxFileLength = maxFileLength;
872 }
873 public int getMaxFiles() {
874 return maxFiles;
875 }
876 public void setMaxFiles(int maxFiles) {
877 this.maxFiles = maxFiles;
878 }
879 public long getMaxLength() {
880 return maxLength;
881 }
882 public void setMaxLength(long maxLength) {
883 this.maxLength = maxLength;
884 }
885 public int getUploadThreadCount() {
886 return uploadThreadCount;
887 }
888 public void setUploadThreadCount(int uploadThreadCount) {
889 this.uploadThreadCount = uploadThreadCount;
890 }
891 public String getUploadUrl() {
892 return uploadUrl;
893 }
894 public void setUploadUrl(String uploadUrl) {
895 this.uploadUrl = uploadUrl;
896 }
897 public String getFileParameterName() {
898 return fileParameterName;
899 }
900 public void setFileParameterName(String fileParameterName) {
901 this.fileParameterName = fileParameterName;
902 }
903 public long getPartitionLength() {
904 return partitionLength;
905 }
906 public void setPartitionLength(long partitionLength) {
907 this.partitionLength = partitionLength;
908 }
909 public String getUserAgent() {
910 return userAgent;
911 }
912 public void setUserAgent(String userAgent) {
913 this.userAgent = userAgent;
914 }
915 public boolean isUseMd5() {
916 return useMd5;
917 }
918 public void setUseMd5(boolean useMd5) {
919 this.useMd5 = useMd5;
920 }
921 public int getMinFiles() {
922 return minFiles;
923 }
924 public void setMinFiles(int minFiles) {
925 this.minFiles = minFiles;
926 }
927 public String getScaledInstanceDimensions() {
928 return scaledInstanceDimensions;
929 }
930 public void setScaledInstanceDimensions(String scaledInstanceDimensions) {
931 this.scaledInstanceDimensions = scaledInstanceDimensions;
932 }
933 public String getScaledInstanceNames() {
934 return scaledInstanceNames;
935 }
936 public void setScaledInstanceNames(String scaledInstanceNames) {
937 this.scaledInstanceNames = scaledInstanceNames;
938 }
939 public String getScaledInstanceQualityFactors() {
940 return scaledInstanceQualityFactors;
941 }
942 public void setScaledInstanceQualityFactors(String scaledInstanceQualityFactors) {
943 this.scaledInstanceQualityFactors = scaledInstanceQualityFactors;
944 }
945 public boolean isUploadScaledImages() {
946 return uploadScaledImages;
947 }
948 public void setUploadScaledImages(boolean uploadScaledImages) {
949 this.uploadScaledImages = uploadScaledImages;
950 }
951 public long getMinFileLength() {
952 return minFileLength;
953 }
954 public void setMinFileLength(long minFileLength) {
955 this.minFileLength = minFileLength;
956 }
957 public boolean isUseMainFile() {
958 return useMainFile;
959 }
960 public void setUseMainFile(boolean useMainFile) {
961 this.useMainFile = useMainFile;
962 }
963 public boolean isAddImagesOnly() {
964 return addImagesOnly;
965 }
966 public void setAddImagesOnly(boolean addImagesOnly) {
967 this.addImagesOnly = addImagesOnly;
968 }
969 public String getMinimumImageDimension() {
970 return minimumImageDimension;
971 }
972 public void setMinimumImageDimension(String minimumImageDimension) {
973 this.minimumImageDimension = minimumImageDimension;
974 }
975 public String getMaximumImageDimension() {
976 return maximumImageDimension;
977 }
978 public void setMaximumImageDimension(String maximumImageDimension) {
979 this.maximumImageDimension = maximumImageDimension;
980 }
981 public boolean isImageEditorEnabled() {
982 return imageEditorEnabled;
983 }
984 public void setImageEditorEnabled(boolean imageEditorEnabled) {
985 this.imageEditorEnabled = imageEditorEnabled;
986 }
987 public String getResumeCheckUrl() {
988 return resumeCheckUrl;
989 }
990 public void setResumeCheckUrl(String resumeCheckUrl) {
991 this.resumeCheckUrl = resumeCheckUrl;
992 }
993 public boolean isUsePartitionMd5() {
994 return usePartitionMd5;
995 }
996 public void setUsePartitionMd5(boolean usePartitionMd5) {
997 this.usePartitionMd5 = usePartitionMd5;
998 }
999 public boolean isUploadOriginalImage() {
1000 return uploadOriginalImage;
1001 }
1002 public void setUploadOriginalImage(boolean uploadOriginalImage) {
1003 this.uploadOriginalImage = uploadOriginalImage;
1004 }
1005 public boolean isStretchImages() {
1006 return stretchImages;
1007 }
1008 public void setStretchImages(boolean stretchImages) {
1009 this.stretchImages = stretchImages;
1010 }
1011 public boolean isUrlEncodeParameters() {
1012 return urlEncodeParameters;
1013 }
1014 public void setUrlEncodeParameters(boolean urlEncodeParameters) {
1015 this.urlEncodeParameters = urlEncodeParameters;
1016 }
1017 public boolean isSendFileLastModified() {
1018 return sendFileLastModified;
1019 }
1020 public void setSendFileLastModified(boolean sendFileLastModified) {
1021 this.sendFileLastModified = sendFileLastModified;
1022 }
1023 public boolean isZipDirectoriesOnAdd() {
1024 return zipDirectoriesOnAdd;
1025 }
1026 public void setZipDirectoriesOnAdd(boolean zipDirectoriesOnAdd) {
1027 this.zipDirectoriesOnAdd = zipDirectoriesOnAdd;
1028 }
1029 public boolean isSendFilePath() {
1030 return sendFilePath;
1031 }
1032 public void setSendFilePath(boolean sendFilePath) {
1033 this.sendFilePath = sendFilePath;
1034 }
1035 public long getMaxTransferRate() {
1036 return maxTransferRate;
1037 }
1038 public void setMaxTransferRate(long maxTransferRate) {
1039 this.maxTransferRate = maxTransferRate;
1040 }
1041 public String getCookie() {
1042 return cookie;
1043 }
1044 public void setCookie(String cookie) {
1045 this.cookie = cookie;
1046 }
1047 public String getHttpUploaderClassName() {
1048 return httpUploaderClassName;
1049 }
1050 public void setHttpUploaderClassName(String httpUploaderClassName) {
1051 this.httpUploaderClassName = httpUploaderClassName;
1052 }
1053 public boolean isUploadQueueReorderingAllowed() {
1054 return uploadQueueReorderingAllowed;
1055 }
1056 public void setUploadQueueReorderingAllowed(boolean uploadQueueReorderingAllowed) {
1057 this.uploadQueueReorderingAllowed = uploadQueueReorderingAllowed;
1058 }
1059 public String getRequestEncoding() {
1060 return requestEncoding;
1061 }
1062 public void setRequestEncoding(String requestEncoding) {
1063 this.requestEncoding = requestEncoding;
1064 }
1065 public String getScaledInstanceWatermarkNames() {
1066 return scaledInstanceWatermarkNames;
1067 }
1068 public void setScaledInstanceWatermarkNames(String scaledInstanceWatermarkNames) {
1069 this.scaledInstanceWatermarkNames = scaledInstanceWatermarkNames;
1070 }
1071 public List getScaledInstanceWatermarks() {
1072 return scaledInstanceWatermarks;
1073 }
1074 public void setScaledInstanceWatermarks(List scaledInstanceWatermarks) {
1075 this.scaledInstanceWatermarks = scaledInstanceWatermarks;
1076 }
1077 public boolean isPreserveRelativePath() {
1078 return preserveRelativePath;
1079 }
1080 public void setPreserveRelativePath(boolean preserveRelativePath) {
1081 this.preserveRelativePath = preserveRelativePath;
1082 }
1083 public boolean isUploadScaledImagesNoZip() {
1084 return uploadScaledImagesNoZip;
1085 }
1086 public void setUploadScaledImagesNoZip(boolean uploadScaledImagesNoZip) {
1087 this.uploadScaledImagesNoZip = uploadScaledImagesNoZip;
1088 }
1089 public int getImageSubsamplingFactor() {
1090 return imageSubsamplingFactor;
1091 }
1092 public void setImageSubsamplingFactor(int imageSubsamplingFactor) {
1093 this.imageSubsamplingFactor = imageSubsamplingFactor;
1094 }
1095 public boolean isUseMetadata() {
1096 return useMetadata;
1097 }
1098 public void setUseMetadata(boolean useMetadata) {
1099 this.useMetadata = useMetadata;
1100 }
1101 public String getMetadataDescriptorUrl() {
1102 return metadataDescriptorUrl;
1103 }
1104 public void setMetadataDescriptorUrl(String metadataDescriptorUrl) {
1105 this.metadataDescriptorUrl = metadataDescriptorUrl;
1106 }
1107 public String getMimeTypePattern() {
1108 return mimeTypePattern;
1109 }
1110 public void setMimeTypePattern(String mimeTypePattern) {
1111 this.mimeTypePattern = mimeTypePattern;
1112 }
1113 public boolean isUseJMimeMagic() {
1114 return useJMimeMagic;
1115 }
1116 public void setUseJMimeMagic(boolean useJMimeMagic) {
1117 this.useJMimeMagic = useJMimeMagic;
1118 }
1119 public boolean isJmmExtensionHints() {
1120 return jmmExtensionHints;
1121 }
1122 public void setJmmExtensionHints(boolean jmmExtensionHints) {
1123 this.jmmExtensionHints = jmmExtensionHints;
1124 }
1125 public boolean isJmmOnlyMimeMatch() {
1126 return jmmOnlyMimeMatch;
1127 }
1128 public void setJmmOnlyMimeMatch(boolean jmmOnlyMimeMatch) {
1129 this.jmmOnlyMimeMatch = jmmOnlyMimeMatch;
1130 }
1131 public boolean isImageRotateEnabled() {
1132 return imageRotateEnabled;
1133 }
1134 public void setImageRotateEnabled(boolean imageRotateEnabled) {
1135 this.imageRotateEnabled = imageRotateEnabled;
1136 }
1137 public boolean isMetadataCheckRequiredFields() {
1138 return metadataCheckRequiredFields;
1139 }
1140 public void setMetadataCheckRequiredFields(boolean metadataCheckRequiredFields) {
1141 this.metadataCheckRequiredFields = metadataCheckRequiredFields;
1142 }
1143 public boolean isSendImageMetadata() {
1144 return sendImageMetadata;
1145 }
1146 public void setSendImageMetadata(boolean sendImageMetadata) {
1147 this.sendImageMetadata = sendImageMetadata;
1148 }
1149 public int getAutoRetryCount() {
1150 return autoRetryCount;
1151 }
1152 public void setAutoRetryCount(int autoRetryCount) {
1153 this.autoRetryCount = autoRetryCount;
1154 }
1155 public boolean isUseLosslessJpegTransformations() {
1156 return useLosslessJpegTransformations;
1157 }
1158 public void setUseLosslessJpegTransformations(
1159 boolean useLosslessJpegTransformations) {
1160 this.useLosslessJpegTransformations = useLosslessJpegTransformations;
1161 }
1162 public String getGeneralPurposeCheckParamName() {
1163 return generalPurposeCheckParamName;
1164 }
1165 public void setGeneralPurposeCheckParamName(String generalPurposeCheckParamName) {
1166 this.generalPurposeCheckParamName = generalPurposeCheckParamName;
1167 }
1168 public String getGeneralPurposeCheckboxTooltip() {
1169 return generalPurposeCheckboxTooltip;
1170 }
1171 public void setGeneralPurposeCheckboxTooltip(
1172 String generalPurposeCheckboxTooltip) {
1173 this.generalPurposeCheckboxTooltip = generalPurposeCheckboxTooltip;
1174 }
1175 public String getUploaderListeners() {
1176 return uploaderListeners;
1177 }
1178 public void setUploaderListeners(String uploaderListeners) {
1179 this.uploaderListeners = uploaderListeners;
1180 }
1181 public double getImageMaxMpx() {
1182 return imageMaxMpx;
1183 }
1184 public void setImageMaxMpx(double imageMaxMpx) {
1185 this.imageMaxMpx = imageMaxMpx;
1186 }
1187 public String getUploadFormName() {
1188 return uploadFormName;
1189 }
1190 public void setUploadFormName(String uploadFormName) {
1191 this.uploadFormName = uploadFormName;
1192 }
1193 public boolean isPreserveImageFormat() {
1194 return preserveImageFormat;
1195 }
1196 public void setPreserveImageFormat(boolean preserveImageFormat) {
1197 this.preserveImageFormat = preserveImageFormat;
1198 }
1199 public String getFileNamePatternDescription() {
1200 return fileNamePatternDescription;
1201 }
1202 public void setFileNamePatternDescription(String fileNamePatternDescription) {
1203 this.fileNamePatternDescription = fileNamePatternDescription;
1204 }
1205 public String getSkipZippingFilesPattern() {
1206 return skipZippingFilesPattern;
1207 }
1208 public void setSkipZippingFilesPattern(String skipZippingFilesPattern) {
1209 this.skipZippingFilesPattern = skipZippingFilesPattern;
1210 }
1211 public boolean isScaledInstanceRecompressAndUploadSmaller() {
1212 return scaledInstanceRecompressAndUploadSmaller;
1213 }
1214 public void setScaledInstanceRecompressAndUploadSmaller(
1215 boolean scaledInstanceRecompressAndUploadSmaller) {
1216 this.scaledInstanceRecompressAndUploadSmaller = scaledInstanceRecompressAndUploadSmaller;
1217 }
1218 public boolean isSendOriginalImageMimetype() {
1219 return sendOriginalImageMimetype;
1220 }
1221 public void setSendOriginalImageMimetype(boolean sendOriginalImageMimetype) {
1222 this.sendOriginalImageMimetype = sendOriginalImageMimetype;
1223 }
1224 public boolean isSaveImageTransformations() {
1225 return saveImageTransformations;
1226 }
1227 public void setSaveImageTransformations(boolean saveImageTransformations) {
1228 this.saveImageTransformations = saveImageTransformations;
1229 }
1230 public boolean isZipPartitions() {
1231 return zipPartitions;
1232 }
1233 public void setZipPartitions(boolean zipPartitions) {
1234 this.zipPartitions = zipPartitions;
1235 }
1236 public boolean isRemoveUploadedFiles() {
1237 return removeUploadedFiles;
1238 }
1239 public void setRemoveUploadedFiles(boolean removeUploadedFiles) {
1240 this.removeUploadedFiles = removeUploadedFiles;
1241 }
1242 public int getRegionPixelsMax() {
1243 return regionPixelsMax;
1244 }
1245 public void setRegionPixelsMax(int regionPixelsMax) {
1246 this.regionPixelsMax = regionPixelsMax;
1247 }
1248 public int getImageLoadPixelsMax() {
1249 return imageLoadPixelsMax;
1250 }
1251 public void setImageLoadPixelsMax(int imageLoadPixelsMax) {
1252 this.imageLoadPixelsMax = imageLoadPixelsMax;
1253 }
1254 public String getScaledInstancePreserveMetadata() {
1255 return scaledInstancePreserveMetadata;
1256 }
1257 public void setScaledInstancePreserveMetadata(
1258 String scaledInstancePreserveMetadata) {
1259 this.scaledInstancePreserveMetadata = scaledInstancePreserveMetadata;
1260 }
1261 public String getScaledInstanceScaleMode() {
1262 return scaledInstanceScaleMode;
1263 }
1264 public void setScaledInstanceScaleMode(String scaledInstanceScaleMode) {
1265 this.scaledInstanceScaleMode = scaledInstanceScaleMode;
1266 }
1267 public boolean isClipboardImageEnabled() {
1268 return clipboardImageEnabled;
1269 }
1270 public void setClipboardImageEnabled(boolean clipboardImageEnabled) {
1271 this.clipboardImageEnabled = clipboardImageEnabled;
1272 }
1273 public String getClipboardImageFormat() {
1274 return clipboardImageFormat;
1275 }
1276 public void setClipboardImageFormat(String clipboardImageFormat) {
1277 this.clipboardImageFormat = clipboardImageFormat;
1278 }
1279 public String getClipboardImageNameFormat() {
1280 return clipboardImageNameFormat;
1281 }
1282 public void setClipboardImageNameFormat(String clipboardImageNameFormat) {
1283 this.clipboardImageNameFormat = clipboardImageNameFormat;
1284 }
1285 public String getRequestProperties() {
1286 return requestProperties;
1287 }
1288 public void setRequestProperties(String requestProperties) {
1289 this.requestProperties = requestProperties;
1290 }
1291 public boolean isIgnoreFileAddErrors() {
1292 return ignoreFileAddErrors;
1293 }
1294 public void setIgnoreFileAddErrors(boolean ignoreFileAddErrors) {
1295 this.ignoreFileAddErrors = ignoreFileAddErrors;
1296 }
1297 public String getPreferredPasteDataFlavor() {
1298 return preferredPasteDataFlavor;
1299 }
1300 public void setPreferredPasteDataFlavor(String preferredPasteDataFlavor) {
1301 this.preferredPasteDataFlavor = preferredPasteDataFlavor;
1302 }
1303 public String getFtpResumeCommand() {
1304 return ftpResumeCommand;
1305 }
1306 public void setFtpResumeCommand(String ftpResumeCommand) {
1307 this.ftpResumeCommand = ftpResumeCommand;
1308 }
1309 public boolean isDeleteTempFilesOnRemove() {
1310 return deleteTempFilesOnRemove;
1311 }
1312 public void setDeleteTempFilesOnRemove(boolean deleteTempFilesOnRemove) {
1313 this.deleteTempFilesOnRemove = deleteTempFilesOnRemove;
1314 }
1315 public String getAutoRetryDelays() {
1316 return autoRetryDelays;
1317 }
1318 public void setAutoRetryDelays(String autoRetryDelays) {
1319 this.autoRetryDelays = autoRetryDelays;
1320 }
1321 public String getIptcEncoding() {
1322 return iptcEncoding;
1323 }
1324 public void setIptcEncoding(String iptcEncoding) {
1325 this.iptcEncoding = iptcEncoding;
1326 }
1327 public String getHashAlg() {
1328 return hashAlg;
1329 }
1330 public void setHashAlg(String hashAlg) {
1331 this.hashAlg = hashAlg;
1332 }
1333 public String getMoveUploadedFileToFolder() {
1334 return moveUploadedFileToFolder;
1335 }
1336 public void setMoveUploadedFileToFolder(String moveUploadedFileToFolder) {
1337 this.moveUploadedFileToFolder = moveUploadedFileToFolder;
1338 }
1339 public String getImageTrimMaxColorDiff() {
1340 return imageTrimMaxColorDiff;
1341 }
1342 public void setImageTrimMaxColorDiff(String imageTrimMaxColorDiff) {
1343 this.imageTrimMaxColorDiff = imageTrimMaxColorDiff;
1344 }
1345 public String getAddFilesByEnv() {
1346 return addFilesByEnv;
1347 }
1348 public void setAddFilesByEnv(String addFilesByEnv) {
1349 this.addFilesByEnv = addFilesByEnv;
1350 }
1351 public boolean isUploadOneByOne() {
1352 return uploadOneByOne;
1353 }
1354 public void setUploadOneByOne(boolean uploadOneByOne) {
1355 this.uploadOneByOne = uploadOneByOne;
1356 }
1357 public boolean isCalculateHashOnUploadBegin() {
1358 return calculateHashOnUploadBegin;
1359 }
1360 public void setCalculateHashOnUploadBegin(boolean calculateHashOnUploadBegin) {
1361 this.calculateHashOnUploadBegin = calculateHashOnUploadBegin;
1362 }
1363 public String getScaledInstanceFilenamePatterns() {
1364 return scaledInstanceFilenamePatterns;
1365 }
1366 public void setScaledInstanceFilenamePatterns(
1367 String scaledInstanceFilenamePatterns) {
1368 this.scaledInstanceFilenamePatterns = scaledInstanceFilenamePatterns;
1369 }
1370 public boolean isClipboardTextEnabled() {
1371 return clipboardTextEnabled;
1372 }
1373 public void setClipboardTextEnabled(boolean clipboardTextEnabled) {
1374 this.clipboardTextEnabled = clipboardTextEnabled;
1375 }
1376 public String getClipboardTextFormat() {
1377 return clipboardTextFormat;
1378 }
1379 public void setClipboardTextFormat(String clipboardTextFormat) {
1380 this.clipboardTextFormat = clipboardTextFormat;
1381 }
1382 public String getClipboardTextNameFormat() {
1383 return clipboardTextNameFormat;
1384 }
1385 public void setClipboardTextNameFormat(String clipboardTextNameFormat) {
1386 this.clipboardTextNameFormat = clipboardTextNameFormat;
1387 }
1388 public String getHttpUploadRequestMethod() {
1389 return httpUploadRequestMethod;
1390 }
1391 public void setHttpUploadRequestMethod(String httpUploadRequestMethod) {
1392 this.httpUploadRequestMethod = httpUploadRequestMethod;
1393 }
1394 public String getRenameUploadedFilePrefix() {
1395 return renameUploadedFilePrefix;
1396 }
1397 public void setRenameUploadedFilePrefix(String renameUploadedFilePrefix) {
1398 this.renameUploadedFilePrefix = renameUploadedFilePrefix;
1399 }
1400 public IZipFileFilter getZipFileFilter() {
1401 return zipFileFilter;
1402 }
1403 public void setZipFileFilter(IZipFileFilter zipFileFilter) {
1404 this.zipFileFilter = zipFileFilter;
1405 }
1406 public String getZipFileFilterCallback() {
1407 return zipFileFilterCallback;
1408 }
1409 public void setZipFileFilterCallback(String zipFileFilterCallback) {
1410 this.zipFileFilterCallback = zipFileFilterCallback;
1411 }
1412 public String getZipEncryptionMethod() {
1413 return zipEncryptionMethod;
1414 }
1415 public void setZipEncryptionMethod(String zipEncryptionMethod) {
1416 this.zipEncryptionMethod = zipEncryptionMethod;
1417 }
1418 public String getZipEncryptionPassword() {
1419 return zipEncryptionPassword;
1420 }
1421 public void setZipEncryptionPassword(String zipEncryptionPassword) {
1422 this.zipEncryptionPassword = zipEncryptionPassword;
1423 }
1424 public String getZipUtilClassName() {
1425 return zipUtilClassName;
1426 }
1427 public void setZipUtilClassName(String zipUtilClassName) {
1428 this.zipUtilClassName = zipUtilClassName;
1429 }
1430 public boolean isDocumentProcessorWaitForFileUnlock() {
1431 return documentProcessorWaitForFileUnlock;
1432 }
1433 public void setDocumentProcessorWaitForFileUnlock(
1434 boolean documentProcessorWaitForFileUnlock) {
1435 this.documentProcessorWaitForFileUnlock = documentProcessorWaitForFileUnlock;
1436 }
1437 public String getMultipartBoundary() {
1438 return multipartBoundary;
1439 }
1440 public void setMultipartBoundary(String multipartBoundary) {
1441 this.multipartBoundary = multipartBoundary;
1442 }
1443 public String getOpenFileUnixCmd() {
1444 return openFileUnixCmd;
1445 }
1446 public void setOpenFileUnixCmd(String openFileUnixCmd) {
1447 this.openFileUnixCmd = openFileUnixCmd;
1448 }
1449 public boolean isRetryFailedWhenStartUpload() {
1450 return retryFailedWhenStartUpload;
1451 }
1452 public void setRetryFailedWhenStartUpload(boolean retryFailedWhenStartUpload) {
1453 this.retryFailedWhenStartUpload = retryFailedWhenStartUpload;
1454 }
1455 public boolean isSingleZippingThread() {
1456 return singleZippingThread;
1457 }
1458 public void setSingleZippingThread(boolean singleZippingThread) {
1459 this.singleZippingThread = singleZippingThread;
1460 }
1461 }