|
||||||||||
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,
com.opensymphony.user.User remoteUser,
org.ofbiz.core.entity.GenericValue issue,
java.lang.String fileParamName,
java.util.Map<java.lang.String,java.lang.Object> attachmentProperties)
Create an issue's attachment. |
TemporaryAttachment |
createTemporaryAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper,
java.lang.Long issueId,
java.lang.String fileParamName)
Creates a temporary attachment on disk. |
boolean |
validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper,
java.lang.String fileParamName,
boolean required)
Determine whether an attachment exists and is valid (i.e. |
Method Detail |
---|
ChangeItemBean createAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper, com.opensymphony.user.User remoteUser, org.ofbiz.core.entity.GenericValue issue, java.lang.String fileParamName, java.util.Map<java.lang.String,java.lang.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
TemporaryAttachment createTemporaryAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper, java.lang.Long issueId, java.lang.String fileParamName) throws AttachmentException
TemporaryAttachment
object
requestWrapper
- the wrapper containing getFile() and getFilesystemName() describing the attachmentissueId
- The issue id that this temporary attachment is for. Can be null when creating a new issuefileParamName
- ame of form parameter specifying filename (in requestWrapper).
TemporaryAttachment
containing details about where the temp attachment was created
AttachmentException
- if there was an error saving the temporary attachment.boolean validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper, java.lang.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 required
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |