|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.api.implementation.FileResourceImpl
public class FileResourceImpl
This class implements a resource.
| Constructor Summary | |
|---|---|
FileResourceImpl(org.springframework.web.multipart.MultipartFile file)
Constructor |
|
FileResourceImpl(javax.jcr.Node node)
The node and the servername to construct the resource from |
|
| Method Summary | |
|---|---|
java.io.InputStream |
getData()
Return the inputstream for the resource |
java.lang.String |
getFileName()
Return the filename for the resource |
java.lang.String |
getId()
Get the unique id (UUID) of this file |
java.util.Calendar |
getLastModified()
Return the last modified date of the resource |
java.lang.String |
getMimeType()
Return the mimetype of the resource |
org.springframework.web.multipart.MultipartFile |
getMultipartFile()
This method returns the belonging MultipartFile |
java.lang.String |
getServerName()
Return the servername on which the resource is stored. |
long |
getSize()
Returns the size in bytes of the resource |
java.lang.String |
getURL()
Return the URL that serves the file |
java.lang.String |
getURL(java.lang.String ownerUUID)
Return the URL that serves the file for the given file owner |
boolean |
isPublic()
Sets if the file resource is public or not |
boolean |
mayView(javax.servlet.http.HttpServletRequest request)
This method is invoked when a not public file is requested. |
void |
setPublic(boolean isPublic)
Sets whether this file is 'public'. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileResourceImpl(org.springframework.web.multipart.MultipartFile file)
file - The multipart file to construct the resource frompublic FileResourceImpl(javax.jcr.Node node)
node - The node| Method Detail |
|---|
public java.lang.String getId()
getId in interface FileResourcepublic java.io.InputStream getData()
getData in interface FileResourcepublic java.lang.String getFileName()
getFileName in interface FileResourcepublic boolean isPublic()
isPublic in interface FileResourceisPublic - true if it is public
public java.util.Calendar getLastModified()
getLastModified in interface FileResourcepublic java.lang.String getMimeType()
getMimeType in interface FileResourcepublic long getSize()
getSize in interface FileResourcepublic java.lang.String getServerName()
getServerName in interface FileResourcepublic java.lang.String getURL()
getURL in interface FileResourcepublic java.lang.String getURL(java.lang.String ownerUUID)
getURL in interface FileResourceownerUUID - UUID of the JCR wrapper class that implements the FileResourceSecurityCheck interface.
This class determines if the user is allowed to retrieve the file.
public boolean mayView(javax.servlet.http.HttpServletRequest request)
FileResource
mayView in interface FileResourcepublic void setPublic(boolean isPublic)
FileResource
setPublic in interface FileResourcepublic org.springframework.web.multipart.MultipartFile getMultipartFile()
FileResource
getMultipartFile in interface FileResource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||