|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
GWTApplication.server.FaultServiceImpl
public class FaultServiceImpl
This class implments all of the services which will be used by the fault database application to support the client AJAX/GWT componentry which runs on the client browser. This class is responsible for performing the business logic associated with the fault management system.
This class makes use of the SNMP4J classes which are use to allow the class to send SNMP TRAPS to the SNMP manager to inform it that new faults have been raised.
The class uses a database pool which is set up by the tomcat container which will permit the class rapid access to the database. The configuration of the database pool is part of the tomcat configuration and not the configuraiton of the fault management system.
Aside from SNMP4J API JavaDoc, one should look at the source code for the class SnmpRequest which is a console based class which can be used to create a SNMP manager/agent and is the best place to look if you want to change the SNMP code in this class as there is precious little documentation elsewhere.
Nested Class Summary | |
---|---|
(package private) static class |
FaultServiceImpl.AdvancedDataType
|
(package private) class |
FaultServiceImpl.MailManagementUnattendedFaults
This is a timer task which will be used to mail a list of recipients the details of all faults which have remained in the new state for more than 48 hours. |
(package private) class |
FaultServiceImpl.NotifyPendingFaults
This is a timer task which will mail the person assigned a fault if the fault is in a pending state for more than 7 days. |
(package private) class |
FaultServiceImpl.PrintNewFaultsInLastTwentyFourHours
This is a timertask which will be used to print all new faults in the previous 24 hours to the printer in the operations room. |
(package private) static class |
FaultServiceImpl.TextFieldsToSearch
An enumeration of the list of fields in the fault table which contain text which is suitable to be searched as such. |
Field Summary | |
---|---|
private javax.sql.DataSource |
dataSource
This is a data resource from the servlet container which contains a postgres data source |
private org.apache.log4j.Logger |
logger
Used for logging |
private FaultServiceImpl.MailManagementUnattendedFaults |
MailManagementUntendedFaultsTimerTask
A timer task which is used to inform the relevant people when a fault has been left in the new state for more than 48 hours |
private static int |
MAXNUMBEROFRESULTS
Maximum number of items returned by database in one search |
private FaultServiceImpl.NotifyPendingFaults |
NotifyPendingFaultsTimerTask
This is a timer task which will report faults which have been state pending for more than seven days. |
private FaultServiceImpl.PrintNewFaultsInLastTwentyFourHours |
printNewFaultsInLastTwentyFourHrsTimerTask
This is a timer task which will be used to print the new faults everyday in the ops room in the morning |
private java.util.Timer |
PrintNewFaultsTimer
This is a timer object which will be used for scheduling the printing of the new faults to the ops room printer |
private java.util.Timer |
ProduceOutstandingPendingFaultsMailShotTimer
This is a timer object which will be used for scheduling the report of pending faults in the system to the assigned. |
private java.util.Timer |
ProduceUnattendedFaultsMailShotTimer
This is a timer object which will be used for scheduling the report of unattended faults in the system to management. |
private java.util.Properties |
props
Used to modify the global properties of the application |
private static long |
sealVersionUID
|
(package private) org.snmp4j.Snmp |
snmp
This is the SNMP class which will be used to communicate with the SNMP manager |
(package private) org.snmp4j.smi.Address |
targetAddress
This is the host which the SMNP TRAP fault alerts will be sent to |
(package private) org.snmp4j.TransportMapping |
transport
This is the transport protocol which we will use which in our case will be UDP. |
(package private) org.snmp4j.security.USM |
usm
The user based security model which will be used to when sending messages to the SNMP server |
Constructor Summary | |
---|---|
FaultServiceImpl()
|
Method Summary | |
---|---|
void |
addNewInstrumentToSystem(java.lang.String newInstrument)
Will be used to add a new instrument to the database. |
void |
addNewRole(java.lang.String emailAddress,
java.lang.Integer Role)
Will be used to add a new user to the role which is specified. |
void |
addNewSystemToSystem(java.lang.String newSystem)
Will be used to add a new system to the system. |
void |
addNewUser(java.lang.String Name,
java.lang.String Surname,
java.lang.String EmailAddress)
Will add the details of a new user to the system. |
AuthenticationDetails |
authenticateUser(java.lang.String UserIdentifier,
java.lang.String Password)
This operation will be used to authenticate the user. |
java.lang.String |
calculateTotalAmountOfTimeSpentOnFault(int FaultNumber)
Get the total amount of time which has been spent on a fault. |
void |
closeDatabaseConnections(java.sql.Connection connection,
java.sql.Statement stmt,
java.sql.ResultSet rs)
Used for closing down database connections |
void |
closeFault(int faultId)
Called to close a fault down by a user with administration priviledges. |
private int |
convertTimeToMinutes(java.lang.String TimeAmount)
Used to convert the HH:MM field into minutes expressed as an integer. |
java.lang.Integer |
createFault(Fault newFault)
This method will be called to create a new fault in the fault database from the data which should have been passed into the method by AJAX client which should be running on the clients web browser. |
(package private) void |
createFaultReportAsPDF(int faultId,
com.lowagie.text.Document PDFDocument)
Add the full details of the fault history into the PDF document ready for printing out. |
java.lang.Boolean |
faultExists(int faultId,
boolean isEditable)
Used by the client to establish if the fault actually exists in the database |
java.lang.String |
fetchHTMLFaultReport(int faultId,
boolean addLinks)
Fetch from the database the details of the fault and all of it's comments and prepare an HTML report which can be returned to the user |
java.util.ArrayList<Comment> |
getCommentDetails(java.lang.Integer DefectNumber)
Get the details of a comment from the database which is associated with the fault number which was specified by the caller |
java.util.ArrayList<Person> |
getDutyTechnicians(boolean getOldStaff)
Return the names of all of the duty technicians to the caller which are recalled from the fault database table DUTYTECHNICIANVIEW. |
Fault |
getFaultDetails(java.lang.Integer DefectNumber,
java.lang.String locale)
Get the details of the fault from the database which was specified by the caller |
FaultUpdateSnapshot |
getFaultsUpdated(java.util.Date timeOfLastUpdateCheck,
java.lang.String locale)
Get a list of the faults from the database which have been updated since the last time that this client checked the database. |
java.util.ArrayList<FaultType> |
getFaultType()
Return the names of all of the FaultType to the caller which are recalled from the fault database table. |
FaultEntryDetails |
getFullFaultHistory(int defectNumber,
java.lang.String locale)
This will be used to return the full history of a fault. |
java.util.ArrayList<Instrument> |
getInstruments(boolean allInstruments)
Return the names of all of the instrument to the caller which are recalled from the fault database table. |
java.util.ArrayList<Fault> |
getLinkedFaults(int DefectNumber)
Gets all of the faults which are linked to the fault specified |
java.util.ArrayList<Person> |
getMembersOfStaffNotInGroup(java.lang.Integer GroupToExclude)
Get a list of staff members which are not in the group people which have been specified by the caller from the database. this will be used for instance to get a list of all of the staff members except those in the TO group for instance. |
private java.util.ArrayList<Person> |
getPersonDetails(java.lang.String DatabaseView,
java.lang.String ExclusionTable,
boolean IncludeStaffWhichHaveLeft)
Get the list of people as specified by the caller. |
java.util.ArrayList<java.lang.String> |
getPostscriptPrinters()
Return a list of all of the printers which are currently accesible by this machine |
java.util.ArrayList<Fault> |
getQuickViewFaultData(int SearchType,
java.lang.String locale)
Get all faults which go back to a specific date which has been specified by the caller. |
java.util.ArrayList<Severity> |
getSeverity()
Return the names of all of the severity to the caller which are recalled from the fault database table. |
java.util.ArrayList<Site> |
getSites()
Return the names of all of the sites to the caller which are recalled from the fault database table. |
Solution |
getSolutionDetails(java.lang.Integer DefectNumber)
Get the details of a solution from the database which is associated with the fault number which was specified by the caller |
java.util.ArrayList<Person> |
getStaffMembers(boolean getOldStaff)
Return the names of all of the staff members to the caller which are recalled from the fault database table. |
java.util.ArrayList<State> |
getStates()
Return the names of all of the states to the caller which are recalled from the fault database table. |
java.util.ArrayList |
getSubscribedFaults(AuthenticationDetails authenticationDetails,
java.lang.String locale)
This is used to get a list of the faults which the user specified is subscribed to |
java.util.ArrayList<Person> |
getSupportAstronomers(boolean getOldStaff)
Return the names of all of the support astronomers to the caller which are recalled from the fault database table. |
java.util.ArrayList<FDBSystem> |
getSystems()
Return the names of all of the system to the caller which are recalled from the fault database table. |
java.util.ArrayList<Person> |
getTelescopeOperators(boolean getOldStaff)
Return the names of all of the telescope operators to the caller which are recalled from the fault database table TELESCOPEOPERATORVIEW. |
Workaround |
getWorkaroundDetails(java.lang.Integer DefectNumber)
Get the details of a workaround from the database which is associated with the fault number which was specified by the caller |
void |
informEmailListenersFaultHasChanged(java.lang.String ContextMessage,
int FaultNumber)
Send an email to all of the people that have registered an interest in this fault. |
void |
init()
Constructor. |
void |
linkFault(int parentFaultId,
int childFaultId)
Will be used to link a fault which is specified by the user to another fault |
private java.lang.String |
makeTextFieldDatabaseCompatible(java.lang.String InputString)
Will be used to massage a text field into the correct format for insertion into the database |
private Comment |
packComment(java.sql.ResultSet rs)
Pack the details of a comment result set object into an Comment object. |
Fault |
packFault(java.sql.ResultSet rs,
boolean includeFullViewInformation)
This will be simply used to pack the details of a fault as read out of the database into the fault class. |
private Fault |
packLink(java.sql.ResultSet rs)
This will be simply used to pack the details of a linked fault into a fault structure. |
private Solution |
packSolution(java.sql.ResultSet rs)
Pack the details of a solution result set object into an Solution object. |
private Workaround |
packWorkaround(java.sql.ResultSet rs)
Pack the details of a workaround result set object into an Workaround object. |
java.util.ArrayList<Fault> |
performAdvancedSearch(java.util.HashMap SearchParameters,
java.lang.String StartDate,
java.lang.String EndDate,
java.lang.String locale)
Will be used to execute an advanced search across the database using the input data which has been provided. |
java.util.ArrayList<Fault> |
performBasicSearch(int DefectNumber,
java.lang.String SearchTerms,
java.lang.String DefectToSearchFor,
java.lang.String StartDate,
java.lang.String EndDate,
java.lang.String locale)
Will be used to execute a basic search across the database using the input data which has been provided. |
boolean |
printFault(int faultId,
java.lang.String printer,
boolean landscape)
Will be used to print the fault specified on the printer which has been specified. |
(package private) void |
raiseSNMPAlert(int defectNumber,
Fault fault)
This is user to raise an SMNP alert when a fault has been raised in the system. |
void |
registerForFaultUpdates(java.lang.String emailAddress,
int faultId)
Used to record in the database that the user would like to be informed of updates on the fault |
private java.lang.String |
removeHTMLMarkUp(java.lang.String inputString)
Used to remove all HTML up characters in a string so that the text can be printed in a PDF document. |
void |
resetPassword(java.lang.String emailAddress,
java.lang.String confirmedPassword)
Allow the password associated with the user which is provided to be changed to the demand password |
void |
set_dataSource(javax.sql.DataSource dataSource)
Used to set the data source for this module |
void |
updateCommentDetails(Comment NewCommentDetails)
This method is called to update the comment which is associated with the fault in the database |
boolean |
updateFault(Fault FaultUpdateDetails,
java.lang.String locale)
Used to update the details of fault which has been modified by the user. |
void |
updateFaultSubscriptionList(AuthenticationDetails authenticationDetails,
java.util.HashMap newSubscriptionStatuses)
Will update the list of faults which a user is subscribed to. |
void |
updateSolutionDetails(Solution NewSolutionDetails)
This method is called to update the solution which is associated with the fault in the database |
void |
updateWorkaroundDetails(Workaround NewWorkaroundDetails)
This method is called to update the workaround which is associated with the fault in the database |
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet |
---|
doGetSerializationPolicy, doPost, doUnexpectedFailure, getSerializationPolicy, getThreadLocalRequest, getThreadLocalResponse, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, shouldCompressResponse |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final FaultServiceImpl.PrintNewFaultsInLastTwentyFourHours printNewFaultsInLastTwentyFourHrsTimerTask
private final FaultServiceImpl.MailManagementUnattendedFaults MailManagementUntendedFaultsTimerTask
private final FaultServiceImpl.NotifyPendingFaults NotifyPendingFaultsTimerTask
private final java.util.Timer PrintNewFaultsTimer
private final java.util.Timer ProduceUnattendedFaultsMailShotTimer
private final java.util.Timer ProduceOutstandingPendingFaultsMailShotTimer
private static final int MAXNUMBEROFRESULTS
private org.apache.log4j.Logger logger
org.snmp4j.smi.Address targetAddress
org.snmp4j.TransportMapping transport
org.snmp4j.Snmp snmp
org.snmp4j.security.USM usm
private java.util.Properties props
private javax.sql.DataSource dataSource
private static final long sealVersionUID
Constructor Detail |
---|
public FaultServiceImpl()
Method Detail |
---|
public void set_dataSource(javax.sql.DataSource dataSource)
dataSource
- The new data sourcepublic void init()
init
in class javax.servlet.GenericServlet
private java.util.ArrayList<Person> getPersonDetails(java.lang.String DatabaseView, java.lang.String ExclusionTable, boolean IncludeStaffWhichHaveLeft) throws UnableToGetListException
DatabaseView
- The name of the database view which
contains the details of the group of people to return.Exclude
- the people which are in this table. If this
value is null then we do not exclude anything.IncludeStaffWhichHaveLeft
- Include staff which have left the organisation.
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<Person> getTelescopeOperators(boolean getOldStaff) throws UnableToGetListException
getTelescopeOperators
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<Person> getDutyTechnicians(boolean getOldStaff) throws UnableToGetListException
getDutyTechnicians
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<Person> getSupportAstronomers(boolean getOldStaff) throws UnableToGetListException
getSupportAstronomers
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the database
public java.util.ArrayList<Person> getStaffMembers(boolean getOldStaff) throws UnableToGetListException
getStaffMembers
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the database
public java.util.ArrayList<Site> getSites() throws UnableToGetListException
getSites
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<FDBSystem> getSystems() throws UnableToGetListException
getSystems
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<Severity> getSeverity() throws UnableToGetListException
getSeverity
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<Instrument> getInstruments(boolean allInstruments) throws UnableToGetListException
getInstruments
in interface FaultService
allInstruments
- Whether to get all instruments or just
those which are not decommissioned.
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic boolean updateFault(Fault FaultUpdateDetails, java.lang.String locale) throws UnableToUpdateFaultException
updateFault
in interface FaultService
FaultUpdateDetails
- This contains the details of the
changes that were made to the fault which need to be
re-inserted into the database.locale
- This is the locale in which we are operating within
UnableToUpdateFaultException
- If the fault could not be
updated for whatever reasonpublic java.lang.Integer createFault(Fault newFault) throws UnableToCreateFaultException
createFault
in interface FaultService
newFault
- This structure will contain the details which
are to be entered into the database when the fault is created.
UnableToCreateFaultException
- When the servlet is unable
to create the fault in the database it throws this exception.void raiseSNMPAlert(int defectNumber, Fault fault)
In order to test this facility out one must use the SmnpRequest class which comes the snmp4j package and set up an smtp manager. This can be done with something like the following :
java -cp /The port number is the port number which the SNMP manager is to listen on. You will need to set the port in the init() method as well to match the port which the manager is using./SNMP4J.jar org.snmp4j.tools.console.SnmpRequest -u aSecurityName -Ol 0.0.0.0/
defectNumber
- This is the number of the defect which has been raisedfault
- The details of the fault which is to be entered.public java.util.ArrayList<Fault> getQuickViewFaultData(int SearchType, java.lang.String locale)
getQuickViewFaultData
in interface FaultService
SearchType
- This is the type of search which is to be performedlocale
- This is the locale which has been chosen by the user
public Fault packFault(java.sql.ResultSet rs, boolean includeFullViewInformation) throws java.sql.SQLException
rs
- This is a result set which can be used to read the details of the fault which is to be packed.includeFullViewInformation
- Assumes that the result set
belongs to a view and that we should pack all of that
information as well.
java.sql.SQLException
- If there is a problem reading the data from the databaseprivate Fault packLink(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- This is a result set which can be used to read the details of the fault which is to be packed.
java.sql.SQLException
- If there is a problem reading the data from the databasepublic java.util.ArrayList<FaultType> getFaultType() throws UnableToGetListException
getFaultType
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databasepublic java.util.ArrayList<State> getStates() throws UnableToGetListException
getStates
in interface FaultService
UnableToGetListException
- If there is a problem getting
the list back from the databaseprivate java.lang.String makeTextFieldDatabaseCompatible(java.lang.String InputString)
InputString
- This is the string which is to be convertedprivate Solution packSolution(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- This is a object which contains a database row which
contains the details of a solution.
java.sql.SQLException
public void updateSolutionDetails(Solution NewSolutionDetails)
updateSolutionDetails
in interface FaultService
public Solution getSolutionDetails(java.lang.Integer DefectNumber)
getSolutionDetails
in interface FaultService
DefectNumber
- This is the number of the fault which is
associated with the solution which we are to return to the
caller
public void updateWorkaroundDetails(Workaround NewWorkaroundDetails)
updateWorkaroundDetails
in interface FaultService
public Workaround getWorkaroundDetails(java.lang.Integer DefectNumber)
getWorkaroundDetails
in interface FaultService
DefectNumber
- This is the number of the fault which is
associated with the workaround which we are to return to the
caller
private Workaround packWorkaround(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- This is a object which contains a database row which
contains the details of a workaround.
java.sql.SQLException
public void updateCommentDetails(Comment NewCommentDetails)
updateCommentDetails
in interface FaultService
NewCommentDetails
- The details of the new comment.public java.util.ArrayList<Comment> getCommentDetails(java.lang.Integer DefectNumber)
getCommentDetails
in interface FaultService
DefectNumber
- This is the number of the fault which is
associated with the comment which we are to return to the
caller
private Comment packComment(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- This is a object which contains a database row which
contains the details of a comment.
java.sql.SQLException
public AuthenticationDetails authenticateUser(java.lang.String UserIdentifier, java.lang.String Password) throws UserAuthenticationFailedException
authenticateUser
in interface FaultService
UserIdentifier
- This is the user identifier of the user which is essentially his email addressPassword
- This is the password of the user
UserAuthenticationFailedException
- Unable to authenticate the user.public void informEmailListenersFaultHasChanged(java.lang.String ContextMessage, int FaultNumber)
informEmailListenersFaultHasChanged
in interface FaultService
ContextMessage
- This abstract text which is associated with the faultFaultNumber
- This is the identifier of the fault which
needs to be sent out to the user.public java.util.ArrayList<Person> getMembersOfStaffNotInGroup(java.lang.Integer GroupToExclude) throws UnableToGetListException
getMembersOfStaffNotInGroup
in interface FaultService
GroupToExclude
- This is the group of people which are to
be exceluded from the list of staff returned to the
caller. This parameter should be one of
UnableToGetListException
- In the event that there
is a problem getting the list of people.public void addNewInstrumentToSystem(java.lang.String newInstrument) throws UnableToAddInstrumentException
addNewInstrumentToSystem
in interface FaultService
newInstrument
- The name of the new instrument
UnableToGetPeopleListException
- If there was a problem
adding the new instrument to the list
UnableToAddInstrumentException
public void addNewSystemToSystem(java.lang.String newSystem) throws UnableToAddSystemException
addNewSystemToSystem
in interface FaultService
newSystem
- The name of the new system
UnableToGetPeopleListException
- If there was a problem
adding the new system to the list
UnableToAddSystemException
public void addNewRole(java.lang.String emailAddress, java.lang.Integer Role) throws UnableToAddNewRoleException
addNewRole
in interface FaultService
emailAddress
- This is the email address of the person who is to be added to the people in the role which is specifiedRole
- This is the role into which the user will be added. Will be one of
UnableToAddNewRoleException
- If there is a problem adding the user to the role which was specifiedpublic void addNewUser(java.lang.String Name, java.lang.String Surname, java.lang.String EmailAddress) throws UnableToAddNewUserException
addNewUser
in interface FaultService
Name
- This is the christian name of the userSurname
- This is the surname of the userEmailAddress
- This is the email address of the user
UnableToAddNewUserException
- If there was a problem
adding the details of the new user to the systempublic void resetPassword(java.lang.String emailAddress, java.lang.String confirmedPassword) throws UnableToChangePasswordException
resetPassword
in interface FaultService
emailAddress
- This is the email address of the user to have his password changedconfirmedPassword
- This is the new password of the user
UnableToChangePasswordException
- When unable to update the password of the userpublic java.util.ArrayList<Fault> performBasicSearch(int DefectNumber, java.lang.String SearchTerms, java.lang.String DefectToSearchFor, java.lang.String StartDate, java.lang.String EndDate, java.lang.String locale) throws UnableToPerformSearchException
performBasicSearch
in interface FaultService
DefectNumber
- This is the defect number for which we
should return the fault information.SearchTerms
- A list of search terms which will be used to
index the fault information.DefectToSearchFor
- This is the defect number to search for if specified.StartDate
- This is the start date from when to look
from. This could be left blank.EndDate
- This is the end date from when to stop looking
for faults.locale
- This is the locale which the user has selected
UnableToPerformSearchException
public void linkFault(int parentFaultId, int childFaultId) throws UnknownFaultSpecifiedException, java.lang.Exception
linkFault
in interface FaultService
parentFaultId
- This is the parent fault which the child fault will be linked tochildFaultId
- This the fault which is to be linked to the parent fault
UnknownFaultSpecifiedException
- This exception is thrown if the fault which is specified by the user does not exist.
java.lang.Exception
public java.util.ArrayList<Fault> getLinkedFaults(int DefectNumber)
DefectNumber
- This is the number of the fault which we are to return to the caller
public Fault getFaultDetails(java.lang.Integer DefectNumber, java.lang.String locale)
getFaultDetails
in interface FaultService
DefectNumber
- This is the number of the fault which we are to return to the caller
public java.lang.String calculateTotalAmountOfTimeSpentOnFault(int FaultNumber)
calculateTotalAmountOfTimeSpentOnFault
in interface FaultService
FaultNumber
- This is the fault number for which we
have to calculate the total time spent.
public java.lang.String fetchHTMLFaultReport(int faultId, boolean addLinks) throws UnknownFaultSpecifiedException
faultId
- This is the identifier of the fault which is to be printedaddLinks
- Add the links which will allow user to log into the system and modify the fault
UnknownFaultSpecifiedException
- Unknown fault exception.private int convertTimeToMinutes(java.lang.String TimeAmount)
TimeAmount
- Time expressed in Hours:Minutes
public void registerForFaultUpdates(java.lang.String emailAddress, int faultId)
registerForFaultUpdates
in interface FaultService
emailAddress
- this is the email address of the person that wants to recieve updatesfaultId
- This is the fault identifier of the fault that the wants to get updates forpublic boolean printFault(int faultId, java.lang.String printer, boolean landscape) throws UnknownPrinterSpecifiedException
printFault
in interface FaultService
faultId
- This is the identifier of the fault to be printedprinter
- This is the name of the printer which is to be used to print faultlandscape
- True if the document is to be printed in landscape mode
UnknownPrinterSpecifiedException
- If the printer that
was specified by the user does not existvoid createFaultReportAsPDF(int faultId, com.lowagie.text.Document PDFDocument) throws UnknownFaultSpecifiedException
faultId
- This is the identifier of the faultPDFDocument
- This is the PDF document to which the fault details are to be added
UnknownFaultSpecifiedException
- If the fault specified cannot be found.public java.util.ArrayList<java.lang.String> getPostscriptPrinters()
getPostscriptPrinters
in interface FaultService
private java.lang.String removeHTMLMarkUp(java.lang.String inputString)
inputString
- The string to be converted.
public java.util.ArrayList<Fault> performAdvancedSearch(java.util.HashMap SearchParameters, java.lang.String StartDate, java.lang.String EndDate, java.lang.String locale) throws UnableToPerformSearchException
performAdvancedSearch
in interface FaultService
SearchParameters
- These are the search parameters which
will be used to search across the database.locale
- This is the locale which we are operating inStartDate
- This is the start date from when to look
from. This could be left blank.EndDate
- This is the end date from when to stop looking
for faults.
UnableToPerformSearchException
- If we were unable to
perform the search for whatever reason.public void closeFault(int faultId) throws UnableToCloseFaultException
closeFault
in interface FaultService
faultId
- This is is the number of the fault which is
to be closed down.
UnableToCloseFaultException
- Thrown when the method is
unable to close down the fault for whatever reason.public FaultUpdateSnapshot getFaultsUpdated(java.util.Date timeOfLastUpdateCheck, java.lang.String locale)
getFaultsUpdated
in interface FaultService
timeOfLastUpdateCheck
- This is the time that we last
checked to see if the faults we are interested in were updatedlocale
- This is the locale which we are operating in
public java.lang.Boolean faultExists(int faultId, boolean isEditable)
faultExists
in interface FaultService
faultId
- The defect number of the fault to be checkedisEditable
- Check that the fault is editable
public void closeDatabaseConnections(java.sql.Connection connection, java.sql.Statement stmt, java.sql.ResultSet rs)
connection
- Connection to the database to be closed.stmt
- Statement to be closed.rs
- Result set to be closed.public FaultEntryDetails getFullFaultHistory(int defectNumber, java.lang.String locale)
getFullFaultHistory
in interface FaultService
defectNumber
- The fault number for the faultlocale
- This is the locale to use
public java.util.ArrayList getSubscribedFaults(AuthenticationDetails authenticationDetails, java.lang.String locale)
getSubscribedFaults
in interface FaultService
authenticationDetails
- The details of the person that has logged into the system.locale
- The locale which the user has selected
public void updateFaultSubscriptionList(AuthenticationDetails authenticationDetails, java.util.HashMap newSubscriptionStatuses)
updateFaultSubscriptionList
in interface FaultService
authenticationDetails
- Details of the usernewSubscriptionStatuses
- This is a hashmap of the subscription statues of faults
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |