fr.hyphonem.conges
Class AccessDataXMLImpl

java.lang.Object
  extended by fr.hyphonem.conges.AccessDataXMLImpl
All Implemented Interfaces:
AccessData

public class AccessDataXMLImpl
extends java.lang.Object
implements AccessData

Author:
Stephane Gauchet pour Hyphonem give access to data stored in XML files

Constructor Summary
AccessDataXMLImpl()
          Constructor for AccessDataFileImpl
AccessDataXMLImpl(EmployeeData ed, CalendarData cd, java.lang.String dataDirPath, java.lang.String fromDate, java.lang.String toDate)
          Constructor for AccessDataFileImpl with an Employee, a calendarData and pathToDirOfXMLDataFiles and begin and end dates
AccessDataXMLImpl(EmployeeData ed, java.lang.String dataDirPath, java.lang.String fromDate, java.lang.String toDate)
          Constructor for AccessDataFileImpl with an Employee, pathToDirOfXMLDataFiles and begin and end dates
AccessDataXMLImpl(java.lang.String dataPath)
          Constructor for AccessDataFileImpl with pathToDirOfXMLDataFiles
 
Method Summary
 EmployeeIdCalData deletePendingEvent(java.lang.String id)
           
 void deleteTemporarilyOriginalEvent(java.lang.String id)
          supprime l'evenement original identifié par id du fichier temporaire
 CalendarData getCd()
           
 java.lang.String getDataDirPath()
           
 EmployeeData getEd()
           
 java.lang.String getFromDate()
           
 java.lang.String getToDate()
           
 java.util.Vector readCalendarData(EmployeeData employee)
          read from data all CalendarData
 java.util.Vector readEmployees()
          read all employees from data
 java.util.Hashtable readNationalHolidays(java.lang.String country, java.lang.String year)
          lit tous les jours f�ri�s d'un pays pour une ann�e
 java.lang.String readParamMail()
          retourne le serveur de mail
 java.lang.String readParamPays()
          read params country
 java.util.Vector readParamPeriods()
          read periods names and codes
 java.util.Vector readParams()
          read all params from data
 PendingEventData readPendingEvent(java.lang.String id)
          return le pendingEvent correspondant � l'id
 java.util.Vector readPendingEvents(EmployeeData ed)
          read ending events / lit les absences � valider
 java.util.Vector readPendingEvents(UserData user, java.lang.String team)
           
 java.util.Vector readReasons()
          read all reasons from data
 java.util.Iterator readTeams()
           
 java.util.Vector readUsers()
          read all users from data
 void replaceOldWithNewReason(java.lang.String oldnom, java.lang.String nom, java.util.Vector employees)
          replace an old reason name with the new one for all employees data
 void replaceOldWithNewTeam(java.lang.String oldnom0, java.lang.String nom0, java.util.Vector employees)
          replace old name of employee with the new one
 java.util.Vector searchCalendarData(EmployeeIdCalData eid)
           
 java.util.Vector searchSupervisor(EmployeeData employee, AccessData ad)
          retourne la liste des superviseurs d'un employ�
 java.util.Vector searchSupervisor(java.lang.String team)
          recherche la liste des superviseurs d'une �quipe
 CalendarData searchTemporarilyOriginalEvents(java.lang.String id)
          recherche dans le fichier temporaire l'evenement original
 UserData searchUser(EmployeeData employee)
          recherche le user associ� � un employ�
 UserData searchUser(java.lang.String login)
          search a user with login parameter
 UserData searchUser(java.lang.String login, java.lang.String password)
          search a user with login and password parameters
 void setCd(CalendarData data)
           
 void setDataDirPath(java.lang.String string)
           
 void setEd(EmployeeData data)
           
 void setFromDate(java.lang.String string)
           
 void setToDate(java.lang.String string)
           
 void writeCalendarData(CalendarData cd, boolean modif)
          write a calendarData in data
 void writeCalendarData(CalendarData cd, boolean modif, boolean delete)
          write a calendarData in data with delete parameter
 void writeEmployee(EmployeeData employee)
          write an employee in data
 void writeEmployee(EmployeeData employee, boolean modif, boolean delete)
          write a new employee
 void writeEmployee(EmployeeData employee, EmployeeData modifiedEmployee, boolean modif, boolean delete)
          write a modified employee
 void writeNationalHolidays(java.lang.String country, java.lang.String year, java.util.Hashtable nationalDays)
          ecrit les jours f�ri�s entr�s par pays et ann�e
 void writeParamMail(java.lang.String server)
          ecrit le serveur de mail
 void writeParamPays(java.lang.String iso)
          write country param / ecrit param pays
 void writeParams(java.util.Vector params)
          write app params in data
 void writePendingEvent(java.lang.String id, CalendarData ca, EmployeeData employee, java.lang.String cause, java.lang.String codPays, java.lang.String dirWeb)
           
 void writePeriods(java.util.Vector periods)
          write periods
 void writeReasons(java.util.Vector reasons)
          write all reasons in data
 void writeTeams(java.util.Vector teams)
          write teams
 void writeTemporarilyOriginalEvent(java.lang.String id, CalendarData originalEvent, EmployeeData employee, java.lang.String typeEvent, java.lang.String codePays, java.lang.String dirWeb)
          ecrit temporairement l'evenement original venant d etre modifié dasn un autre endroit
 void writeToXML(org.w3c.dom.Document doc, java.lang.String outputName, java.lang.String encType)
          write DOM in XML file
 void writeUser(UserData user)
          write a user in data
 void writeUser(UserData user, boolean modif, boolean delete)
          write a user with delete and modif parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessDataXMLImpl

