001: /*
002: * SalomeTMF is a Test Management Framework
003: * Copyright (C) 2005 France Telecom R&D
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * @author Fayçal SOUGRATI
020: *
021: * Contact: mikael.marche@rd.francetelecom.com
022: */
023:
024: package org.objectweb.salome_tmf.api.api2ihm;
025:
026: import java.util.Properties;
027:
028: import org.objectweb.salome_tmf.api.ApiConstants;
029: import org.objectweb.salome_tmf.api.api2db.DataBase;
030: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestDelete;
031: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestDeleteImpl;
032: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestInsert;
033: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestInsertImpl;
034: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestSelect;
035: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestSelectImpl;
036: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestUpdate;
037: import org.objectweb.salome_tmf.api.api2ihm.suiteTest.SuiteTestUpdateImpl;
038:
039: /**
040: * Classe constituant le point d'entrée sur les fonctions appartenant à l'aire fonctionnelle "Suite de test"
041: * @author Fayçal SOUGRATI
042: */
043: public class SuiteTest implements ApiConstants {
044:
045: /**
046: * Pointeur sur la classe contenant les traitement relatifs aux requetes de suppression
047: */
048: SuiteTestDelete mySuiteTestDelete = null;
049:
050: /**
051: * Pointeur sur la classe contenant les traitement relatifs aux requetes d'insertion
052: */
053: SuiteTestInsert mySuiteTestInsert = null;
054:
055: /**
056: * Pointeur sur la classe contenant les traitement relatifs aux requetes de selection
057: */
058: SuiteTestSelect mySuiteTestSelect = null;
059:
060: /**
061: * Pointeur sur la classe contenant les traitement relatifs aux requetes de mise a jour
062: */
063: SuiteTestUpdate mySuiteTestUpdate = null;
064:
065: /**
066: * Constructeur
067: * @param db BdD
068: */
069: public SuiteTest(DataBase db) {
070: // Initialisation du fichier "properties"
071: Properties prop = Utile
072: .getPropertiesFile(SUITE_STMTS_FILE_PATH);
073:
074: // Initialisation des pointeurs sur les sous classes
075: mySuiteTestDelete = new SuiteTestDeleteImpl(db, prop);
076: mySuiteTestInsert = new SuiteTestInsertImpl(db, prop);
077: mySuiteTestSelect = new SuiteTestSelectImpl(db, prop);
078: mySuiteTestUpdate = new SuiteTestUpdateImpl(db, prop);
079: }
080:
081: /**
082: * Fonction qui fixe le projet SalomeTMF dans lequel l'utilisateur travaille
083: * @param projectName Nom du projet VT
084: */
085: public void setProject(String projectName) {
086: mySuiteTestDelete.setProject(projectName);
087: mySuiteTestInsert.setProject(projectName);
088: mySuiteTestSelect.setProject(projectName);
089: mySuiteTestUpdate.setProject(projectName);
090: //org.objectweb.salome_tmf.api.Api.getInstanceOfBugzillaAPI().init(projectName);
091: }
092:
093: /**
094: * Accesseur sur le champs "mySuiteTestDelete"
095: * @return Instance de la classe contenant les fonctions de suppression de la BdD
096: */
097: public SuiteTestDelete getSuiteTestDelete() {
098: return mySuiteTestDelete;
099: }
100:
101: /**
102: * Accesseur sur le champs "mySuiteTestInsert"
103: * @return Instance de la classe contenant les fonctions d'insertion dans la BdD
104: */
105: public SuiteTestInsert getSuiteTestInsert() {
106: return mySuiteTestInsert;
107: }
108:
109: /**
110: * Accesseur sur le champs "mySuiteTestSelect"
111: * @return Instance de la classe contenant les fonctions de selection de la BdD
112: */
113: public SuiteTestSelect getSuiteTestSelect() {
114: return mySuiteTestSelect;
115: }
116:
117: /**
118: * Accesseur sur le champs "mySuiteTestUpdate"
119: * @return Instance de la classe contenant les fonctions de mise à jour de la BdD
120: */
121: public SuiteTestUpdate getSuiteTestUpdate() {
122: return mySuiteTestUpdate;
123: }
124:
125: }
|