fr.paris.lutece.plugins.folderlisting.web
Class FolderListingFileJspBean

java.lang.Object
  extended by fr.paris.lutece.plugins.folderlisting.web.FolderListingFileJspBean

public class FolderListingFileJspBean
extends java.lang.Object

This class provides methods needed to serve the user a folderlisting file


Field Summary
static int FILE_NOT_ALLOWED
           
static int FILE_NOT_FOUND
           
 
Constructor Summary
FolderListingFileJspBean()
          Public constructor
 
Method Summary
 boolean checkRights(javax.servlet.http.HttpServletRequest request)
          Check that the user can view the file requested
 java.lang.String getDirectoryPath(javax.servlet.http.HttpServletRequest request)
          Get the directory path of the file to display from the request
 byte[] getFileContent(javax.servlet.http.HttpServletRequest request)
          Get the binary content corresponding to the file to display
 java.lang.String getFileErrorUrl(javax.servlet.http.HttpServletRequest request, int nErrorType)
           
 java.lang.String getFilename(javax.servlet.http.HttpServletRequest request)
          Get the name of the file to display from the request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_NOT_FOUND

public static final int FILE_NOT_FOUND
See Also:
Constant Field Values

FILE_NOT_ALLOWED

public static final int FILE_NOT_ALLOWED
See Also:
Constant Field Values
Constructor Detail

FolderListingFileJspBean

public FolderListingFileJspBean()
Public constructor

Method Detail

getDirectoryPath

public java.lang.String getDirectoryPath(javax.servlet.http.HttpServletRequest request)
Get the directory path of the file to display from the request

Parameters:
request - the http request
Returns:
the path of the directory containing the file to display (given from the root folder defined for the porltet)

getFileContent

public byte[] getFileContent(javax.servlet.http.HttpServletRequest request)
Get the binary content corresponding to the file to display

Parameters:
request - the http request
Returns:
the content to display

getFileErrorUrl

public java.lang.String getFileErrorUrl(javax.servlet.http.HttpServletRequest request,
                                        int nErrorType)

getFilename

public java.lang.String getFilename(javax.servlet.http.HttpServletRequest request)
Get the name of the file to display from the request

Parameters:
request - the http request
Returns:
the name of the file to display

checkRights

public boolean checkRights(javax.servlet.http.HttpServletRequest request)
Check that the user can view the file requested

Parameters:
request - the http request
Returns:
true if the user has the right to view the file, false otherwise


Copyright © 2011 Mairie de Paris. All Rights Reserved.