com.atlassian.jira.web.util
Interface WebAttachmentManager

All Known Implementing Classes:
DefaultWebAttachmentManager

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 attachmentProperties)
          Create an issue's attachment.
 boolean validateAttachmentIfExists(File file, String fileName)
           
 boolean validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper, String fileParamName, boolean required)
           
 

Method Detail

createAttachment

public ChangeItemBean createAttachment(webwork.multipart.MultiPartRequestWrapper requestWrapper,
                                       User remoteUser,
                                       org.ofbiz.core.entity.GenericValue issue,
                                       String fileParamName,
                                       Map attachmentProperties)
                                throws AttachmentException,
                                       org.ofbiz.core.entity.GenericEntityException
Create an issue's attachment.

Parameters:
requestWrapper - eg. obtained from ServletActionContext.getMultiPartRequest()
remoteUser - eg. from JiraWebActionSupport.getRemoteUser()
issue - Issue to associate attachment with
fileParamName - 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}
Throws:
AttachmentException
org.ofbiz.core.entity.GenericEntityException

validateAttachmentIfExists

public boolean validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper,
                                          String fileParamName,
                                          boolean required)
                                   throws AttachmentException
Throws:
AttachmentException

validateAttachmentIfExists

public boolean validateAttachmentIfExists(File file,
                                          String fileName)
                                   throws AttachmentException
Throws:
AttachmentException


Copyright © 2002-2007 Atlassian. All Rights Reserved.