Interface FileResource

  • All Known Implementing Classes:

    public interface FileResource
    • Method Detail

      • getData

        InputStream getData()
        Return the inputstream for the resource
        InputStream of the resource
      • getFileName

        String getFileName()
        Return the filename for the resource
        File name of the resource
      • getLastModified

        Calendar getLastModified()
        Return the last modified date of the resource
        Calendar with the last modified date of the resource
      • getMimeType

        String getMimeType()
        Return the mimetype of the resource
        Mimetype of the resource
      • getSize

        long getSize()
        Returns the size in bytes of the resource
        Size in bytes of the resource
      • getServerName

        String getServerName()
        Return the servername on which the resource is stored.
      • getURL

        String getURL()
        this probably needs to go away.
        Return the URL that serves the file
        URL that serves the file
      • getURL

        String getURL​(String ownerUUID)
        Return the URL that serves the file. The URL points at the file resource controller, and the owner object is used as the starting point for determining if the file request is permitted.
        ownerUUID - The UUID of an object which implements the FileResourceSecurityCheckPoint interface.
        URL that serves the file
      • isPublic

        boolean isPublic()
        Indicates if this file is 'public'. If it is indicated public it is copied to and served by the webserver. If public is false the file is only available on the application server (in the JCR). In the latter case an authorisation callback is invoked to determined if the file may be served to the user requesting it.
        true if the file is public, false otherwise
      • setPublic

        void setPublic​(boolean isPublic)
        Sets whether this file is 'public'. This method should not be used to change the public state of a FileResource.
        public - indicates whether this FileResource should be public.
      • getId

        String getId()
        Returns the id (which is the JCR node UUID) of the file.
        The id of the file
      • mayView

        boolean mayView​(javax.servlet.http.HttpServletRequest request)
        This method is invoked when a not public file is requested.
        true is the user requesting the file is authorized for doing so, false otherwise
      • getMultipartFile

        org.springframework.web.multipart.MultipartFile getMultipartFile()
        This method returns the belonging MultipartFile
        The encapsulated MultipartFile if present, else null