- Timestamp:
- 11/23/06 18:21:38 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jav_Builder/com/scenari/m/builder/gen/HModelGenerator.java
r7462 r7468 74 74 import com.scenari.m.co.agent.IWADialog; 75 75 import com.scenari.m.co.agent.IWAgent; 76 import com.scenari.m.co.agent.IWAgent AvecLiens;76 import com.scenari.m.co.agent.IWAgentLinker; 77 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; 80 import com.scenari.m.co.donnee.HDonneeUtils; 80 81 import com.scenari.m.co.donnee.WDonneeFixeSystemProps; 81 82 import com.scenari.m.co.instance.IWInstFormation; … … 403 404 public String getCode() throws Exception { 404 405 if (fCode == null) { 405 fCode = ((IWAgentComputor) fAgent.hGetAgentAssoc("codeGenerator")).computeAs Data(fRootDialog, null).getString();406 fCode = ((IWAgentComputor) fAgent.hGetAgentAssoc("codeGenerator")).computeAsString(fRootDialog, null); 406 407 } 407 408 return fCode; … … 410 411 public String getRootPathGen() throws Exception { 411 412 if (fRootPathGen == null) { 412 fRootPathGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootPathGen")).computeAs Data(fRootDialog, null).getString();413 fRootPathGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootPathGen")).computeAsString(fRootDialog, null); 413 414 } 414 415 return fRootPathGen; … … 417 418 public String getRootSpaceGen() throws Exception { 418 419 if (fRootSpaceGen == null) { 419 fRootSpaceGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootSpaceGen")).computeAs Data(fRootDialog, null).getString();420 fRootSpaceGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("rootSpaceGen")).computeAsString(fRootDialog, null); 420 421 } 421 422 return fRootSpaceGen; … … 424 425 public String getKeyResGen() throws Exception { 425 426 if (fKeyResGen == null) { 426 fKeyResGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("keyResGen")).computeAs Data(fRootDialog, null).getString();427 fKeyResGen = ((IWAgentComputor) fAgent.hGetAgentAssoc("keyResGen")).computeAsString(fRootDialog, null); 427 428 } 428 429 return fKeyResGen; … … 444 445 IWAgentComputor vAgent = ((IWAgentComputor) fAgent.hGetAgentAssoc("pathPublishFilesInSpaceGen")); 445 446 if (vAgent != null) { 446 vPathPublishFileInSpaceGen = vAgent.computeAs Data(fRootDialog, null).getString();447 vPathPublishFileInSpaceGen = vAgent.computeAsString(fRootDialog, null); 447 448 if (vPathPublishFileInSpaceGen != null) { 448 449 if (!vPathPublishFileInSpaceGen.startsWith("/")) vPathPublishFileInSpaceGen = "/".concat(vPathPublishFileInSpaceGen); … … 507 508 // Génération des SS ? 508 509 IWAgent vAg = fRootDialog.hGoToAgent("/@@/buildSS"); 509 fBuildSS = (vAg == null || ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString().equalsIgnoreCase("true") || fFolderSs.hGetStatus() != IHSource.STATUS_FOLDER);510 fBuildSS = (vAg == null || HDonneeUtils.hGetBooleanEvalTrue(((IWAgentComputor) vAg).computeAsString(fRootDialog, null)) || fFolderSs.hGetStatus() != IHSource.STATUS_FOLDER); 510 511 if (fBuildSS) fFolderSs.hRemove(); 511 512 512 513 // Génération des ES ? 513 514 vAg = fRootDialog.hGoToAgent("/@@/buildES"); 514 fBuildES = (vAg == null || ((IWAgentComputor) vAg).computeAsData(fRootDialog, null).getString().equalsIgnoreCase("true") || fFolderEs.hGetStatus() != IHSource.STATUS_FOLDER);515 fBuildES = (vAg == null || HDonneeUtils.hGetBooleanEvalTrue(((IWAgentComputor) vAg).computeAsString(fRootDialog, null)) || fFolderEs.hGetStatus() != IHSource.STATUS_FOLDER); 515 516 if (fBuildES) fFolderEs.hRemove(); 516 517 … … 940 941 // Recherche du nom du chrome. 941 942 IWAgent vAg = fRootDialog.hGoToAgent("@@/chromeCode"); 942 fChromeCode = ((IWAgentComputor) vAg).computeAs Data(fRootDialog, null).getString();943 fChromeCode = ((IWAgentComputor) vAg).computeAsString(fRootDialog, null); 943 944 944 945 // Evaluation du mode. … … 1044 1045 // appMake. 1045 1046 // Non testé 1046 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAs Data(fRootDialog, null).getString();1047 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsString(fRootDialog, null); 1047 1048 Writer wspMetaXriter = fFolderAppModelJavaserver.hFindSource(".wspmeta").hGetWriter(); 1048 1049 wspMetaXriter.write(vWspType); 1049 1050 wspMetaXriter.close(); 1050 1051 IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 1051 vProps.put(((IWAgentComputor) vKeyResWspAgt).computeAs Data(fRootDialog, null).getString(), vBaseUri + ".wspmeta");1052 vProps.put(((IWAgentComputor) vKeyResWspAgt).computeAsString(fRootDialog, null), vBaseUri + ".wspmeta"); 1052 1053 // Création du jar du chrome. 1053 1054 IHSource vJarPack = fFolderAppModelChrome.hFindSource("chrome/" + fChromeCode.concat(".jar")); … … 1064 1065 fFolderAppModelJavaserver.hFindSource("ss").hCopyFrom(fFolderSs); 1065 1066 IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 1066 vProps.put(((IWAgentComputor) vKeyResSsAgt).computeAs Data(fRootDialog, null).getString(), vBaseUri + "ss");1067 vProps.put(((IWAgentComputor) vKeyResSsAgt).computeAsString(fRootDialog, null), vBaseUri + "ss"); 1067 1068 // gen 1068 1069 List vListGen = wGetListGenerators(); … … 1090 1091 IWAgent vVersionAgt = fRootDialog.hGoToAgent("@@/version"); 1091 1092 if (vVersionAgt != null && vVersionAgt instanceof IWAgentComputor) { 1092 vVersion = ((IWAgentComputor) vVersionAgt).computeAs Data(fRootDialog, null).getString();1093 vVersion = ((IWAgentComputor) vVersionAgt).computeAsString(fRootDialog, null); 1093 1094 } 1094 1095 String vKeyWspVersion; 1095 1096 IWAgent vKeyWspVersionAgt = fRootDialog.hGoToAgent("@@/keyWspVersion"); 1096 1097 if (vKeyWspVersionAgt != null && vKeyWspVersionAgt instanceof IWAgentComputor) { 1097 vKeyWspVersion = ((IWAgentComputor) vKeyWspVersionAgt).computeAs Data(fRootDialog, null).getString();1098 vKeyWspVersion = ((IWAgentComputor) vKeyWspVersionAgt).computeAsString(fRootDialog, null); 1098 1099 } else { 1099 1100 vKeyWspVersion = fChromeCode; … … 1168 1169 try { 1169 1170 IWAgent vWspTypeAgt = fRootDialog.hGoToAgent("@@/wspType"); 1170 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAs Data(fRootDialog, null).getString();1171 String vWspType = ((IWAgentComputor) vWspTypeAgt).computeAsString(fRootDialog, null); 1171 1172 /* 1172 1173 * IWAgent vExportWspMetaAgt = … … 1188 1189 IWAgent vKeyResWspAgt = fRootDialog.hGoToAgent("@@/keyResWsp"); 1189 1190 vXmlWriter.hWriteStartTag("res"); 1190 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResWspAgt).computeAs Data(fRootDialog, null).getString());1191 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResWspAgt).computeAsString(fRootDialog, null)); 1191 1192 vXmlWriter.hWriteEndOpenTag(); 1192 1193 vXmlWriter.hWriteStartTag("version"); … … 1210 1211 IWAgent vKeyResSsAgt = fRootDialog.hGoToAgent("@@/keyResSs"); 1211 1212 vXmlWriter.hWriteStartTag("res"); 1212 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResSsAgt).computeAs Data(fRootDialog, null).getString());1213 vXmlWriter.hWriteAttribut("key", ((IWAgentComputor) vKeyResSsAgt).computeAsString(fRootDialog, null)); 1213 1214 vXmlWriter.hWriteEndOpenTag(); 1214 1215 vXmlWriter.hWriteStartTag("version"); … … 1301 1302 fPhase = PHASE_SS; 1302 1303 IWAgent vAg = fRootDialog.hGoToAgent("@@/rootPathSs"); 1303 fRootPathSs = ((IWAgentComputor) vAg).computeAs Data(fRootDialog, null).getString();1304 fRootPathSs = ((IWAgentComputor) vAg).computeAsString(fRootDialog, null); 1304 1305 1305 1306 xListAllSs(new ArrayList(), new ArrayList(), fRootDialog.hGetAgent()); … … 1323 1324 Node vLink = vListLinks.getFirstChild(); 1324 1325 while (vLink != null) { 1325 if (vLink instanceof IWAgent AvecLiens) {1326 if (vLink instanceof IWAgentLinker) { 1326 1327 IWAgent vInternalized = ((IWAgent) vLink).hGetAgentAssoc("internalized"); 1327 1328 // On évalue si ce lien peut pointer un item externe. 1328 boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgentComputor) vInternalized).computeAs Data(fRootDialog, null).getString().equals("always"));1329 IWAgent[] vListModels = ((IWAgent AvecLiens) vLink).hGetAgentsLies(fRootDialog);1329 boolean vIsExtrenalLinkAllowed = (vInternalized == null || !((IWAgentComputor) vInternalized).computeAsString(fRootDialog, null).equals("always")); 1330 IWAgent[] vListModels = ((IWAgentLinker) vLink).hGetAgentsLies(fRootDialog, null); 1330 1331 if (vListModels != null) { 1331 1332 for (int i = 0; i < vListModels.length; i++) { … … 1335 1336 // On crée la SS 1336 1337 IWAgent vIsStandAloneItemAgent = vListModels[i].hGetAgentAssoc("isStandAloneItem"); 1337 if (vIsStandAloneItemAgent != null && ((IWAgentComputor) vIsStandAloneItemAgent).computeAs Data(fRootDialog, null).getString().equals("true")) {1338 if (vIsStandAloneItemAgent != null && ((IWAgentComputor) vIsStandAloneItemAgent).computeAsString(fRootDialog, null).equals("true")) { 1338 1339 // Le modèle pointé peut bien constituer un 1339 1340 // item autonome -> on crée sa SS … … 1384 1385 // On cherche les liens vers des générateurs sur pModelAgent 1385 1386 IWAgent vAgLinksGenerators = pModelAgent.hGetAgentAssoc("linksGenerators"); 1386 if (vAgLinksGenerators != null && vAgLinksGenerators instanceof IWAgent AvecLiens) {1387 IWAgent[] vListGen = ((IWAgent AvecLiens) vAgLinksGenerators).hGetAgentsLies(pRootDialog);1387 if (vAgLinksGenerators != null && vAgLinksGenerators instanceof IWAgentLinker) { 1388 IWAgent[] vListGen = ((IWAgentLinker) vAgLinksGenerators).hGetAgentsLies(pRootDialog, null); 1388 1389 if (vListGen != null) { 1389 1390 for (int i = 0; i < vListGen.length; i++) { … … 1409 1410 Node vLink = vListLinks.getFirstChild(); 1410 1411 while (vLink != null) { 1411 if (vLink instanceof IWAgent AvecLiens) {1412 IWAgent[] vListModels = ((IWAgent AvecLiens) vLink).hGetAgentsLies(pRootDialog);1412 if (vLink instanceof IWAgentLinker) { 1413 IWAgent[] vListModels = ((IWAgentLinker) vLink).hGetAgentsLies(pRootDialog, null); 1413 1414 if (vListModels != null) { 1414 1415 for (int i = 0; i < vListModels.length; i++) { … … 1453 1454 IWADialogExport vDialogGenerator = fCurrentGenerator.getDialog(); 1454 1455 IWAgent vBuild = fTestMode ? vAgentGenerator.hGetAgentAssoc("buildGen") : null; 1455 if (vBuild == null || ((IWAgentComputor) vBuild).computeAsData(vDialogGenerator, null).getString().equalsIgnoreCase("true")) {1456 if (vBuild == null || HDonneeUtils.hGetBooleanEvalTrue(((IWAgentComputor) vBuild).computeAsString(vDialogGenerator, null))) { 1456 1457 // Affectation des variables de déploiement 1457 1458 IHSource vFolderGen = fCurrentGenerator.getFolder(); … … 1472 1473 } 1473 1474 IWAgent vListTransf = vAgentGenerator.hGetAgentAssoc("linksTransf"); 1474 if (vListTransf != null && vListTransf instanceof IWAgent AvecLiens) {1475 IWAgent[] vGens = ((IWAgent AvecLiens) vListTransf).hGetAgentsLies(vDialogGenerator);1475 if (vListTransf != null && vListTransf instanceof IWAgentLinker) { 1476 IWAgent[] vGens = ((IWAgentLinker) vListTransf).hGetAgentsLies(vDialogGenerator, null); 1476 1477 for (int j = 0; j < vGens.length; j++) { 1477 1478 if (vGens[j] != null) { … … 1509 1510 // Code de l'atelier 1510 1511 IWAgent vAg = fRootDialog.hGoToAgent("@@/defaultWspCode"); 1511 String vWspCode = ((IWAgentComputor) vAg).computeAs Data(fRootDialog, null).getString();1512 String vWspCode = ((IWAgentComputor) vAg).computeAsString(fRootDialog, null); 1512 1513 1513 1514 // Construction du path racine pour les sources et générations de … … 1532 1533 Map vKeyResMap = new HashMap(); 1533 1534 vAg = fRootDialog.hGoToAgent("@@/keyResSs"); 1534 String vKeyResSs = ((IWAgentComputor) vAg).computeAs Data(fRootDialog, null).getString();1535 String vKeyResSs = ((IWAgentComputor) vAg).computeAsString(fRootDialog, null); 1535 1536 vKeyResMap.put(vKeyResSs, new File(fFolderSs.hGetUrlFileFormat())); 1536 1537 // Ressources pour les generateurs
Note: See TracChangeset
for help on using the changeset viewer.