Definition at line 60 of file Attachment.java.
◆ canShow()
boolean org.turro.attach.entity.Attachment.canShow |
( |
HashSet< String > |
restrictedFolders | ) |
|
Definition at line 409 of file Attachment.java.
410 return canShow(restrictedFolders, Application.getApplication().isInRole(
"attach-show:all"));
boolean canShow(HashSet< String > restrictedFolders)
◆ canShowTo()
boolean org.turro.attach.entity.Attachment.canShowTo |
( |
IContact |
contact, |
|
|
HashSet< String > |
restrictedFolders |
|
) |
| |
Definition at line 413 of file Attachment.java.
414 return canShow(restrictedFolders, contact.getPermissions().isInRole(
"attach-show:all"));
◆ cloneEntity()
Attachment org.turro.attach.entity.Attachment.cloneEntity |
( |
| ) |
|
Definition at line 317 of file Attachment.java.
318 Attachment a = AttachmentUtil.withContent(
this);
319 Attachment na =
new Attachment();
320 na.setComment(a.comment);
321 na.setFileContentType(a.fileContentType);
322 na.setFileName(a.fileName);
323 na.setFileSize(a.fileSize);
324 na.setLockComment(a.lockComment);
325 na.setLockCommit(a.lockCommit);
326 na.setLockDate(a.lockDate);
327 na.setLocked(a.locked);
328 na.setLocker(a.locker);
329 na.setModification(a.modification);
330 na.setOnlyOwner(a.onlyOwner);
331 na.setOwner(a.owner);
333 na.setShowKey(a.showKey);
334 na.setValidated(a.validated);
335 AttachContent nac =
new AttachContent();
336 nac.setFileContent(a.attachContent.getFileContent());
337 na.setAttachContent(nac);
◆ getAttachContent()
AttachContent org.turro.attach.entity.Attachment.getAttachContent |
( |
| ) |
|
◆ getByteString()
String org.turro.attach.entity.Attachment.getByteString |
( |
| ) |
|
◆ getComment()
String org.turro.attach.entity.Attachment.getComment |
( |
| ) |
|
◆ getContentModified()
byte [] org.turro.attach.entity.Attachment.getContentModified |
( |
IContact |
contact | ) |
throws IOException, DocumentException |
Definition at line 355 of file Attachment.java.
358 if(contact !=
null && contact.isValid()) {
359 WatermarkCfg cfg =
new WatermarkCfg(getContactName(contact), 45.0F);
360 Watermark mark =
new Watermark();
361 ByteArrayOutputStream output =
new ByteArrayOutputStream((
int)
getFileSize());
363 new ByteArrayInputStream(ac.getFileContent()),
365 return output.toByteArray();
367 return new byte[] {};
370 return ac.getFileContent();
Attachment getWithContent()
AttachContent getAttachContent()
◆ getDateString()
String org.turro.attach.entity.Attachment.getDateString |
( |
IConstructor |
constructor | ) |
|
◆ getFileContentType()
String org.turro.attach.entity.Attachment.getFileContentType |
( |
| ) |
|
◆ getFileExtension()
String org.turro.attach.entity.Attachment.getFileExtension |
( |
| ) |
|
Definition at line 297 of file Attachment.java.
298 if(fileName !=
null) {
299 int p = fileName.lastIndexOf(
".");
301 return fileName.substring(p + 1).toLowerCase();
◆ getFileName()
String org.turro.attach.entity.Attachment.getFileName |
( |
| ) |
|
◆ getFileSize()
long org.turro.attach.entity.Attachment.getFileSize |
( |
| ) |
|
◆ getId()
Long org.turro.attach.entity.Attachment.getId |
( |
| ) |
|
◆ getIOwner()
IContact org.turro.attach.entity.Attachment.getIOwner |
( |
| ) |
|
Definition at line 388 of file Attachment.java.
389 if(!Strings.isBlank(owner)) {
390 IContact contact = Contacts.getContactById(owner);
391 if(!contact.isValid()) {
392 contact.loadByLogin(owner);
394 if(contact.isValid()) {
◆ getLockComment()
String org.turro.attach.entity.Attachment.getLockComment |
( |
| ) |
|
◆ getLockCommit()
Date org.turro.attach.entity.Attachment.getLockCommit |
( |
| ) |
|
◆ getLockDate()
Date org.turro.attach.entity.Attachment.getLockDate |
( |
| ) |
|
◆ getLocker()
String org.turro.attach.entity.Attachment.getLocker |
( |
| ) |
|
◆ getModification()
Date org.turro.attach.entity.Attachment.getModification |
( |
| ) |
|
◆ getOwner()
String org.turro.attach.entity.Attachment.getOwner |
( |
| ) |
|
◆ getOwnerEntity()
Definition at line 403 of file Attachment.java.
404 return Entities.getController(
new Path(path).getTill(2));
◆ getPath()
String org.turro.attach.entity.Attachment.getPath |
( |
| ) |
|
◆ getRelatedPath()
String org.turro.attach.entity.Attachment.getRelatedPath |
( |
| ) |
|
◆ getRelativePath()
String org.turro.attach.entity.Attachment.getRelativePath |
( |
String |
root | ) |
|
Definition at line 307 of file Attachment.java.
311 if(path.toUpperCase().startsWith(root.toUpperCase())) {
312 return path.substring(root.length());
◆ getROShowURL()
String org.turro.attach.entity.Attachment.getROShowURL |
( |
IConstructor |
constructor | ) |
|
Definition at line 443 of file Attachment.java.
444 return AttachDownload.createROURL(constructor,
this);
◆ getShowKey()
String org.turro.attach.entity.Attachment.getShowKey |
( |
| ) |
|
◆ getShowURL()
String org.turro.attach.entity.Attachment.getShowURL |
( |
IConstructor |
constructor | ) |
|
Definition at line 439 of file Attachment.java.
440 return AttachDownload.createURL(constructor,
this);
◆ getSingleStatus() [1/2]
◆ getSingleStatus() [2/2]
Definition at line 462 of file Attachment.java.
463 IAcceptances acceptances = Plugins.loadImplementation(IAcceptances.class);
464 return acceptances.getStatusFor(AttachPU.getObjectPath(
this), contact,
getIOwner());
◆ getWithContent()
Attachment org.turro.attach.entity.Attachment.getWithContent |
( |
| ) |
|
Definition at line 351 of file Attachment.java.
352 return AttachmentUtil.withContent(
this);
◆ isLocked()
boolean org.turro.attach.entity.Attachment.isLocked |
( |
| ) |
|
◆ isOnlyOwner()
boolean org.turro.attach.entity.Attachment.isOnlyOwner |
( |
| ) |
|
◆ isPDF()
boolean org.turro.attach.entity.Attachment.isPDF |
( |
| ) |
|
Definition at line 373 of file Attachment.java.
374 return fileName.toLowerCase().endsWith(
".pdf");
◆ isPublishable()
boolean org.turro.attach.entity.Attachment.isPublishable |
( |
| ) |
|
◆ isRequiresAcceptance()
boolean org.turro.attach.entity.Attachment.isRequiresAcceptance |
( |
| ) |
|
◆ isValidated()
boolean org.turro.attach.entity.Attachment.isValidated |
( |
| ) |
|
◆ isWatermark()
boolean org.turro.attach.entity.Attachment.isWatermark |
( |
| ) |
|
◆ setAttachContent()
void org.turro.attach.entity.Attachment.setAttachContent |
( |
AttachContent |
attachContent | ) |
|
◆ setComment()
void org.turro.attach.entity.Attachment.setComment |
( |
String |
comment | ) |
|
◆ setDateModification()
void org.turro.attach.entity.Attachment.setDateModification |
( |
Date |
value | ) |
|
Definition at line 341 of file Attachment.java.
342 modification =
new CheckDate(modification).setDayMonthYear(value).getDate();
◆ setFileContentType()
void org.turro.attach.entity.Attachment.setFileContentType |
( |
String |
fileContentType | ) |
|
Definition at line 235 of file Attachment.java.
236 this.fileContentType = fileContentType;
◆ setFileName()
void org.turro.attach.entity.Attachment.setFileName |
( |
String |
fileName | ) |
|
◆ setFileSize()
void org.turro.attach.entity.Attachment.setFileSize |
( |
long |
fileSize | ) |
|
◆ setId()
void org.turro.attach.entity.Attachment.setId |
( |
Long |
id | ) |
|
◆ setLockComment()
void org.turro.attach.entity.Attachment.setLockComment |
( |
String |
lockComment | ) |
|
◆ setLockCommit()
void org.turro.attach.entity.Attachment.setLockCommit |
( |
Date |
lockCommit | ) |
|
◆ setLockDate()
void org.turro.attach.entity.Attachment.setLockDate |
( |
Date |
lockDate | ) |
|
◆ setLocked()
void org.turro.attach.entity.Attachment.setLocked |
( |
boolean |
locked | ) |
|
◆ setLocker()
void org.turro.attach.entity.Attachment.setLocker |
( |
String |
locker | ) |
|
◆ setModification()
void org.turro.attach.entity.Attachment.setModification |
( |
Date |
modification | ) |
|
◆ setOnlyOwner()
void org.turro.attach.entity.Attachment.setOnlyOwner |
( |
boolean |
onlyOwner | ) |
|
◆ setOwner()
void org.turro.attach.entity.Attachment.setOwner |
( |
String |
owner | ) |
|
◆ setPath()
void org.turro.attach.entity.Attachment.setPath |
( |
String |
path | ) |
|
Definition at line 192 of file Attachment.java.
194 while(path.indexOf(
"//") > -1) {
195 path = path.replaceAll(
"//",
"/");
197 if(path.endsWith(
"/")) {
198 path = path.substring(0, path.length() - 1);
200 if(!path.startsWith(
"/")) {
◆ setPublishable()
void org.turro.attach.entity.Attachment.setPublishable |
( |
boolean |
publishable | ) |
|
◆ setRelatedPath()
void org.turro.attach.entity.Attachment.setRelatedPath |
( |
String |
relatedPath | ) |
|
◆ setRequiresAcceptance()
void org.turro.attach.entity.Attachment.setRequiresAcceptance |
( |
boolean |
requiresAcceptance | ) |
|
Definition at line 283 of file Attachment.java.
284 this.requiresAcceptance = requiresAcceptance;
◆ setShowKey()
void org.turro.attach.entity.Attachment.setShowKey |
( |
String |
showKey | ) |
|
◆ setTimeModification()
void org.turro.attach.entity.Attachment.setTimeModification |
( |
Date |
value | ) |
|
Definition at line 345 of file Attachment.java.
346 modification =
new CheckDate(modification).setHourMinute(value).getDate();
◆ setValidated()
void org.turro.attach.entity.Attachment.setValidated |
( |
boolean |
validated | ) |
|
◆ setWatermark()
void org.turro.attach.entity.Attachment.setWatermark |
( |
boolean |
watermark | ) |
|
The documentation for this class was generated from the following file: