com.atlassian.jira.web.util
Class DefaultWebAttachmentManager
java.lang.Object
com.atlassian.jira.web.util.DefaultWebAttachmentManager
- All Implemented Interfaces:
- WebAttachmentManager
public class DefaultWebAttachmentManager
- extends Object
- implements WebAttachmentManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultWebAttachmentManager
public DefaultWebAttachmentManager(AttachmentManager attachmentManager)
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
- Description copied from interface:
WebAttachmentManager
- Create an issue's attachment.
- Specified by:
createAttachment
in interface WebAttachmentManager
- Parameters:
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}
- Throws:
AttachmentException
org.ofbiz.core.entity.GenericEntityException
validateAttachmentIfExists
public boolean validateAttachmentIfExists(webwork.multipart.MultiPartRequestWrapper requestWrapper,
String fileParamName,
boolean required)
throws AttachmentException
- Specified by:
validateAttachmentIfExists
in interface WebAttachmentManager
- Throws:
AttachmentException
validateAttachmentIfExists
public boolean validateAttachmentIfExists(File file,
String fileName)
throws AttachmentException
- Specified by:
validateAttachmentIfExists
in interface WebAttachmentManager
- Returns:
- true if the file exists, false if it doesn't.
- Throws:
AttachmentException
- If the file exists and is not valid.
Copyright © 2002-2008 Atlassian. All Rights Reserved.