public class UploadedResource extends java.lang.Object implements AttachmentResource
Constructor and Description |
---|
UploadedResource(java.io.File file,
java.lang.String filename,
java.lang.String contentType,
java.lang.String comment) |
UploadedResource(java.io.File file,
java.lang.String filename,
java.lang.String contentType,
java.lang.String comment,
boolean hidden) |
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile) |
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
java.lang.String comment) |
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
java.lang.String comment,
boolean hidden)
Creates an upload resource.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.core.io.Resource |
createRelative(java.lang.String relativePath) |
boolean |
exists() |
java.lang.String |
getComment() |
long |
getContentLength() |
java.lang.String |
getContentType() |
java.lang.String |
getDescription() |
java.io.File |
getFile() |
java.lang.String |
getFilename() |
java.io.InputStream |
getInputStream() |
java.net.URI |
getURI() |
java.net.URL |
getURL() |
boolean |
isMinorEdit() |
boolean |
isOpen() |
boolean |
isReadable() |
long |
lastModified() |
java.lang.String |
toString() |
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile)
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile, java.lang.String comment)
public UploadedResource(java.io.File file, java.lang.String filename, java.lang.String contentType, java.lang.String comment)
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile, java.lang.String comment, boolean hidden)
uploadedFile
- the file to be uploaded, cannot be nullcomment
- a comment for the upload. Can be nullhidden
- boolean indicating whether we want this upload to be hidden or not. Hidden set to true means
that this upload should not generate any notifications, or be added to the activity stream.public UploadedResource(java.io.File file, java.lang.String filename, java.lang.String contentType, java.lang.String comment, boolean hidden)
public java.lang.String getDescription()
getDescription
in interface org.springframework.core.io.Resource
public java.io.File getFile()
getFile
in interface org.springframework.core.io.Resource
public java.lang.String getFilename() throws java.lang.IllegalStateException
getFilename
in interface org.springframework.core.io.Resource
java.lang.IllegalStateException
public java.lang.String getComment()
getComment
in interface AttachmentResource
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface org.springframework.core.io.InputStreamSource
java.io.IOException
public java.lang.String getContentType()
getContentType
in interface AttachmentResource
public long getContentLength()
getContentLength
in interface AttachmentResource
public boolean isMinorEdit()
isMinorEdit
in interface AttachmentResource
Attachment.isMinorEdit()
)public boolean exists()
exists
in interface org.springframework.core.io.Resource
public boolean isOpen()
isOpen
in interface org.springframework.core.io.Resource
public java.net.URL getURL() throws java.io.IOException
getURL
in interface org.springframework.core.io.Resource
java.io.IOException
public org.springframework.core.io.Resource createRelative(java.lang.String relativePath) throws java.io.IOException
createRelative
in interface org.springframework.core.io.Resource
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isReadable()
isReadable
in interface org.springframework.core.io.Resource
public java.net.URI getURI() throws java.io.IOException
getURI
in interface org.springframework.core.io.Resource
java.io.IOException
public long lastModified() throws java.io.IOException
lastModified
in interface org.springframework.core.io.Resource
java.io.IOException
Copyright © 2003-2014 Atlassian. All Rights Reserved.