- Timestamp:
- 11/23/06 16:18:46 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jav_Builder/com/scenari/m/builder/gen/HModelGenerator.java
r7192 r7462 75 75 import com.scenari.m.co.agent.IWAgent; 76 76 import com.scenari.m.co.agent.IWAgentAvecLiens; 77 import com.scenari.m.co.agent.IWAgent AvecResultat;77 import com.scenari.m.co.agent.IWAgentComputor; 78 78 import com.scenari.m.co.dialog.IHDialog; 79 79 import com.scenari.m.co.donnee.HADonneeMgr; … … 403 403 public String getCode() throws Exception { 404 404 if (fCode == null) { 405 fCode = ((IWAgent AvecResultat) fAgent.hGetAgentAssoc("codeGenerator")).hGetResultat(fRootDialog, null).hGetValue();405 fCode = ((IWAgentComputor) fAgent.hGetAgentAssoc("codeGenerator")).computeAsData(fRootDialog, null).getString(); 406 406 } 407 407 return fCode; … … 410 410 public String getRootPathGen() throws Exception { 411 411 if (fRootPathGen == null) { 412 fRootPathGen = ((IWAgent AvecResultat) fAgent.hGetAgentAssoc("rootPathGen")).hGetResultat(fRootDialog, null).hGetValue();412 fRootPathGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootPathGen")).computeAsData(fRootDialog, null).getString(); 413 413 } 414 414 return fRootPathGen; … … 417 417 public String getRootSpaceGen() throws Exception { 418 418 if (fRootSpaceGen == null) { 419 fRootSpaceGen = ((IWAgent AvecResultat) fAgent.hGetAgentAssoc("rootSpaceGen")).hGetResultat(fRootDialog, null).hGetValue();419 fRootSpaceGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootSpaceGen")).computeAsData(fRootDialog, null).getString(); 420 420 } 421 421 return fRootSpaceGen; … … 424 424 public String getKeyResGen() throws Exception { 425 425 if (fKeyResGen == null) { 426 fKeyResGen = ((IWAgent AvecResultat) fAgent.hGetAgentAssoc("keyResGen")).hGetResultat(fRootDialog, null).hGetValue();426 fKeyResGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("keyResGen")).computeAsData(fRootDialog, null).getString(); 427 427 } 428 428 return fKeyResGen; … … 442 442 if (fDestUriPublishFile == null) { 443 443 String vPathPublishFileInSpaceGen = "/ui.doss/"; 444 IWAgent AvecResultat vAgent = ((IWAgentAvecResultat) fAgent.hGetAgentAssoc("pathPublishFilesInSpaceGen"));444 IWAgentComputor vAgent = ((IWAgentComputor) fAgent.hGetAgentAssoc("pathPublishFilesInSpaceGen")); 445 445 if (vAgent != null) { 446 vPathPublishFileInSpaceGen = vAgent. hGetResultat(fRootDialog, null).hGetValue();446 vPathPublishFileInSpaceGen = vAgent.computeAsData(fRootDialog, null).getString(); 447 447 if (vPathPublishFileInSpaceGen != null) { 448 448 if (!vPathPublishFileInSpaceGen.startsWith("/")) vPathPublishFileInSpaceGen = "/".concat(vPathPublishFileInSpaceGen); … … 507 507 // Génération des SS ? 508 508 IWAgent vAg = fRootDialog.hGoToAgent("/@@/buildSS"); 509 fBuildSS = (vAg == null || ((IWAgent AvecResultat) 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); 510 510 if (fBuildSS) fFolderSs.hRemove(); 511 511 512 512 // Génération des ES ? 513 513 vAg = fRootDialog.hGoToAgent("/@@/buildES"); 514 fBuildES = (vAg == null || ((IWAgent AvecResultat) 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); 515 515 if (fBuildES) fFolderEs.hRemove(); 516 516 … … 940 940 // Recherche du nom du chrome. 941 941 IWAgent vAg = fRootDialog.hGoToAgent("@@/chromeCode"); 942 fChromeCode = ((IWAgent AvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue();942 fChromeCode = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 943 943 944 944 // Evaluation du mode. … … 1019 1019 IWAgent vInstallManifestAgt = fRootDialog.hGoToAgent("@@/chrome.manifest.appGen"); 1020 1020 IHSource vEsPack = fFolderAppModelChrome.hFindSource(fChromeCode.concat(".manifest")); 1021 if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgent AvecResultat) {1021 if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentComputor) { 1022 1022 OutputStream vOsEs = vEsPack.hGetOutputStream(); 1023 1023 Writer vWr = new OutputStreamWriter(vOsEs, "UTF-8"); 1024 1024 try { 1025 ((IWAgent AvecResultat) vInstallManifestAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr);1025 ((IWAgentComputor) vInstallManifestAgt).computeAsData(fRootDialog, null).writeValue(vWr); 1026 1026 vWr.flush(); 1027 1027 } finally { … … 1044 1044 // appMake. 1045 1045 // Non testé 1046 String vWspType = ((IWAgent AvecResultat) vWspTypeAgt).hGetResultat(fRootDialog, null).hGetValue();1046 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsData(fRootDialog, null).getString(); 1047 1047 Writer wspMetaXriter = fFolderAppModelJavaserver.hFindSource(".wspmeta").hGetWriter(); 1048 1048 wspMetaXriter.write(vWspType); 1049 1049 wspMetaXriter.close(); 1050 1050 IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 1051 vProps.put(((IWAgent AvecResultat) vKeyResWspAgt).hGetResultat(fRootDialog, null).hGetValue(), vBaseUri + ".wspmeta");1051 vProps.put(((IWAgentComputor) vKeyResWspAgt).computeAsData(fRootDialog, null).getString(), vBaseUri + ".wspmeta"); 1052 1052 // Création du jar du chrome. 1053 1053 IHSource vJarPack = fFolderAppModelChrome.hFindSource("chrome/" + fChromeCode.concat(".jar")); … … 1064 1064 fFolderAppModelJavaserver.hFindSource("ss").hCopyFrom(fFolderSs); 1065 1065 IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 1066 vProps.put(((IWAgent AvecResultat) vKeyResSsAgt).hGetResultat(fRootDialog, null).hGetValue(), vBaseUri + "ss");1066 vProps.put(((IWAgentComputor) vKeyResSsAgt).computeAsData(fRootDialog, null).getString(), vBaseUri + "ss"); 1067 1067 // gen 1068 1068 List vListGen = wGetListGenerators(); … … 1089 1089 String vVersion = "0.0.0"; 1090 1090 IWAgent vVersionAgt = fRootDialog.hGoToAgent("@@/version"); 1091 if (vVersionAgt != null && vVersionAgt instanceof IWAgent AvecResultat) {1092 vVersion = ((IWAgent AvecResultat) vVersionAgt).hGetResultat(fRootDialog, null).hGetValue();1091 if (vVersionAgt != null && vVersionAgt instanceof IWAgentComputor) { 1092 vVersion = ((IWAgentComputor) vVersionAgt).computeAsData(fRootDialog, null).getString(); 1093 1093 } 1094 1094 String vKeyWspVersion; 1095 1095 IWAgent vKeyWspVersionAgt = fRootDialog.hGoToAgent("@@/keyWspVersion"); 1096 if (vKeyWspVersionAgt != null && vKeyWspVersionAgt instanceof IWAgent AvecResultat) {1097 vKeyWspVersion = ((IWAgent AvecResultat) vKeyWspVersionAgt).hGetResultat(fRootDialog, null).hGetValue();1096 if (vKeyWspVersionAgt != null && vKeyWspVersionAgt instanceof IWAgentComputor) { 1097 vKeyWspVersion = ((IWAgentComputor) vKeyWspVersionAgt).computeAsData(fRootDialog, null).getString(); 1098 1098 } else { 1099 1099 vKeyWspVersion = fChromeCode; … … 1112 1112 // Création de install.rdf 1113 1113 IWAgent vInstallRdfAgt = fRootDialog.hGoToAgent("@@/install.rdf"); 1114 if (vInstallRdfAgt != null && vInstallRdfAgt instanceof IWAgent AvecResultat) {1114 if (vInstallRdfAgt != null && vInstallRdfAgt instanceof IWAgentComputor) { 1115 1115 ZipEntry vEntry = new ZipEntry("install.rdf"); 1116 1116 vEntry.setTime(System.currentTimeMillis()); 1117 1117 vXpiStream.putNextEntry(vEntry); 1118 1118 Writer vWr = new OutputStreamWriter(vXpiStream, "UTF-8"); 1119 ((IWAgent AvecResultat) vInstallRdfAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr);1119 ((IWAgentComputor) vInstallRdfAgt).computeAsData(fRootDialog, null).writeValue(vWr); 1120 1120 vWr.flush(); 1121 1121 vXpiStream.closeEntry(); … … 1123 1123 // Création de chrome.manifest 1124 1124 IWAgent vInstallManifestAgt = fRootDialog.hGoToAgent("@@/chrome.manifest"); 1125 if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgent AvecResultat) {1125 if (vInstallManifestAgt != null && vInstallManifestAgt instanceof IWAgentComputor) { 1126 1126 ZipEntry vEntry = new ZipEntry("chrome.manifest"); 1127 1127 vEntry.setTime(System.currentTimeMillis()); 1128 1128 vXpiStream.putNextEntry(vEntry); 1129 1129 Writer vWr = new OutputStreamWriter(vXpiStream, "UTF-8"); 1130 ((IWAgent AvecResultat) vInstallManifestAgt).hGetResultat(fRootDialog, null).hWriteValue(vWr);1130 ((IWAgentComputor) vInstallManifestAgt).computeAsData(fRootDialog, null).writeValue(vWr); 1131 1131 vWr.flush(); 1132 1132 vXpiStream.closeEntry(); … … 1168 1168 try { 1169 1169 IWAgent vWspTypeAgt = fRootDialog.hGoToAgent("@@/wspType"); 1170 String vWspType = ((IWAgent AvecResultat) vWspTypeAgt).hGetResultat(fRootDialog, null).hGetValue();1170 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsData(fRootDialog, null).getString(); 1171 1171 /* 1172 1172 * IWAgent vExportWspMetaAgt = … … 1188 1188 IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 1189 1189 vXmlWriter.hWriteStartTag("res"); 1190 vXmlWriter.hWriteAttribut("key", ((IWAgent AvecResultat) vKeyResWspAgt).hGetResultat(fRootDialog, null).hGetValue());1190 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResWspAgt).computeAsData(fRootDialog, null).getString()); 1191 1191 vXmlWriter.hWriteEndOpenTag(); 1192 1192 vXmlWriter.hWriteStartTag("version"); … … 1210 1210 IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 1211 1211 vXmlWriter.hWriteStartTag("res"); 1212 vXmlWriter.hWriteAttribut("key", ((IWAgent AvecResultat) vKeyResSsAgt).hGetResultat(fRootDialog, null).hGetValue());1212 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResSsAgt).computeAsData(fRootDialog, null).getString()); 1213 1213 vXmlWriter.hWriteEndOpenTag(); 1214 1214 vXmlWriter.hWriteStartTag("version"); … … 1301 1301 fPhase = PHASE_SS; 1302 1302 IWAgent vAg = fRootDialog.hGoToAgent("@@/rootPathSs"); 1303 fRootPathSs = ((IWAgent AvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue();1303 fRootPathSs = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 1304 1304 1305 1305 xListAllSs(new ArrayList(), new ArrayList(), fRootDialog.hGetAgent()); … … 1326 1326 IWAgent vInternalized = ((IWAgent) vLink).hGetAgentAssoc("internalized"); 1327 1327 // On évalue si ce lien peut pointer un item externe. 1328 boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgent AvecResultat) vInternalized).hGetResultat(fRootDialog, null).hGetValue().equals("always"));1328 boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgentComputor) vInternalized).computeAsData(fRootDialog, null).getString().equals("always")); 1329 1329 IWAgent[] vListModels = ((IWAgentAvecLiens) vLink).hGetAgentsLies(fRootDialog); 1330 1330 if (vListModels != null) { … … 1335 1335 // On crée la SS 1336 1336 IWAgent vIsStandAloneItemAgent = vListModels[i].hGetAgentAssoc("isStandAloneItem"); 1337 if (vIsStandAloneItemAgent != null && ((IWAgent AvecResultat) vIsStandAloneItemAgent).hGetResultat(fRootDialog, null).hGetValue().equals("true")) {1337 if (vIsStandAloneItemAgent != null && ((IWAgentComputor) vIsStandAloneItemAgent).computeAsData(fRootDialog, null).getString().equals("true")) { 1338 1338 // Le modèle pointé peut bien constituer un 1339 1339 // item autonome -> on crée sa SS … … 1453 1453 IWADialogExport vDialogGenerator = fCurrentGenerator.getDialog(); 1454 1454 IWAgent vBuild = fTestMode ? vAgentGenerator.hGetAgentAssoc("buildGen") : null; 1455 if (vBuild == null || ((IWAgent AvecResultat) vBuild).hGetResultat(vDialogGenerator, null).hGetValue().equalsIgnoreCase("true")) {1455 if (vBuild == null || ((IWAgentComputor) vBuild).computeAsData(vDialogGenerator, null).getString().equalsIgnoreCase("true")) { 1456 1456 // Affectation des variables de déploiement 1457 1457 IHSource vFolderGen = fCurrentGenerator.getFolder(); … … 1509 1509 // Code de l'atelier 1510 1510 IWAgent vAg = fRootDialog.hGoToAgent("@@/defaultWspCode"); 1511 String vWspCode = ((IWAgent AvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue();1511 String vWspCode = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 1512 1512 1513 1513 // Construction du path racine pour les sources et générations de … … 1524 1524 try { 1525 1525 vAg = fRootDialog.hGoToAgent("@@/test.wspmeta"); 1526 ((IWAgent AvecResultat) vAg).hGetResultat(fRootDialog, null).hWriteValue(vWriterBuf);1526 ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).writeValue(vWriterBuf); 1527 1527 } finally { 1528 1528 vWriterBuf.close(); … … 1532 1532 Map vKeyResMap = new HashMap(); 1533 1533 vAg = fRootDialog.hGoToAgent("@@/keyResSs"); 1534 String vKeyResSs = ((IWAgent AvecResultat) vAg).hGetResultat(fRootDialog, null).hGetValue();1534 String vKeyResSs = ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString(); 1535 1535 vKeyResMap.put(vKeyResSs, new File(fFolderSs.hGetUrlFileFormat())); 1536 1536 // Ressources pour les generateurs
Note: See TracChangeset
for help on using the changeset viewer.