import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;\r
import org.tianocore.PcdDriverTypes;\r
\r
+import org.tianocore.common.exception.EdkException;\r
import org.tianocore.common.logger.EdkLog;\r
import org.tianocore.build.id.FpdModuleIdentification;\r
import org.tianocore.build.id.ModuleIdentification;\r
* @returns package name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
- public PackageIdentification[] getDependencePkg(String arch) {\r
+ public PackageIdentification[] getDependencePkg(String arch) throws EdkException {\r
String[] xPath;\r
String packageGuid = null;\r
String packageVersion = null;\r
if (arch == null || archList == null || contains(archList, arch)) {\r
packageGuid = item.getPackageGuid();\r
packageVersion = item.getPackageVersion();\r
- packageIdList.add(new PackageIdentification(null, packageGuid,\r
- packageVersion));\r
+ PackageIdentification pkgId = new PackageIdentification(null, packageGuid, packageVersion);\r
+ GlobalData.refreshPackageIdentification(pkgId);\r
+ packageIdList.add(pkgId);\r
}\r
}\r
\r
- //\r
- // transfer packageIdentification list to array.\r
- //\r
- PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];\r
- for (int i = 0; i < packageIdList.size(); i++) {\r
- packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());\r
- }\r
- return packageIdArray;\r
+ return packageIdList.toArray(new PackageIdentification[packageIdList.size()]);\r
}\r
\r
/**\r
* xpath\r
* @returns null if nothing is there\r
*/\r
- public ModuleIdentification[] getLibraryInstance(String arch) {\r
+ public ModuleIdentification[] getLibraryInstance(String arch) throws EdkException {\r
String[] xPath;\r
String saGuid = null;\r
String saVersion = null;\r
saVersion);\r
PackageIdentification pkgId = new PackageIdentification(null,\r
pkgGuid, pkgVersion);\r
+ GlobalData.refreshPackageIdentification(pkgId);\r
saId.setPackage(pkgId);\r
+ GlobalData.refreshModuleIdentification(saId);\r
\r
saIdList[i] = saId;\r
\r
* @returns ModuleSA objects list if elements are found at the known xpath\r
* @returns Empty ModuleSA list if nothing is there\r
*/\r
- public Map<FpdModuleIdentification, Map<String, XmlObject>> getFpdModules() {\r
+ public Map<FpdModuleIdentification, Map<String, XmlObject>> getFpdModules() throws EdkException {\r
String[] xPath = new String[] { "/FrameworkModules/ModuleSA" };\r
Object[] result = get("PlatformSurfaceArea", xPath);\r
String arch = null;\r
// identification.\r
//\r
PackageIdentification pkgId = new PackageIdentification(null, pkgGuid, pkgVersion);\r
+ GlobalData.refreshPackageIdentification(pkgId);\r
ModuleIdentification saId = new ModuleIdentification(null, saGuid, saVersion);\r
-\r
+ GlobalData.refreshModuleIdentification(saId);\r
+ \r
saId.setPackage(pkgId);\r
\r
//\r