- /**\r
- Query the module's absolute MSA file path with module base name. \r
- \r
- @param moduleName the base name of the module\r
- @return the absolute MSA file name\r
- @throws BuildException\r
- Base name is not registered in any SPD files\r
- **/\r
- private synchronized static String getMsaFilename(String moduleName) throws BuildException {\r
- String[] info = moduleInfo.get(moduleName);\r
- if (info == null) {\r
- throw new BuildException("Module base name [" + moduleName + "] can't found in all SPD.");\r
- }\r
- String packagePath = (String) packageInfo.get(info[1]);\r
- File convertFile = new File(workspaceDir + File.separatorChar + packagePath + File.separatorChar + info[0]);\r
- return convertFile.getPath();\r
- }\r
-\r
- /**\r
- Query the module's absolute MBD file path with module base name. \r
- \r
- @param moduleName the base name of the module\r
- @return the absolute MBD file name\r
- @throws BuildException\r
- Base name is not registered in any SPD files\r
- **/\r
- private synchronized static String getMbdFilename(String moduleName) throws BuildException {\r
- String[] info = moduleInfo.get(moduleName);\r
- if (info == null) {\r
- throw new BuildException("Info: Module base name [" + moduleName + "] can't found in all SPD.");\r
- }\r
- String packagePath = (String) packageInfo.get(info[1]);\r
- File convertFile = new File(workspaceDir + File.separatorChar + packagePath + File.separatorChar + info[0]);\r
- return convertFile.getPath().substring(0, convertFile.getPath().length() - 4) + ".mbd";\r
- }\r
-\r
- /**\r
- Get the current WORKSPACE Directory. \r
- @return current workspace directory\r
- **/\r
- public synchronized static String getWorkspacePath() {\r
- return workspaceDir;\r
- }\r
-\r
- /**\r
- Query package relative path to WORKSPACE_DIR with package name. \r
- \r
- @param packageName the name of the package\r
- @return the path relative to WORKSPACE_DIR \r
- **/\r
- public synchronized static String getPackagePath(String packageName) {\r
- return (String) packageInfo.get(packageName);\r
- }\r
-\r
- /**\r
- Query package (which the module belongs to) relative path to WORSPACE_DIR. \r
- \r
- @param moduleName the base name of the module\r
- @return the relative path to WORKSPACE_DIR of the package which the module belongs to\r
- **/\r
- public synchronized static String getPackagePathForModule(String moduleName) {\r
- String[] info = moduleInfo.get(moduleName);\r
- String packagePath = (String) packageInfo.get(info[1]);\r
- return packagePath;\r
- }\r