FileAttribute.java
4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
package cn.keking.model;
import cn.keking.config.ConfigConstants;
import com.hotent.base.util.BeanUtils;
import java.util.List;
/**
* Created by kl on 2018/1/17.
* Content :
*/
public class FileAttribute {
private FileType type;
private String suffix;
private String name;
private String url;
private String fileKey;
private String officePreviewType = ConfigConstants.getOfficePreviewType();
private String fileId;
/**
* 存储类型
*/
private String storeType;
/**
* 标签名字列表
*/
private List<String> tagNames;
/**
* 标签id列表
*/
private List<String> tagIds;
/**
* 所属文件夹id
*/
private String folderId;
/**
* 所属文件夹名字
*/
private String folderName;
/**
* 文件大小
*/
private Long size;
/**
* 文件大小,例:1kb
*/
private String sizeStr;
/**
* 更新时间
*/
private String updateTime;
/**
* 所属人id
*/
private String ownerId;
/**
* 所属人名字
*/
private String ownerName;
public FileAttribute() {
}
public FileAttribute(FileType type, String suffix, String name, String url) {
this.type = type;
this.suffix = suffix;
this.name = name;
this.url = url;
}
public FileAttribute(FileType type, String suffix, String name, String url, String officePreviewType) {
this.type = type;
this.suffix = suffix;
this.name = name;
this.url = url;
this.officePreviewType = officePreviewType;
}
public String getFileKey() {
return fileKey;
}
public void setFileKey(String fileKey) {
this.fileKey = fileKey;
}
public String getOfficePreviewType() {
return officePreviewType;
}
public void setOfficePreviewType(String officePreviewType) {
this.officePreviewType = officePreviewType;
}
public FileType getType() {
return type;
}
public void setType(FileType type) {
this.type = type;
}
public String getSuffix() {
return suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileIdOrFileKey(){
if(BeanUtils.isNotEmpty(fileId)){
return this.fileId;
}
return fileKey;
}
public List<String> getTagNames() {
return tagNames;
}
public void setTagNames(List<String> tagNames) {
this.tagNames = tagNames;
}
public List<String> getTagIds() {
return tagIds;
}
public void setTagIds(List<String> tagIds) {
this.tagIds = tagIds;
}
public String getFolderId() {
return folderId;
}
public void setFolderId(String folderId) {
this.folderId = folderId;
}
public String getFolderName() {
return folderName;
}
public void setFolderName(String folderName) {
this.folderName = folderName;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public String getSizeStr() {
return sizeStr;
}
public void setSizeStr(String sizeStr) {
this.sizeStr = sizeStr;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getOwnerId() {
return ownerId;
}
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public String getStoreType() {
return storeType;
}
public void setStoreType(String storeType) {
this.storeType = storeType;
}
}