public AccessDataXMLImpl()
Constructor for AccessDataFileImpl


AccessDataXMLImpl

public AccessDataXMLImpl(EmployeeData ed,
                         java.lang.String dataDirPath,
                         java.lang.String fromDate,
                         java.lang.String toDate)
Constructor for AccessDataFileImpl with an Employee, pathToDirOfXMLDataFiles and begin and end dates

Parameters:
ed -
dataDirPath -
fromDate -
toDate -

AccessDataXMLImpl

public AccessDataXMLImpl(EmployeeData ed,
                         CalendarData cd,
                         java.lang.String dataDirPath,
                         java.lang.String fromDate,
                         java.lang.String toDate)
Constructor for AccessDataFileImpl with an Employee, a calendarData and pathToDirOfXMLDataFiles and begin and end dates

Parameters:
ed -
cd -
dataDirPath -
fromDate -
toDate -

AccessDataXMLImpl

public AccessDataXMLImpl(java.lang.String dataPath)
Constructor for AccessDataFileImpl with pathToDirOfXMLDataFiles

Parameters:
dataPath -
Method Detail

getCd

public CalendarData getCd()
Returns:
CalendarData

getDataDirPath

public java.lang.String getDataDirPath()
Returns:
String

getEd

public EmployeeData getEd()
Returns:
String

getFromDate

public java.lang.String getFromDate()
Returns:
String

getToDate

public java.lang.String getToDate()
Returns:
String

setCd

public void setCd(CalendarData data)
Parameters:
data -

setDataDirPath

public void setDataDirPath(java.lang.String string)
Parameters:
string -

setEd

public void setEd(EmployeeData data)
Parameters:
data -

setFromDate

public void setFromDate(java.lang.String string)
Parameters:
string -

setToDate

public void setToDate(java.lang.String string)
Parameters:
string -

readCalendarData

public java.util.Vector readCalendarData(EmployeeData employee)
                                  throws java.lang.Exception
read from data all CalendarData

Specified by:
readCalendarData in interface AccessData
Parameters:
employee - - EmployeeData
Returns:
Vector of CalendarData
Throws:
java.lang.Exception
See Also:
AccessData

writeCalendarData

public void writeCalendarData(CalendarData cd,
                              boolean modif)
                       throws java.lang.Exception
write a calendarData in data

Specified by:
writeCalendarData in interface AccessData
Parameters:
cd - - CalendarData
modif - - boolean
Throws:
java.lang.Exception
See Also:
AccessData

writeCalendarData

public void writeCalendarData(CalendarData cd,
                              boolean modif,
                              boolean delete)
                       throws java.lang.Exception
write a calendarData in data with delete parameter

Specified by:
writeCalendarData in interface AccessData
Parameters:
cd - - CalendarData
modif - - boolean
delete - - boolean
Throws:
java.lang.Exception
See Also:
AccessData

writeToXML

public void writeToXML(org.w3c.dom.Document doc,
                       java.lang.String outputName,
                       java.lang.String encType)
                throws java.lang.Exception
write DOM in XML file

Parameters:
doc - - Document input DOM document
outputName - - String output file name
encType - - String encoding type value "UTF" for UTF-8 other value for ISO-8859-1 (default)
Throws:
java.lang.Exception

searchUser

public UserData searchUser(java.lang.String login,
                           java.lang.String password)
                    throws java.lang.Exception
search a user with login and password parameters

Specified by:
searchUser in interface AccessData
Parameters:
login -
password -
Returns:
UserData
Throws:
java.lang.Exception
See Also:
AccessData

readEmployees

public java.util.Vector readEmployees()
                               throws java.lang.Exception
read all employees from data

Specified by:
readEmployees in interface AccessData
Returns:
Vector of EmployeeData
Throws:
java.lang.Exception

writeUser

public void writeUser(UserData user)
               throws java.lang.Exception
write a user in data

Specified by:
writeUser in interface AccessData
Parameters:
user -
Throws:
java.lang.Exception

writeUser

