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.Resource
public File getFile()
getFile
in interface org.springframework.core.io.Resource
public String getFilename() throws IllegalStateException
getFilename
in interface org.springframework.core.io.Resource
IllegalStateException
public String getComment()
getComment
in interface AttachmentResource
public InputStream getInputStream() throws IOException
getInputStream
in interface org.springframework.core.io.InputStreamSource
IOException
public String getContentType()
getContentType
in interface AttachmentResource
public long getContentLength()
getContentLength
in interface AttachmentResource
public long contentLength()
contentLength
in interface org.springframework.core.io.Resource
public boolean isMinorEdit()
isMinorEdit
in interface AttachmentResource
Attachment.isMinorEdit()
)public boolean isHidden()
isHidden
in interface AttachmentResource
Attachment.isHidden()
)public boolean exists()
exists
in interface org.springframework.core.io.Resource
public boolean isOpen()
isOpen
in interface org.springframework.core.io.Resource
public URL getURL() throws IOException
getURL
in interface org.springframework.core.io.Resource
IOException
public org.springframework.core.io.Resource createRelative(String relativePath) throws IOException
createRelative
in interface org.springframework.core.io.Resource
IOException
public boolean isReadable()
isReadable
in interface org.springframework.core.io.Resource
public URI getURI() throws IOException
getURI
in interface org.springframework.core.io.Resource
IOException
public long lastModified() throws IOException
lastModified
in interface org.springframework.core.io.Resource
IOException
Copyright © 2003–2017 Atlassian. All rights reserved.