org.chorem.callao.service
Class TimeSpanServiceImpl

java.lang.Object
  extended by org.chorem.callao.service.TimeSpanServiceImpl

public class TimeSpanServiceImpl
extends java.lang.Object

Gestion des périodes intermédiaires durant l'exercice. Chaque timeSpan sera fixe, et devra correspondre à un mois complet.

Author:
Rémi Chapelet

Constructor Summary
TimeSpanServiceImpl()
           
 
Method Summary
 java.lang.String blockTimeSpan(TimeSpan timespan)
          Permet de bloquer un timespan, celle-ci ne doit pas être bloquée.
 java.lang.String blockTimeSpan(TimeSpanDTO timespanDTO)
          Permet de bloquer une période au format DTO.
 java.lang.String createTimeSpan(java.util.Date beginTimeSpan, java.util.Date endTimeSpan, Period period, boolean locked)
          Création d'une période timeSpan mensuelle avec une date de début et de fin.
 void destroy()
           
 java.lang.String[] getMethods()
           
 void init(org.nuiton.topia.TopiaContext arg0)
           
 boolean isTimeSpanBlocked(TimeSpan timeSpan)
          Vérifie si le timeSpan donné en paramètre est bloqué ou non.
 java.lang.String removeTimeSpan(TimeSpan timeSpan)
          Permet d'effacer un timeSpan.
 java.util.List<TimeSpan> searchListTimeSpan(Period period)
          Permet de faire une recherche de tous les timeSpans d'une période.
 java.util.List<TimeSpanDTO> searchListTimeSpanDTO(Period period)
          Permet de rechercher tous les timeSpans suivant une période donnée.
 TimeSpan searchTimeSpanByDate(java.util.Date d)
          Permet de trouver un timespan directement avec une date.
 TimeSpan searchTimeSpanByDate(TimeSpanDTO timeSpanDTO)
          Recherche un timeSpan précis, avec sa date de création.
 TimeSpanDTO searchTimeSpanDTOByDate(java.util.Date d)
          Permet de rechercher un timeSpan à l'aide d'une date.
 TimeSpan searchTimeSpanWithTopiaId(java.lang.String topiaId)
          Recherche un timeSpan UNIQUE.
 java.lang.String unblockTimeSpan(TimeSpan timespan)
          Permet de débloquer un timespan, à condition que les timespans suivants celui-ci soient bien débloqués.
 java.lang.String unblockTimeSpan(TimeSpanDTO timespanDTO)
          Permet de bloquer une période au format DTO.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSpanServiceImpl

public TimeSpanServiceImpl()
Method Detail

createTimeSpan

public java.lang.String createTimeSpan(java.util.Date beginTimeSpan,
                                       java.util.Date endTimeSpan,
                                       Period period,
                                       boolean locked)
Création d'une période timeSpan mensuelle avec une date de début et de fin. Une période peut être bloquée ou non.

Parameters:
beginTimeSpan - date de début de période
endTimeSpan - date de fin de période
locked - est à vrai si la période doit être bloquée.
Returns:

searchTimeSpanByDate

public TimeSpan searchTimeSpanByDate(java.util.Date d)
Permet de trouver un timespan directement avec une date. La date peut être quelconque. Exemple : d = 17 sept 2000, renvoie la période du 1 sept au 30 sept 2000.

Parameters:
d -
Returns:

searchTimeSpanByDate

public TimeSpan searchTimeSpanByDate(TimeSpanDTO timeSpanDTO)
Recherche un timeSpan précis, avec sa date de création.

Parameters:
timeSpanDTO - timeSpan au format DTO qu'on recherche
Returns:

searchTimeSpanWithTopiaId

public TimeSpan searchTimeSpanWithTopiaId(java.lang.String topiaId)
Recherche un timeSpan UNIQUE. Celui est identifié par son topiaId.

Parameters:
topiaId - Identifiant du timeSpan recherché
Returns:

searchTimeSpanDTOByDate

public TimeSpanDTO searchTimeSpanDTOByDate(java.util.Date d)
Permet de rechercher un timeSpan à l'aide d'une date. Il fait appel à la méthode searchTimeSpanByDate. La méthode renvoie un objet DTO.

Parameters:
d -
Returns:

searchListTimeSpan

public java.util.List<TimeSpan> searchListTimeSpan(Period period)
Permet de faire une recherche de tous les timeSpans d'une période.

Parameters:
period -
Returns:

searchListTimeSpanDTO

public java.util.List<TimeSpanDTO> searchListTimeSpanDTO(Period period)
Permet de rechercher tous les timeSpans suivant une période donnée. Chaque timeSpan est converti ensuite en DTO.

Parameters:
period -
Returns:

blockTimeSpan

public java.lang.String blockTimeSpan(TimeSpan timespan)
Permet de bloquer un timespan, celle-ci ne doit pas être bloquée. La fonction doit s'assurer que les timeSpans précédents doivent être bloqués. Les transactions doivent être équilibrées

Parameters:
timespan - période qui doit être fermée
period - période (12 smois)

blockTimeSpan

public java.lang.String blockTimeSpan(TimeSpanDTO timespanDTO)
Permet de bloquer une période au format DTO.

Parameters:
timespanDTO -
Returns:

unblockTimeSpan

public java.lang.String unblockTimeSpan(TimeSpan timespan)
Permet de débloquer un timespan, à condition que les timespans suivants celui-ci soient bien débloqués.

Parameters:
timespan -
period -
Returns:

unblockTimeSpan

public java.lang.String unblockTimeSpan(TimeSpanDTO timespanDTO)
Permet de bloquer une période au format DTO.

Parameters:
timespanDTO -
Returns:

removeTimeSpan

public java.lang.String removeTimeSpan(TimeSpan timeSpan)
Permet d'effacer un timeSpan. Ce dernier ne doit pas être bloqué.

Parameters:
timeSpan -
Returns:

isTimeSpanBlocked

public boolean isTimeSpanBlocked(TimeSpan timeSpan)
Vérifie si le timeSpan donné en paramètre est bloqué ou non.

Parameters:
timeSpan -
Returns:

getMethods

public java.lang.String[] getMethods()

destroy

public void destroy()

init

public void init(org.nuiton.topia.TopiaContext arg0)


Copyright © 2008-2009 CodeLutin. All Rights Reserved.