public void writeUser(UserData user,
                      boolean modif,
                      boolean delete)
               throws java.lang.Exception
write a user with delete and modif parameters

Specified by:
writeUser in interface AccessData
Parameters:
user - - UserData
modif - - boolean
delete - - boolean
Throws:
java.lang.Exception

writeEmployee

public void writeEmployee(EmployeeData employee)
                   throws java.lang.Exception
write an employee in data

Specified by:
writeEmployee in interface AccessData
Parameters:
employee - - EmployeeData
Throws:
java.lang.Exception

writeEmployee

public void writeEmployee(EmployeeData employee,
                          EmployeeData modifiedEmployee,
                          boolean modif,
                          boolean delete)
                   throws java.lang.Exception
write a modified employee

Specified by:
writeEmployee in interface AccessData
Parameters:
employee - - EmployeeData
modifiedEmployee - - EmployeeData
modif - - boolean
delete - - boolean
Throws:
java.lang.Exception

readReasons

public java.util.Vector readReasons()
                             throws java.lang.Exception
Description copied from interface: AccessData
read all reasons from data

Specified by:
readReasons in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

readUsers

public java.util.Vector readUsers()
                           throws java.lang.Exception
Description copied from interface: AccessData
read all users from data

Specified by:
readUsers in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

searchUser

public UserData searchUser(java.lang.String login)
                    throws java.lang.Exception
Description copied from interface: AccessData
search a user with login parameter

Specified by:
searchUser in interface AccessData
Parameters:
login -
Returns:
UserData
Throws:
java.lang.Exception

writeEmployee

public void writeEmployee(EmployeeData employee,
                          boolean modif,
                          boolean delete)
                   throws java.lang.Exception
write a new employee

Specified by:
writeEmployee in interface AccessData
Parameters:
employee - - EmployeeData
modif - - boolean
delete - - boolean
Throws:
java.lang.Exception

writeReasons

public void writeReasons(java.util.Vector reasons)
                  throws java.lang.Exception
Description copied from interface: AccessData
write all reasons in data

Specified by:
writeReasons in interface AccessData
Parameters:
reasons -
Throws:
java.lang.Exception

replaceOldWithNewReason

public void replaceOldWithNewReason(java.lang.String oldnom,
                                    java.lang.String nom,
                                    java.util.Vector employees)
                             throws java.lang.Exception
Description copied from interface: AccessData
replace an old reason name with the new one for all employees data

Specified by:
replaceOldWithNewReason in interface AccessData
Parameters:
oldnom -
nom -
employees -
Throws:
java.lang.Exception

writeParams

public void writeParams(java.util.Vector params)
                 throws java.lang.Exception
Description copied from interface: AccessData
write app params in data

Specified by:
writeParams in interface AccessData
Parameters:
params -
Throws:
java.lang.Exception

readParams

public java.util.Vector readParams()
                            throws java.lang.Exception
Description copied from interface: AccessData
read all params from data

Specified by:
readParams in interface AccessData
Returns:
Vector params
Throws:
java.lang.Exception

readParamPays

public java.lang.String readParamPays()
                               throws java.lang.Exception
Description copied from interface: AccessData
read params country

Specified by:
readParamPays in interface AccessData
Returns:
String
Throws:
java.lang.Exception

writeParamPays

public void writeParamPays(java.lang.String iso)
                    throws java.lang.Exception
write country param / ecrit param pays

Specified by:
writeParamPays in interface AccessData
Parameters:
iso -
Throws:
java.lang.Exception

writeTeams

public void writeTeams(java.util.Vector teams)
                throws java.lang.Exception
Description copied from interface: AccessData
write teams

Specified by:
writeTeams in interface AccessData
Throws:
java.lang.Exception

replaceOldWithNewTeam

public void replaceOldWithNewTeam(java.lang.String oldnom0,
                                  java.lang.String nom0,
                                  java.util.Vector employees)
                           throws java.lang.Exception
Description copied from interface: AccessData
replace old name of employee with the new one

Specified by:
replaceOldWithNewTeam in interface AccessData
Throws:
java.lang.Exception

readTeams

public java.util.Iterator readTeams()
                             throws java.lang.Exception
Specified by:
readTeams in interface AccessData
Returns:
vector of teams
Throws:
java.lang.Exception

writePendingEvent

public void writePendingEvent(java.lang.String id,
                              CalendarData ca,
                              EmployeeData employee,
                              java.lang.String cause,
                              java.lang.String codPays,
                              java.lang.String dirWeb)
                       throws java.lang.Exception
Specified by:
writePendingEvent in interface AccessData
Throws:
java.lang.Exception

readPendingEvents

public java.util.Vector readPendingEvents(UserData user,
                                          java.lang.String team)
                                   throws java.lang.Exception
Specified by:
readPendingEvents in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

readPendingEvent

