public class UploadedResource extends Object implements AttachmentResource
| Constructor and Description |
|---|
UploadedResource(File file,
String filename,
String contentType,
String comment) |
UploadedResource(File file,
String filename,
String contentType,
String comment,
boolean minorEdit,
boolean hidden)
Creates an upload resource.
|
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile) |
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
String comment) |
UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
String comment,
boolean minorEdit) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
org.springframework.core.io.Resource |
createRelative(String relativePath) |
boolean |
exists() |
String |
getComment() |
long |
getContentLength() |
String |
getContentType() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
URI |
getURI() |
URL |
getURL() |
boolean |
isHidden() |
boolean |
isMinorEdit() |
boolean |
isOpen() |
boolean |
isReadable() |
long |
lastModified() |
String |
toString() |
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile)
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
String comment)
public UploadedResource(File file, String filename, String contentType, String comment)
public UploadedResource(com.atlassian.xwork.FileUploadUtils.UploadedFile uploadedFile,
String comment,
boolean minorEdit)
public UploadedResource(File file, String filename, String contentType, String comment, boolean minorEdit, boolean hidden)
file - the file to be uploaded, cannot be nullcomment - a comment for the upload. Can be nullminorEdit - boolean indicating whether this upload is a minor edit or not. Minor edit set to true means
that this upload should not generate any notifications, but it will be added to the activity stream.hidden - 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 String getDescription()
getDescription in interface org.springframework.core.io.Resourcepublic File getFile()
getFile in interface org.springframework.core.io.Resourcepublic String getFilename() throws IllegalStateException
getFilename in interface org.springframework.core.io.ResourceIllegalStateExceptionpublic String getComment()
getComment in interface AttachmentResourcepublic InputStream getInputStream() throws IOException
getInputStream in interface org.springframework.core.io.InputStreamSourceIOExceptionpublic String getContentType()
getContentType in interface AttachmentResourcepublic long getContentLength()
getContentLength in interface AttachmentResourcepublic long contentLength()
contentLength in interface org.springframework.core.io.Resourcepublic boolean isMinorEdit()
isMinorEdit in interface AttachmentResourceAttachment.isMinorEdit())public boolean isHidden()
isHidden in interface AttachmentResourceAttachment.isHidden())public boolean exists()
exists in interface org.springframework.core.io.Resourcepublic boolean isOpen()
isOpen in interface org.springframework.core.io.Resourcepublic URL getURL() throws IOException
getURL in interface org.springframework.core.io.ResourceIOExceptionpublic org.springframework.core.io.Resource createRelative(String relativePath) throws IOException
createRelative in interface org.springframework.core.io.ResourceIOExceptionpublic boolean isReadable()
isReadable in interface org.springframework.core.io.Resourcepublic URI getURI() throws IOException
getURI in interface org.springframework.core.io.ResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourceIOExceptionCopyright © 2003–2020 Atlassian. All rights reserved.