Subversion Repository Public Repository

litesoft

Diff Revisions 905 vs 906 for /trunk/mobileGWT/gwt-phonegap/src/main/java/com/googlecode/gwtphonegap/client/file/FileUploadOptions.java

Diff revisions: vs.
  @@ -1,16 +1,14 @@
1 1 /*
2 2 * Copyright 2011 Daniel Kurka
3 3 *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 - * use this file except in compliance with the License. You may obtain a copy of
6 - * the License at
4 + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 + * in compliance with the License. You may obtain a copy of the License at
7 6 *
8 7 * http://www.apache.org/licenses/LICENSE-2.0
9 8 *
10 - * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 - * License for the specific language governing permissions and limitations under
9 + * Unless required by applicable law or agreed to in writing, software distributed under the License
10 + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 + * or implied. See the License for the specific language governing permissions and limitations under
14 12 * the License.
15 13 */
16 14 package com.googlecode.gwtphonegap.client.file;
  @@ -18,55 +16,72 @@
18 16 import java.util.Map;
19 17
20 18 public class FileUploadOptions {
21 - private String fileKey;
19 + private String fileKey;
22 20
23 - private String fileName;
21 + private String fileName;
24 22
25 - private String mimeType;
23 + private String mimeType;
26 24
27 - private Map<String, String> params;
25 + private Map<String, String> params;
28 26
29 - public FileUploadOptions() {
27 + private Map<String, String> headers;
30 28
31 - }
29 + public FileUploadOptions() {
32 30
33 - public FileUploadOptions(String fileKey, String fileName, String mimeType, Map<String, String> params) {
34 - this.fileKey = fileKey;
35 - this.fileName = fileName;
36 - this.mimeType = mimeType;
37 - this.params = params;
38 - }
31 + }
39 32
40 - public String getFileKey() {
41 - return fileKey;
42 - }
33 + public FileUploadOptions(String fileKey, String fileName, String mimeType,
34 + Map<String, String> params) {
35 + this(fileKey, fileName, mimeType, params, null);
36 + }
43 37
44 - public void setFileKey(String fileKey) {
45 - this.fileKey = fileKey;
46 - }
38 + public FileUploadOptions(String fileKey, String fileName, String mimeType,
39 + Map<String, String> params, Map<String, String> headers) {
40 + this.fileKey = fileKey;
41 + this.fileName = fileName;
42 + this.mimeType = mimeType;
43 + this.params = params;
44 + this.headers = headers;
45 + }
47 46
48 - public String getFileName() {
49 - return fileName;
50 - }
47 + public String getFileKey() {
48 + return fileKey;
49 + }
51 50
52 - public void setFileName(String fileName) {
53 - this.fileName = fileName;
54 - }
51 + public void setFileKey(String fileKey) {
52 + this.fileKey = fileKey;
53 + }
55 54
56 - public String getMimeType() {
57 - return mimeType;
58 - }
55 + public String getFileName() {
56 + return fileName;
57 + }
59 58
60 - public void setMimeType(String mimeType) {
61 - this.mimeType = mimeType;
62 - }
59 + public void setFileName(String fileName) {
60 + this.fileName = fileName;
61 + }
63 62
64 - public Map<String, String> getParams() {
65 - return params;
66 - }
63 + public String getMimeType() {
64 + return mimeType;
65 + }
67 66
68 - public void setParams(Map<String, String> params) {
69 - this.params = params;
70 - }
67 + public void setMimeType(String mimeType) {
68 + this.mimeType = mimeType;
69 + }
70 +
71 + public Map<String, String> getParams() {
72 + return params;
73 + }
74 +
75 + public void setParams(Map<String, String> params) {
76 + this.params = params;
77 + }
78 +
79 + public void setHeaders(Map<String, String> headers) {
80 + this.headers = headers;
81 + }
82 +
83 + public Map<String, String> getHeaders() {
84 + return headers;
85 + }
71 86
72 87 }