Package digilib.servlet
Class DigilibBean
java.lang.Object
digilib.servlet.DigilibBean
Java bean providing access to digilib configuration for JSPs.
- Author:
- robcast
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the current DocuDirectory.Returns the dlConfig.Returns the current filepath (fn).Returns the current ImageSet.intget the number of pages/files in the directoryintgetNumPages(DigilibServletRequest request) get the number of image pages/files in the directoryReturns the dlRequest.booleancheck if the request is allowed to access filepathbooleanisAuthorized(DigilibServletRequest request) check if the request is allowed to access filepathbooleancheck if the request must be authorized to access filepathbooleanisAuthRequired(DigilibServletRequest request) check if the request must be authorized to access filepathbooleanReturns if authorization is configured.voidsetConfig(javax.servlet.ServletConfig conf) Initializes the bean with the default DigilibServletConfiguration from the context.voidInitializes the bean with the DigilibConfiguration from the context under the given key.voidsetRequest(DigilibServletRequest dlRequest) Sets the current DigilibRequest.voidsetRequest(javax.servlet.http.HttpServletRequest request) Sets the current DigilibRequest using a HttpServletRequest.
-
Constructor Details
-
DigilibBean
public DigilibBean()Constructor for DigilibBean. -
DigilibBean
public DigilibBean(javax.servlet.ServletConfig conf)
-
-
Method Details
-
setConfig
public void setConfig(javax.servlet.ServletConfig conf, String dlconfKey) throws javax.servlet.ServletException Initializes the bean with the DigilibConfiguration from the context under the given key.- Parameters:
conf-dlconfKey-- Throws:
javax.servlet.ServletException
-
setConfig
public void setConfig(javax.servlet.ServletConfig conf) throws javax.servlet.ServletException Initializes the bean with the default DigilibServletConfiguration from the context.- Parameters:
conf-- Throws:
javax.servlet.ServletException
-
isUseAuthorization
public boolean isUseAuthorization()Returns if authorization is configured.- Returns:
- use authorization
-
isAuthRequired
check if the request must be authorized to access filepath- Returns:
- is auth required
- Throws:
AuthOpException- on error
-
isAuthRequired
check if the request must be authorized to access filepath- Parameters:
request- the DigilibServletRequest- Returns:
- is auth required
- Throws:
AuthOpException- on error
-
isAuthorized
check if the request is allowed to access filepath- Returns:
- is authorized
- Throws:
AuthOpException- on error
-
isAuthorized
check if the request is allowed to access filepath- Parameters:
request- the DigilibServletRequest- Returns:
- is authorized
- Throws:
AuthOpException- on error
-
setRequest
Sets the current DigilibRequest using a HttpServletRequest.- Parameters:
request- the HttpServletRequest- Throws:
Exception- on error
-
setRequest
Sets the current DigilibRequest.- Parameters:
dlRequest- The dlRequest to set.- Throws:
Exception- on error
-
getNumPages
get the number of pages/files in the directory- Returns:
- the num pages
- Throws:
Exception- on error
-
getNumPages
get the number of image pages/files in the directory- Parameters:
request- the DigilibServletRequest- Returns:
- the num pages
- Throws:
Exception- on error
-
getDirectory
Returns the current DocuDirectory.- Returns:
- the DocuDirectory
-
getImageSet
Returns the current ImageSet.- Returns:
- the ImageSet
-
getFilepath
Returns the current filepath (fn).- Returns:
- the fn
-
getDlConfig
Returns the dlConfig.- Returns:
- the DigilibConfiguration
-
getRequest
Returns the dlRequest.- Returns:
- the DigilibServletRequest
-