Package digilib.conf
Class PDFRequest
- java.lang.Object
-
- digilib.util.ParameterMap
-
- digilib.conf.PDFRequest
-
public class PDFRequest extends ParameterMap
A container class for storing a set of instruction parameters used for content generator classes.- Author:
- cmielack, casties
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DigilibConfiguration
dlConfig
protected static org.slf4j.Logger
logger
general logger for this class(package private) NumRange
pages
-
Fields inherited from class digilib.util.ParameterMap
options, params
-
-
Constructor Summary
Constructors Constructor Description PDFRequest(DigilibConfiguration dlcfg)
Create a PDFRequestPDFRequest(javax.servlet.http.HttpServletRequest request, DigilibConfiguration dlcfg)
Create a PDFRequest with a request and config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DigilibConfiguration
getDlConfig()
String
getDocumentId()
Generate a filename for the pdf to be created.ImageJobDescription
getImageJobInformation()
NumRange
getPages()
protected void
initOptions()
set up optionsprotected void
initParams()
set up parametersboolean
isValid()
Check parameters for validity.void
setBaseURL(javax.servlet.http.HttpServletRequest request)
Set the requests base URL parameter from a javax.sevlet.http.HttpServletRequest.void
setWithRequest(javax.servlet.http.HttpServletRequest request)
Initialize with a ServletRequest.-
Methods inherited from class digilib.util.ParameterMap
cloneInstance, get, getAsBoolean, getAsFile, getAsFloat, getAsInt, getAsString, getInstance, getOptions, getParameters, getParams, getValue, hasOption, hasValue, newParameter, newParameter, put, put, setOptions, setParams, setValue, setValue, setValue, setValueFromString
-
-
-
-
Field Detail
-
dlConfig
DigilibConfiguration dlConfig
-
pages
NumRange pages
-
logger
protected static final org.slf4j.Logger logger
general logger for this class
-
-
Constructor Detail
-
PDFRequest
public PDFRequest(DigilibConfiguration dlcfg)
Create a PDFRequest- Parameters:
dlcfg
- The DigilibConfiguration.
-
PDFRequest
public PDFRequest(javax.servlet.http.HttpServletRequest request, DigilibConfiguration dlcfg) throws IOException, ImageOpException
Create a PDFRequest with a request and config.- Parameters:
dlcfg
- The DigilibConfiguration.request
-- Throws:
ImageOpException
IOException
-
-
Method Detail
-
initParams
protected void initParams()
Description copied from class:ParameterMap
set up parameters- Overrides:
initParams
in classParameterMap
-
initOptions
protected void initOptions()
Description copied from class:ParameterMap
set up options- Overrides:
initOptions
in classParameterMap
-
setWithRequest
public void setWithRequest(javax.servlet.http.HttpServletRequest request) throws IOException, ImageOpException
Initialize with a ServletRequest.- Parameters:
request
-- Throws:
ImageOpException
IOException
-
setBaseURL
public void setBaseURL(javax.servlet.http.HttpServletRequest request)
Set the requests base URL parameter from a javax.sevlet.http.HttpServletRequest.- Parameters:
request
- HttpServletRequest to set the base URL.
-
getDocumentId
public String getDocumentId()
Generate a filename for the pdf to be created.- Returns:
-
getImageJobInformation
public ImageJobDescription getImageJobInformation() throws IOException, ImageOpException
- Throws:
IOException
ImageOpException
-
getPages
public NumRange getPages()
-
isValid
public boolean isValid()
Check parameters for validity. Returns true if no errors are found.- Returns:
-
getDlConfig
public DigilibConfiguration getDlConfig()
-
-