Ignore:
Timestamp:
11/23/06 16:18:46 (6 years ago)
Author:
sys
Message:

api Donnee -> api Data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_Builder/com/scenari/m/builder/gen/HModelGenerator.java

    r7192 r7462  
    7575import com.scenari.m.co.agent.IWAgent; 
    7676import com.scenari.m.co.agent.IWAgentAvecLiens; 
    77 import com.scenari.m.co.agent.IWAgentAvecResultat; 
     77import com.scenari.m.co.agent.IWAgentComputor; 
    7878import com.scenari.m.co.dialog.IHDialog; 
    7979import com.scenari.m.co.donnee.HADonneeMgr; 
     
    403403                public String getCode() throws Exception { 
    404404                        if (fCode == null) { 
    405                                 fCode = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("codeGenerator")).hGetResultat(fRootDialog, null).hGetValue(); 
     405                                fCode = ((IWAgentComputor) fAgent.hGetAgentAssoc("codeGenerator")).computeAsData(fRootDialog, null).getString(); 
    406406                        } 
    407407                        return fCode; 
     
    410410                public String getRootPathGen() throws Exception { 
    411411                        if (fRootPathGen == null) { 
    412                                 fRootPathGen = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("rootPathGen")).hGetResultat(fRootDialog, null).hGetValue(); 
     412                                fRootPathGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootPathGen")).computeAsData(fRootDialog, null).getString(); 
    413413                        } 
    414414                        return fRootPathGen; 
     
    417417                public String getRootSpaceGen() throws Exception { 
    418418                        if (fRootSpaceGen == null) { 
    419                                 fRootSpaceGen = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("rootSpaceGen")).hGetResultat(fRootDialog, null).hGetValue(); 
     419                                fRootSpaceGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootSpaceGen")).computeAsData(fRootDialog, null).getString(); 
    420420                        } 
    421421                        return fRootSpaceGen; 
     
    424424                public String getKeyResGen() throws Exception { 
    425425                        if (fKeyResGen == null) { 
    426                                 fKeyResGen = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("keyResGen")).hGetResultat(fRootDialog, null).hGetValue(); 
     426                                fKeyResGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("keyResGen")).computeAsData(fRootDialog, null).getString(); 
    427427                        } 
    428428                        return fKeyResGen; 
     
    442442                        if (fDestUriPublishFile == null) { 
    443443                                String vPathPublishFileInSpaceGen = "/ui.doss/"; 
    444                                 IWAgentAvecResultat vAgent = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("pathPublishFilesInSpaceGen")); 
     444                                IWAgentComputor vAgent = ((IWAgentComputor) fAgent.hGetAgentAssoc("pathPublishFilesInSpaceGen")); 
    445445                                if (vAgent != null) { 
    446                                         vPathPublishFileInSpaceGen = vAgent.hGetResultat(fRootDialog, null).hGetValue(); 
     446                                        vPathPublishFileInSpaceGen = vAgent.computeAsData(fRootDialog, null).getString(); 
    447447                                        if (vPathPublishFileInSpaceGen != null) { 
    448448                                                if (!vPathPublishFileInSpaceGen.startsWith("/")) vPathPublishFileInSpaceGen = "/".concat(vPathPublishFileInSpaceGen); 
     
    507507                                // Génération des SS ? 
    508508                                IWAgent vAg = fRootDialog.hGoToAgent("/@@/buildSS"); 
    509                                 fBuildSS = (vAg == null || ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue().equalsIgnoreCase("true") || fFolderSs.hGetStatus() != IHSource.STATUS_FOLDER); 
     509                                fBuildSS = (vAg == null || ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString().equalsIgnoreCase("true") || fFolderSs.hGetStatus() != IHSource.STATUS_FOLDER); 
    510510                                if (fBuildSS) fFolderSs.hRemove(); 
    511511 
    512512                                // Génération des ES ? 
    513513                                vAg = fRootDialog.hGoToAgent("/@@/buildES"); 
    514                                 fBuildES = (vAg == null || ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue().equalsIgnoreCase("true") || fFolderEs.hGetStatus() != IHSource.STATUS_FOLDER); 
     514                                fBuildES = (vAg == null || ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString().equalsIgnoreCase("true") || fFolderEs.hGetStatus() != IHSource.STATUS_FOLDER); 
    515515                                if (fBuildES) fFolderEs.hRemove(); 
    516516 
     
    940940                        // Recherche du nom du chrome. 
    941941                        IWAgent vAg = fRootDialog.hGoToAgent("@@/chromeCode"); 
    942                         fChromeCode = ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue(); 
     942                        fChromeCode = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 
    943943 
    944944                        // Evaluation du mode. 
     
    10191019                IWAgent vInstallManifestAgt = fRootDialog.hGoToAgent("@@/chrome.manifest.appGen"); 
    10201020                IHSource vEsPack = fFolderAppModelChrome.hFindSource(fChromeCode.concat(".manifest")); 
    1021                 if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentAvecResultat) { 
     1021                if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentComputor) { 
    10221022                        OutputStream vOsEs = vEsPack.hGetOutputStream(); 
    10231023                        Writer vWr = new OutputStreamWriter(vOsEs, "UTF-8"); 
    10241024                        try { 
    1025                                 ((IWAgentAvecResultat) vInstallManifestAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr); 
     1025                                ((IWAgentComputor) vInstallManifestAgt).computeAsData(fRootDialog, null).writeValue(vWr); 
    10261026                                vWr.flush(); 
    10271027                        } finally { 
     
    10441044                // appMake. 
    10451045                // Non testé 
    1046                 String vWspType = ((IWAgentAvecResultat) vWspTypeAgt).hGetResultat(fRootDialog, null).hGetValue(); 
     1046                String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsData(fRootDialog, null).getString(); 
    10471047                Writer wspMetaXriter = fFolderAppModelJavaserver.hFindSource(".wspmeta").hGetWriter(); 
    10481048                wspMetaXriter.write(vWspType); 
    10491049                wspMetaXriter.close(); 
    10501050                IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 
    1051                 vProps.put(((IWAgentAvecResultat) vKeyResWspAgt).hGetResultat(fRootDialog, null).hGetValue(), vBaseUri + ".wspmeta"); 
     1051                vProps.put(((IWAgentComputor) vKeyResWspAgt).computeAsData(fRootDialog, null).getString(), vBaseUri + ".wspmeta"); 
    10521052                // Création du jar du chrome. 
    10531053                IHSource vJarPack = fFolderAppModelChrome.hFindSource("chrome/" + fChromeCode.concat(".jar")); 
     
    10641064                fFolderAppModelJavaserver.hFindSource("ss").hCopyFrom(fFolderSs); 
    10651065                IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 
    1066                 vProps.put(((IWAgentAvecResultat) vKeyResSsAgt).hGetResultat(fRootDialog, null).hGetValue(), vBaseUri + "ss"); 
     1066                vProps.put(((IWAgentComputor) vKeyResSsAgt).computeAsData(fRootDialog, null).getString(), vBaseUri + "ss"); 
    10671067                // gen 
    10681068                List vListGen = wGetListGenerators(); 
     
    10891089                String vVersion = "0.0.0"; 
    10901090                IWAgent vVersionAgt = fRootDialog.hGoToAgent("@@/version"); 
    1091                 if (vVersionAgt != null && vVersionAgt instanceof IWAgentAvecResultat) { 
    1092                         vVersion = ((IWAgentAvecResultat) vVersionAgt).hGetResultat(fRootDialog, null).hGetValue(); 
     1091                if (vVersionAgt != null && vVersionAgt instanceof IWAgentComputor) { 
     1092                        vVersion = ((IWAgentComputor) vVersionAgt).computeAsData(fRootDialog, null).getString(); 
    10931093                } 
    10941094                String vKeyWspVersion; 
    10951095                IWAgent vKeyWspVersionAgt = fRootDialog.hGoToAgent("@@/keyWspVersion"); 
    1096                 if (vKeyWspVersionAgt != null && vKeyWspVersionAgt instanceof IWAgentAvecResultat) { 
    1097                         vKeyWspVersion = ((IWAgentAvecResultat) vKeyWspVersionAgt).hGetResultat(fRootDialog, null).hGetValue(); 
     1096                if (vKeyWspVersionAgt != null && vKeyWspVersionAgt instanceof IWAgentComputor) { 
     1097                        vKeyWspVersion = ((IWAgentComputor) vKeyWspVersionAgt).computeAsData(fRootDialog, null).getString(); 
    10981098                } else { 
    10991099                        vKeyWspVersion = fChromeCode; 
     
    11121112                        // Création de install.rdf 
    11131113                        IWAgent vInstallRdfAgt = fRootDialog.hGoToAgent("@@/install.rdf"); 
    1114                         if (vInstallRdfAgt != null && vInstallRdfAgt instanceof IWAgentAvecResultat) { 
     1114                        if (vInstallRdfAgt != null && vInstallRdfAgt instanceof IWAgentComputor) { 
    11151115                                ZipEntry vEntry = new ZipEntry("install.rdf"); 
    11161116                                vEntry.setTime(System.currentTimeMillis()); 
    11171117                                vXpiStream.putNextEntry(vEntry); 
    11181118                                Writer vWr = new OutputStreamWriter(vXpiStream, "UTF-8"); 
    1119                                 ((IWAgentAvecResultat) vInstallRdfAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr); 
     1119                                ((IWAgentComputor) vInstallRdfAgt).computeAsData(fRootDialog, null).writeValue(vWr); 
    11201120                                vWr.flush(); 
    11211121                                vXpiStream.closeEntry(); 
     
    11231123                        // Création de chrome.manifest 
    11241124                        IWAgent vInstallManifestAgt = fRootDialog.hGoToAgent("@@/chrome.manifest"); 
    1125                         if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentAvecResultat) { 
     1125                        if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentComputor) { 
    11261126                                ZipEntry vEntry = new ZipEntry("chrome.manifest"); 
    11271127                                vEntry.setTime(System.currentTimeMillis()); 
    11281128                                vXpiStream.putNextEntry(vEntry); 
    11291129                                Writer vWr = new OutputStreamWriter(vXpiStream, "UTF-8"); 
    1130                                 ((IWAgentAvecResultat) vInstallManifestAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr); 
     1130                                ((IWAgentComputor) vInstallManifestAgt).computeAsData(fRootDialog, null).writeValue(vWr); 
    11311131                                vWr.flush(); 
    11321132                                vXpiStream.closeEntry(); 
     
    11681168                        try { 
    11691169                                IWAgent vWspTypeAgt = fRootDialog.hGoToAgent("@@/wspType"); 
    1170                                 String vWspType = ((IWAgentAvecResultat) vWspTypeAgt).hGetResultat(fRootDialog, null).hGetValue(); 
     1170                                String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsData(fRootDialog, null).getString(); 
    11711171                                /* 
    11721172                                 * IWAgent vExportWspMetaAgt = 
     
    11881188                        IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 
    11891189                        vXmlWriter.hWriteStartTag("res"); 
    1190                         vXmlWriter.hWriteAttribut("key", ((IWAgentAvecResultat) vKeyResWspAgt).hGetResultat(fRootDialog, null).hGetValue()); 
     1190                        vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResWspAgt).computeAsData(fRootDialog, null).getString()); 
    11911191                        vXmlWriter.hWriteEndOpenTag(); 
    11921192                        vXmlWriter.hWriteStartTag("version"); 
     
    12101210                        IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 
    12111211                        vXmlWriter.hWriteStartTag("res"); 
    1212                         vXmlWriter.hWriteAttribut("key", ((IWAgentAvecResultat) vKeyResSsAgt).hGetResultat(fRootDialog, null).hGetValue()); 
     1212                        vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResSsAgt).computeAsData(fRootDialog, null).getString()); 
    12131213                        vXmlWriter.hWriteEndOpenTag(); 
    12141214                        vXmlWriter.hWriteStartTag("version"); 
     
    13011301                fPhase = PHASE_SS; 
    13021302                IWAgent vAg = fRootDialog.hGoToAgent("@@/rootPathSs"); 
    1303                 fRootPathSs = ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue(); 
     1303                fRootPathSs = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 
    13041304 
    13051305                xListAllSs(new ArrayList(), new ArrayList(), fRootDialog.hGetAgent()); 
     
    13261326                                IWAgent vInternalized = ((IWAgent) vLink).hGetAgentAssoc("internalized"); 
    13271327                                // On évalue si ce lien peut pointer un item externe. 
    1328                                 boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgentAvecResultat) vInternalized).hGetResultat(fRootDialog, null).hGetValue().equals("always")); 
     1328                                boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgentComputor) vInternalized).computeAsData(fRootDialog, null).getString().equals("always")); 
    13291329                                IWAgent[] vListModels = ((IWAgentAvecLiens) vLink).hGetAgentsLies(fRootDialog); 
    13301330                                if (vListModels != null) { 
     
    13351335                                                                // On crée la SS 
    13361336                                                                IWAgent vIsStandAloneItemAgent = vListModels[i].hGetAgentAssoc("isStandAloneItem"); 
    1337                                                                 if (vIsStandAloneItemAgent != null && ((IWAgentAvecResultat) vIsStandAloneItemAgent).hGetResultat(fRootDialog, null).hGetValue().equals("true")) { 
     1337                                                                if (vIsStandAloneItemAgent != null && ((IWAgentComputor) vIsStandAloneItemAgent).computeAsData(fRootDialog, null).getString().equals("true")) { 
    13381338                                                                        // Le modèle pointé peut bien constituer un 
    13391339                                                                        // item autonome -> on crée sa SS 
     
    14531453                        IWADialogExport vDialogGenerator = fCurrentGenerator.getDialog(); 
    14541454                        IWAgent vBuild = fTestMode ? vAgentGenerator.hGetAgentAssoc("buildGen") : null; 
    1455                         if (vBuild == null || ((IWAgentAvecResultat) vBuild).hGetResultat(vDialogGenerator, null).hGetValue().equalsIgnoreCase("true")) { 
     1455                        if (vBuild == null || ((IWAgentComputor) vBuild).computeAsData(vDialogGenerator, null).getString().equalsIgnoreCase("true")) { 
    14561456                                // Affectation des variables de déploiement 
    14571457                                IHSource vFolderGen = fCurrentGenerator.getFolder(); 
     
    15091509                // Code de l'atelier 
    15101510                IWAgent vAg = fRootDialog.hGoToAgent("@@/defaultWspCode"); 
    1511                 String vWspCode = ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue(); 
     1511                String vWspCode = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 
    15121512 
    15131513                // Construction du path racine pour les sources et générations de 
     
    15241524                        try { 
    15251525                                vAg = fRootDialog.hGoToAgent("@@/test.wspmeta"); 
    1526                                 ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hWriteValue(vWriterBuf); 
     1526                                ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).writeValue(vWriterBuf); 
    15271527                        } finally { 
    15281528                                vWriterBuf.close(); 
     
    15321532                        Map vKeyResMap = new HashMap(); 
    15331533                        vAg = fRootDialog.hGoToAgent("@@/keyResSs"); 
    1534                         String vKeyResSs = ((IWAgentAvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue(); 
     1534                        String vKeyResSs = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 
    15351535                        vKeyResMap.put(vKeyResSs, new File(fFolderSs.hGetUrlFileFormat())); 
    15361536                        // Ressources pour les generateurs 
Note: See TracChangeset for help on using the changeset viewer.