◆ clearClipboard()
static void org.turro.attach.zul.AttachmentUtil.clearClipboard |
( |
| ) |
|
|
static |
Definition at line 189 of file AttachmentUtil.java.
190 Framework.getClipboard().remove(
"bba_clip_attach_folder_copy");
191 Framework.getClipboard().remove(
"bba_clip_attach_folder_cut");
192 Framework.getClipboard().remove(
"bba_clip_attach_copy");
193 Framework.getClipboard().remove(
"bba_clip_attach_cut");
◆ copyAttachment()
static void org.turro.attach.zul.AttachmentUtil.copyAttachment |
( |
Object |
value | ) |
|
|
static |
Definition at line 113 of file AttachmentUtil.java.
115 Framework.getClipboard().put(
"bba_clip_attach_copy", value);
static void clearClipboard()
◆ copyFolder()
static void org.turro.attach.zul.AttachmentUtil.copyFolder |
( |
Object |
value | ) |
|
|
static |
Definition at line 147 of file AttachmentUtil.java.
149 Framework.getClipboard().put(
"bba_clip_attach_folder_copy", value);
◆ cutAttachment()
static void org.turro.attach.zul.AttachmentUtil.cutAttachment |
( |
String |
name, |
|
|
final Object |
value |
|
) |
| |
|
static |
Definition at line 118 of file AttachmentUtil.java.
119 Messages.confirmCutting().add(name).show(() -> {
121 Framework.getClipboard().put(
"bba_clip_attach_cut", value);
◆ cutFolder()
static void org.turro.attach.zul.AttachmentUtil.cutFolder |
( |
String |
name, |
|
|
final Object |
value |
|
) |
| |
|
static |
Definition at line 152 of file AttachmentUtil.java.
153 Messages.confirmCutting().add(name).show(() -> {
155 Framework.getClipboard().put(
"bba_clip_attach_folder_cut", value);
◆ delete()
static Collection<Attachment> org.turro.attach.zul.AttachmentUtil.delete |
( |
String |
path | ) |
|
|
static |
Definition at line 102 of file AttachmentUtil.java.
103 Dao dao =
new AttachPU();
104 Collection<Attachment> list = (Collection<Attachment>) dao.getResultList(
105 "select a from Attachment a where a.path like ? or a.path = ?",
106 new Object[] {path +
"/%", path});
107 for(Attachment a : list) {
◆ download()
static boolean org.turro.attach.zul.AttachmentUtil.download |
( |
Attachment |
attachment | ) |
|
|
static |
Definition at line 44 of file AttachmentUtil.java.
48 try(DaoTransaction transaction =
new DaoTransaction(
new AttachPU())) {
50 attachment = transaction.saveObject(attachment);
51 Filedownload.save(attachment.getAttachContent().getFileContent(), attachment.getFileContentType(), attachment.getFileName());
55 SystemLogger.info().entity(attachment).comment(
"downloaded").log();
◆ hasClipboard()
static boolean org.turro.attach.zul.AttachmentUtil.hasClipboard |
( |
| ) |
|
|
static |
Definition at line 182 of file AttachmentUtil.java.
183 return Framework.getClipboard().get(
"bba_clip_attach_folder_copy") !=
null ||
184 Framework.getClipboard().get(
"bba_clip_attach_folder_cut") !=
null ||
185 Framework.getClipboard().get(
"bba_clip_attach_copy") !=
null ||
186 Framework.getClipboard().get(
"bba_clip_attach_cut") !=
null;
◆ paste()
static void org.turro.attach.zul.AttachmentUtil.paste |
( |
String |
toPath | ) |
|
|
static |
◆ respond()
static boolean org.turro.attach.zul.AttachmentUtil.respond |
( |
Respond |
respond, |
|
|
Long |
id |
|
) |
| |
|
static |
Definition at line 82 of file AttachmentUtil.java.
85 respond.name(attachment.getFileName())
86 .type(attachment.getFileContentType())
87 .lenght(attachment.getFileSize())
88 .flush(attachment.getAttachContent().getFileContent());
90 }
catch (IOException ex) {
91 WebLoggers.severe(AttachmentUtil.class).exception(ex).log();
static boolean respond(Respond respond, Long id)
static Attachment withContent(Attachment attachment)
◆ withContent() [1/2]
Definition at line 60 of file AttachmentUtil.java.
63 try(DaoTransaction transaction =
new DaoTransaction(
new AttachPU())) {
64 attachment = transaction.saveObject(attachment);
65 AttachContent content = attachment.getAttachContent();
66 content.getFileContent();
◆ withContent() [2/2]
static Attachment org.turro.attach.zul.AttachmentUtil.withContent |
( |
Long |
id | ) |
|
|
static |
Definition at line 73 of file AttachmentUtil.java.
74 try(DaoTransaction transaction =
new DaoTransaction(
new AttachPU())) {
75 Attachment attachment = transaction.find(Attachment.class,
id);
76 AttachContent content = attachment.getAttachContent();
77 content.getFileContent();
The documentation for this class was generated from the following file: