|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebAttachmentManager
Manager for issue attachments.
Method Summary | |
---|---|
ChangeItemBean |
createAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper,
User remoteUser,
org.ofbiz.core.entity.GenericValue issue,
String fileParamName,
Map<String,Object> attachmentProperties)
Create an issue's attachment. |
boolean |
validateAttachmentIfExists(File file,
String fileName)
Determine whether an attachment exists and is valid (i.e. |
boolean |
validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper,
String fileParamName,
boolean required)
Determine whether an attachment exists and is valid (i.e. |
Method Detail |
---|
ChangeItemBean createAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper, User remoteUser, org.ofbiz.core.entity.GenericValue issue, String fileParamName, Map<String,Object> attachmentProperties) throws AttachmentException, org.ofbiz.core.entity.GenericEntityException
requestWrapper
- eg. obtained from ServletActionContext.getMultiPartRequest()
remoteUser
- eg. from JiraWebActionSupport.getRemoteUser()
issue
- Issue to associate attachment withfileParamName
- Name of form parameter specifying filename (in requestWrapper).attachmentProperties
- Arbitrary key:value properties to store with this attachment. Key is a String, value is an Object mappable to a PropertySet
.
Eg. {"attachment.copyright.licensed" -> Boolean.TRUE}
AttachmentException
org.ofbiz.core.entity.GenericEntityException
boolean validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper, String fileParamName, boolean required) throws AttachmentException
requestWrapper
- the wrapper containing getFile() and getFilesystemName() describing the attachmentfileParamName
- the parameter in the wrapper to use to find attachment inforequired
- whether having an valid and existent attachment is mandatory
AttachmentException
- if the attachment is zero-length, contains invalid characters, or simply doesn't exist
when requiredboolean validateAttachmentIfExists(File file, String fileName) throws AttachmentException
file
- the attachment File objectfileName
- the filename of the attachment
AttachmentException
- if the attachment is zero-length, contains invalid characters, or simply doesn't exist
when required
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |