01: package org.emforge;
02:
03: import javax.jws.WebParam;
04: import javax.jws.WebService;
05:
06: import org.emforge.xfer.AttachmentHistoryTO;
07: import org.emforge.xfer.AttachmentTO;
08:
09: /** Service for working with Attachments */
10: @WebService
11: public interface AttachmentService {
12: /** Add attachment with using default user information
13: *
14: */
15: public Boolean addAttachment(@WebParam(name="parentName")
16: String parentName, @WebParam(name="fileName")
17: String fileName, @WebParam(name="content")
18: byte[] content, @WebParam(name="comment")
19: String comment) throws EmForgeException;
20:
21: /** Get Attachment for specified parentName and fileName
22: *
23: * @param parentName
24: * @param fileName
25: * @return
26: * @throws EmForgeException
27: */
28: public AttachmentTO getAttachment(@WebParam(name="parentName")
29: String parentName, @WebParam(name="fileName")
30: String fileName) throws EmForgeException;
31:
32: /** Get attachments for parent
33: *
34: */
35: public AttachmentTO[] getAttachments(@WebParam(name="parentName")
36: String parentName) throws EmForgeException;
37:
38: /** Get Attachment's content
39: */
40: public byte[] getAttachmentContent(@WebParam(name="attachment")
41: AttachmentTO attachment) throws EmForgeException;
42:
43: /** Get Attachment History
44: *
45: */
46: public AttachmentHistoryTO[] getAttachmentHistory(
47: @WebParam(name="attachment")
48: AttachmentTO attachment) throws EmForgeException;
49:
50: /** Delete Attachment
51: *
52: */
53: public Boolean deleteAttachment(@WebParam(name="attachment")
54: AttachmentTO attachment) throws EmForgeException;
55:
56: /** Is current user allowed to add attachment for specified page? */
57: public Boolean canAddAttachment(@WebParam(name="parentName")
58: String parentName);
59:
60: /** Is Current user allowed to delete specified attachment */
61: public Boolean canDeleteAttachment(@WebParam(name="attachment")
62: AttachmentTO attachment);
63: }
|