|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectatg.util.service.ATGBasicClass
atg.presentation.businessdelegate.ATGBusinessDelegate
public abstract class ATGBusinessDelegate
Titre : Classe BusinessDelegate (Pattern J2EE)
Description : Cette classe sert à détacher la partie présentation de la façade métier en ajoutant un niveau d'appel.
Copyright : FERRARI Olivier
Ce logiciel est régi par la licence CeCILL soumise au droit français et respectant les principes de diffusion des logiciels libres. Vous pouvez utiliser, modifier et/ou redistribuer ce programme sous les conditions de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA sur le site http://www.cecill.info. Le fait que vous puissiez accéder à cet en-tête signifie que vous avez pris connaissance de la licence CeCILL, et que vous en avez accepté les termes.Exemple de business Delegate :
public class testBD
extends ATGBusinessDelegate {
// Implémentatoin type de init()
public void init() throws ATGBusinessDelegateException{
if (!this.isInit()) {
TestFacade f = (TestFacade) TestFacade.getInstance(TestFacade.class);
setFacadeWF(f);
this.setInit();
}
else
{
throw new ATGBusinessDelegateException("Facade npon initilisée dans BD");
}
}
// Méthode "mappée par la business Delegate vers la facade
public PersonneVO findPersonne (Integer idPersonne, int niveau) {
try {
return ( (TestFacade) getFacadeWF()).findPersonne(idPersonne,niveau);
}
catch (ATGBusinessDelegateException ex) {
return null;
}
}
}
Comment appeler une BusinessDelegate ?
...
testBD bd = (testBD) testBD.getInstance(testBD.class);
try {
bd.init();
}
catch (ATGBusinessDelegateException ex) {
ex.printStackTrace();
}
...
| Field Summary | |
|---|---|
protected boolean |
initialise
Initialisation de la facade |
protected static java.util.logging.Logger |
logger_
Gestion des logs |
protected ATGServiceLocator |
serviceLocator
Gestion de la localisation des composants |
| Constructor Summary | |
|---|---|
ATGBusinessDelegate()
|
|
| Method Summary | |
|---|---|
ATGISessionFacade |
getFacadeWF()
Retourne la facade associée |
static java.lang.Object |
getInstance(java.lang.Class classParam)
Retourne une oinstance de BusinessDelegate |
protected java.util.logging.Logger |
getLogger()
Ecriture des logs |
ATGServiceLocator |
getServiceLocator()
Retourne le service locator associé |
abstract void |
init()
Initialisation de la façade associée. |
boolean |
isInit()
Retourne vrai si la face est initialisée |
void |
setFacadeWF(ATGISessionFacade paramFacade)
Positionne la facade associée |
void |
setInit()
Definie la facade à "initialisée" |
| Methods inherited from class atg.util.service.ATGBasicClass |
|---|
logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ATGServiceLocator serviceLocator
protected static java.util.logging.Logger logger_
protected boolean initialise
| Constructor Detail |
|---|
public ATGBusinessDelegate()
| Method Detail |
|---|
public abstract void init()
throws ATGBusinessDelegateException
ATGBusinessDelegateExceptionpublic boolean isInit()
public void setInit()
public static java.lang.Object getInstance(java.lang.Class classParam)
public ATGISessionFacade getFacadeWF()
throws ATGBusinessDelegateException
ATGBusinessDelegateExceptionpublic void setFacadeWF(ATGISessionFacade paramFacade)
paramFacade - ATGISessionFacade Object Interface de Facade
public ATGServiceLocator getServiceLocator()
throws ATGServiceLocatorException
ATGServiceLocatorExceptionprotected java.util.logging.Logger getLogger()
getLogger in class ATGBasicClass
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||