public PendingEventData readPendingEvent(java.lang.String id)
                                  throws java.lang.Exception
return le pendingEvent correspondant � l'id

Specified by:
readPendingEvent in interface AccessData
Parameters:
id -
Returns:
PendingEventData
Throws:
java.lang.Exception

deletePendingEvent

public EmployeeIdCalData deletePendingEvent(java.lang.String id)
                                     throws java.lang.Exception
Specified by:
deletePendingEvent in interface AccessData
Returns:
EmployeeIdCalData
Throws:
java.lang.Exception

searchCalendarData

public java.util.Vector searchCalendarData(EmployeeIdCalData eid)
                                    throws java.lang.Exception
Specified by:
searchCalendarData in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

readPendingEvents

public java.util.Vector readPendingEvents(EmployeeData ed)
read ending events / lit les absences � valider

Specified by:
readPendingEvents in interface AccessData
Parameters:
ed -
Returns:
Vector

readParamMail

public java.lang.String readParamMail()
                               throws java.lang.Exception
Description copied from interface: AccessData
retourne le serveur de mail

Specified by:
readParamMail in interface AccessData
Returns:
String
Throws:
java.lang.Exception

writeParamMail

public void writeParamMail(java.lang.String server)
                    throws java.lang.Exception
Description copied from interface: AccessData
ecrit le serveur de mail

Specified by:
writeParamMail in interface AccessData
Throws:
java.lang.Exception

searchSupervisor

public java.util.Vector searchSupervisor(EmployeeData employee,
                                         AccessData ad)
                                  throws java.lang.Exception
Description copied from interface: AccessData
retourne la liste des superviseurs d'un employ�

Specified by:
searchSupervisor in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

searchUser

public UserData searchUser(EmployeeData employee)
                    throws java.lang.Exception
Description copied from interface: AccessData
recherche le user associ� � un employ�

Specified by:
searchUser in interface AccessData
Parameters:
employee -
Returns:
UserData
Throws:
java.lang.Exception

searchSupervisor

public java.util.Vector searchSupervisor(java.lang.String team)
                                  throws java.lang.Exception
Description copied from interface: AccessData
recherche la liste des superviseurs d'une �quipe

Specified by:
searchSupervisor in interface AccessData
Returns:
Vector
Throws:
java.lang.Exception

readNationalHolidays

public java.util.Hashtable readNationalHolidays(java.lang.String country,
                                                java.lang.String year)
                                         throws java.lang.Exception
Description copied from interface: AccessData
lit tous les jours f�ri�s d'un pays pour une ann�e

Specified by:
readNationalHolidays in interface AccessData
Returns:
Hashtable
Throws:
java.lang.Exception

writeNationalHolidays

public void writeNationalHolidays(java.lang.String country,
                                  java.lang.String year,
                                  java.util.Hashtable nationalDays)
                           throws java.lang.Exception
Description copied from interface: AccessData
ecrit les jours f�ri�s entr�s par pays et ann�e

Specified by:
writeNationalHolidays in interface AccessData
Throws:
java.lang.Exception

writeTemporarilyOriginalEvent

public void writeTemporarilyOriginalEvent(java.lang.String id,
                                          CalendarData originalEvent,
                                          EmployeeData employee,
                                          java.lang.String typeEvent,
                                          java.lang.String codePays,
                                          java.lang.String dirWeb)
                                   throws java.lang.Exception
Description copied from interface: AccessData
ecrit temporairement l'evenement original venant d etre modifié dasn un autre endroit

Specified by:
writeTemporarilyOriginalEvent in interface AccessData
Throws:
java.lang.Exception

deleteTemporarilyOriginalEvent

public void deleteTemporarilyOriginalEvent(java.lang.String id)
                                    throws java.lang.Exception
Description copied from interface: AccessData
supprime l'evenement original identifié par id du fichier temporaire

Specified by:
deleteTemporarilyOriginalEvent in interface AccessData
Throws:
java.lang.Exception

searchTemporarilyOriginalEvents

public CalendarData searchTemporarilyOriginalEvents(java.lang.String id)
                                             throws java.lang.Exception
Description copied from interface: AccessData
recherche dans le fichier temporaire l'evenement original

Specified by:
searchTemporarilyOriginalEvents in interface AccessData
Returns:
un event
Throws:
java.lang.Exception

readParamPeriods

public java.util.Vector readParamPeriods()
                                  throws java.lang.Exception
Description copied from interface: AccessData
read periods names and codes

Specified by:
readParamPeriods in interface AccessData
Returns:
list of periods
Throws:
java.lang.Exception

writePeriods

public void writePeriods(java.util.Vector periods)
                  throws java.lang.Exception
Description copied from interface: AccessData
write periods

Specified by:
writePeriods in interface AccessData
Throws:
java.lang.Exception


Copyright © 2004-2007 Hyphonem. All Rights Reserved.