public class AlertControl
extends java.lang.Object
Constructor and Description |
---|
AlertControl()
general constructor and initialization
|
Modifier and Type | Method and Description |
---|---|
void |
addToOutput(org.jdom2.Element parent)
attaches an XML version of the alert controls to the parent xml node
|
AlertControl |
buildFromHttpRequest(javax.servlet.http.HttpServletRequest req)
reads the parameters from the http request to modify the corresponding fields of the alert control.
|
java.lang.String |
getAlertControl()
returns the alert identifier
|
java.lang.String |
getName()
returns the name of the profile
|
java.lang.String |
getNotationRange()
returns the range of notations
|
java.lang.Boolean |
getPerformAlert()
returns the boolean, whether to send the alert for new data
|
java.lang.Boolean |
getPerformReader()
returns the boolean, whether to send the alert for new data
|
java.lang.String |
getSubjectID()
returns the subject ID
|
java.lang.Double |
getThresholdQuotient()
returns the the threshold for the quotient (number of requested items / number of lendable items)
|
java.lang.Double |
getThresholdQuotientAlert()
returns the the threshold for the quotient (number of requested items / number of lendable items) for the alerting service
|
AlertControl |
readFromDisk(java.lang.String alertControl,
java.lang.String who)
builds the
AlertControl by reading the file associated with the given alertControl from disk. |
void |
setAlertControl(java.lang.String alertControl)
sets the alert identifier
|
void |
setName(java.lang.String name)
sets the name of the profile
|
void |
setNotationRange(java.lang.String notationRange)
sets the range of notations
|
void |
setPerformAlert(java.lang.Boolean performAlert)
sets the boolean whether or not to perform the alert
|
void |
setPerformReader(java.lang.Boolean performReader)
sets the boolean whether or not to perform the alert
|
void |
setSubjectID(java.lang.String subjectID)
sets the subject ID
|
void |
setThresholdDuration(java.lang.Double thresholdQuotientAlert)
sets the the threshold for the quotient (number of requested items / number of lendable items) for the alerting service
|
void |
setThresholdQuotient(java.lang.Double thresholdQuotient)
sets the threshold for the quotient (number of requested items / number of lendable items)
|
public void setPerformAlert(java.lang.Boolean performAlert)
performAlert
- true, if the alert should be performedpublic void setPerformReader(java.lang.Boolean performReader)
performAlert
- true, if the alert should be performedpublic void setThresholdQuotient(java.lang.Double thresholdQuotient)
thresholdQuotient
- the thresholdQuotient to setpublic java.lang.String getNotationRange()
public void setNotationRange(java.lang.String notationRange)
notationRange
- the notationRange to setpublic java.lang.String getAlertControl()
public void setAlertControl(java.lang.String alertControl)
alertControl
- the alertControl to setpublic java.lang.String getSubjectID()
public void setSubjectID(java.lang.String subjectID)
subjectID
- the subjectID to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic java.lang.Boolean getPerformAlert()
public java.lang.Boolean getPerformReader()
public java.lang.Double getThresholdQuotient()
public java.lang.Double getThresholdQuotientAlert()
public void setThresholdDuration(java.lang.Double thresholdQuotientAlert)
thresholdDuration
- the thresholdDuration to setpublic AlertControl buildFromHttpRequest(javax.servlet.http.HttpServletRequest req) throws org.jdom2.JDOMException, java.io.IOException
req
- the http-requestorg.jdom2.JDOMException
- exception while parsing filejava.io.IOException
- exception while reading file from diskpublic AlertControl readFromDisk(java.lang.String alertControl, java.lang.String who) throws org.jdom2.JDOMException, java.io.IOException
AlertControl
by reading the file associated with the given alertControl from disk.alertControl
- the alertControl stringwho
- the actual usernameorg.jdom2.JDOMException
- exception while parsing filejava.io.IOException
- exception while reading file from diskpublic void addToOutput(org.jdom2.Element parent)
parent
- the parent xml node