import org.tianocore.frameworkwizard.common.DataType;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.FileOperation;\r
+import org.tianocore.frameworkwizard.common.GlobalData;\r
import org.tianocore.frameworkwizard.common.IFileFilter;\r
import org.tianocore.frameworkwizard.common.Log;\r
import org.tianocore.frameworkwizard.common.OpenFile;\r
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
import javax.swing.JComboBox;\r
\r
+/**\r
+ The class is used to provide functions to clone workspace, module, package and platform\r
+ It extends IDialog\r
+\r
+ **/\r
public class Clone extends IDialog {\r
\r
- /**\r
- Define class members\r
- \r
- **/\r
+ ///\r
+ /// Define Class Serial Version UID\r
+ ///\r
private static final long serialVersionUID = -5469299324965727137L;\r
\r
+ ///\r
+ /// Define Class Members\r
+ ///\r
private JPanel jContentPane = null;\r
\r
private JLabel jLabelType = null;\r
\r
private JButton jButtonGenerateGuid = null;\r
\r
+ private JLabel jLabelBelong = null;\r
+\r
+ private JComboBox jComboBoxExistingPackage = null;\r
+\r
+ ///\r
+ /// Define members not for UI\r
+ ///\r
+\r
private int mode = -1;\r
\r
private Vector<PackageIdentification> packages = null;\r
\r
private WorkspaceTools wt = new WorkspaceTools();\r
\r
- private JLabel jLabelBelong = null;\r
-\r
- private JComboBox jComboBoxExistingPackage = null;\r
-\r
private Identification oldId = null;\r
\r
private Identification newId = null;\r
private PlatformIdentification fid = null;\r
\r
/**\r
- * This method initializes jTextFieldType \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldType \r
+ \r
+ @return javax.swing.JTextField\r
+ \r
+ **/\r
private JTextField getJTextFieldType() {\r
if (jTextFieldType == null) {\r
jTextFieldType = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jTextFieldSource \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldSource \r
+ \r
+ @return javax.swing.JTextField \r
+ \r
+ **/\r
private JTextField getJTextFieldSource() {\r
if (jTextFieldSource == null) {\r
jTextFieldSource = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jButtonBrowse \r
- * \r
- * @return javax.swing.JButton \r
- */\r
+ This method initializes jButtonBrowse \r
+ \r
+ @return javax.swing.JButton \r
+ \r
+ **/\r
private JButton getJButtonBrowse() {\r
if (jButtonBrowse == null) {\r
jButtonBrowse = new JButton();\r
}\r
\r
/**\r
- * This method initializes jTextFieldDestinationFile \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldDestinationFile \r
+ \r
+ @return javax.swing.JTextField \r
+ \r
+ **/\r
private JTextField getJTextFieldFilePath() {\r
if (jTextFieldFilePath == null) {\r
jTextFieldFilePath = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jTextFieldBaseName \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldBaseName \r
+ \r
+ @return javax.swing.JTextField \r
+ \r
+ **/\r
private JTextField getJTextFieldBaseName() {\r
if (jTextFieldBaseName == null) {\r
jTextFieldBaseName = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jTextFieldGuid \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldGuid \r
+ \r
+ @return javax.swing.JTextField \r
+ \r
+ **/\r
private JTextField getJTextFieldGuid() {\r
if (jTextFieldGuid == null) {\r
jTextFieldGuid = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jTextFieldVersion \r
- * \r
- * @return javax.swing.JTextField \r
- */\r
+ This method initializes jTextFieldVersion \r
+ \r
+ @return javax.swing.JTextField \r
+ \r
+ **/\r
private JTextField getJTextFieldVersion() {\r
if (jTextFieldVersion == null) {\r
jTextFieldVersion = new JTextField();\r
}\r
\r
/**\r
- * This method initializes jButtonOk \r
- * \r
- * @return javax.swing.JButton \r
- */\r
+ This method initializes jButtonOk \r
+ \r
+ @return javax.swing.JButton \r
+ \r
+ **/\r
private JButton getJButtonOk() {\r
if (jButtonOk == null) {\r
jButtonOk = new JButton();\r
}\r
\r
/**\r
- * This method initializes jButtonCancel \r
- * \r
- * @return javax.swing.JButton \r
- */\r
+ This method initializes jButtonCancel \r
+ \r
+ @return javax.swing.JButton \r
+ \r
+ **/\r
private JButton getJButtonCancel() {\r
if (jButtonCancel == null) {\r
jButtonCancel = new JButton();\r
}\r
\r
/**\r
- * This method initializes jButtonGenerateGuid \r
- * \r
- * @return javax.swing.JButton \r
- */\r
+ This method initializes jButtonGenerateGuid \r
+ \r
+ @return javax.swing.JButton \r
+ \r
+ **/\r
private JButton getJButtonGenerateGuid() {\r
if (jButtonGenerateGuid == null) {\r
jButtonGenerateGuid = new JButton();\r
}\r
\r
/**\r
- * This method initializes jComboBoxExistingPackage \r
- * \r
- * @return javax.swing.JComboBox \r
- */\r
+ This method initializes jComboBoxExistingPackage \r
+ \r
+ @return javax.swing.JComboBox \r
+ \r
+ **/\r
private JComboBox getJComboBoxExistingPackage() {\r
if (jComboBoxExistingPackage == null) {\r
jComboBoxExistingPackage = new JComboBox();\r
}\r
\r
/**\r
- \r
- @param args\r
+ This is the default constructor\r
\r
**/\r
- public static void main(String[] args) {\r
-\r
- }\r
-\r
- /**\r
- * This is the default constructor\r
- */\r
public Clone() {\r
super();\r
init();\r
}\r
\r
/**\r
- This is the default constructor\r
+ This is the override constructor\r
+ \r
+ @param parentFrame The parent frame which starts this frame\r
+ @param modal To identify the frame's modal\r
+ @param fileType To identify the clone target type\r
+ @param identification The clone target's identification\r
\r
**/\r
public Clone(IFrame parentFrame, boolean modal, int fileType, Identification identification) {\r
}\r
\r
/**\r
- * This method initializes this\r
- * \r
- * @return void\r
- */\r
+ This method initializes this\r
+ \r
+ **/\r
private void init() {\r
this.setSize(550, 260);\r
this.setContentPane(getJContentPane());\r
}\r
\r
/**\r
- * This method initializes this\r
- * \r
- * @return void\r
- */\r
+ This method initializes this with given clone target type.\r
+ Customize the frame interface via different clone target type.\r
+ \r
+ @param mode To identify the clone target type\r
+ \r
+ **/\r
private void init(int mode) {\r
init();\r
+ //\r
+ // For MODULE_SURFACE_AREA\r
+ //\r
if (mode == DataType.RETURN_TYPE_MODULE_SURFACE_AREA) {\r
this.jTextFieldType.setText(DataType.MODULE_SURFACE_AREA);\r
String s = oldId.getPath();\r
initExistingPackage();\r
this.jButtonBrowse.setVisible(false);\r
this.jTextFieldFilePath\r
- .setToolTipText("Input module name here. For example, Application\\HelloWorld\\HelloWorld.msa");\r
+ .setToolTipText("<html>Input the module's relative path and filename, for example:<br>Application\\HelloWorld\\HelloWorld.msa</html>");\r
this.jTextFieldFilePath.setSize(320, this.jTextFieldFilePath.getSize().height);\r
this.jLabelDestinationFile.setText("New Module Path and Filename");\r
}\r
+ //\r
+ // For PACKAGE_SURFACE_AREA\r
+ //\r
if (mode == DataType.RETURN_TYPE_PACKAGE_SURFACE_AREA) {\r
this.jTextFieldType.setText(DataType.PACKAGE_SURFACE_AREA);\r
String s = oldId.getPath();\r
this.jLabelBelong.setEnabled(false);\r
this.jComboBoxExistingPackage.setEnabled(false);\r
this.jButtonBrowse.setVisible(false);\r
- this.jTextFieldFilePath.setToolTipText("Input package name here. For example, MdePkg\\MdePkg.fpd");\r
+ this.jTextFieldFilePath.setToolTipText("<html>Input the package's relative path and file name, for example:<br>MdePkg\\MdePkg.spd</html>");\r
this.jTextFieldFilePath.setSize(320, this.jTextFieldFilePath.getSize().height);\r
this.jLabelDestinationFile.setText("New Package Path and Filename");\r
}\r
+ //\r
+ // For PLATFORM_SURFACE_AREA\r
+ //\r
if (mode == DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA) {\r
this.jTextFieldType.setText(DataType.PLATFORM_SURFACE_AREA);\r
this.jTextFieldSource.setText(oldId.getPath());\r
this.jLabelBelong.setEnabled(false);\r
this.jComboBoxExistingPackage.setEnabled(false);\r
this.jTextFieldFilePath\r
- .setToolTipText("Select platform path here. For example, C:\\MyWorkspace\\EdkNt32Pkg\\Nt32.fpd");\r
+ .setToolTipText("<html>Select the platform's relative path and filename. For example:<br>C:\\MyWorkspace\\EdkNt32Pkg\\Nt32.fpd</html>");\r
this.jLabelDestinationFile.setText("New Platform Path and Filename");\r
}\r
+ //\r
+ // For WORKSPACE\r
+ //\r
if (mode == DataType.RETURN_TYPE_WORKSPACE) {\r
this.jTextFieldType.setText(DataType.WORKSPACE);\r
this.jTextFieldSource.setText(Workspace.getCurrentWorkspace());\r
this.jButtonGenerateGuid.setEnabled(false);\r
this.jLabelVersion.setEnabled(false);\r
this.jTextFieldVersion.setEnabled(false);\r
- this.jTextFieldFilePath.setToolTipText("Input workspace path here. For example, C:\\MyWorkspace");\r
+ this.jTextFieldFilePath.setToolTipText("<html>Input the workspace path, for example:<br>C:\\MyWorkspace</html>");\r
this.jLabelDestinationFile.setText("New Workspace Path");\r
}\r
}\r
\r
/**\r
- * This method initializes jContentPane\r
- * \r
- * @return javax.swing.JPanel\r
- */\r
+ This method initializes jContentPane\r
+ \r
+ @return javax.swing.JPanel\r
+ \r
+ **/\r
private JPanel getJContentPane() {\r
if (jContentPane == null) {\r
jLabelBelong = new JLabel();\r
jLabelBelong.setBounds(new java.awt.Rectangle(15, 60, 190, 20));\r
- jLabelBelong.setText("Clone to Package");\r
+ jLabelBelong.setText("Clone Package");\r
jLabelVersion = new JLabel();\r
jLabelVersion.setBounds(new java.awt.Rectangle(15, 160, 190, 20));\r
jLabelVersion.setText("Version");\r
if (arg0.getSource() == jButtonOk) {\r
if (this.check()) {\r
try {\r
+ //\r
+ // Save to file\r
+ //\r
this.save();\r
} catch (IOException e) {\r
Log.wrn("Clone", e.getMessage());\r
}\r
\r
//\r
- // Use different file ext\r
+ // Use different file ext for different clone target type\r
//\r
if (arg0.getSource() == this.jButtonBrowse) {\r
JFileChooser fc = new JFileChooser();\r
}\r
}\r
\r
- //\r
- // Check name, guid and version\r
- //\r
+ /**\r
+ Check name, guid and version.\r
+ If all of them are valid, save information to new id\r
+ \r
+ @retval true All name, guid and version are valid\r
+ @retval false Any one of name, guid and version is invalid\r
+ \r
+ **/\r
private boolean checkId() {\r
//\r
// Check Basename\r
//\r
if (isEmpty(this.jTextFieldBaseName.getText())) {\r
- Log.wrn("Clone", "Base Name couldn't be empty!");\r
+ Log.wrn("Clone", "The Name is required!");\r
return false;\r
}\r
if (!DataValidation.isBaseName(this.jTextFieldBaseName.getText())) {\r
- Log.wrn("Clone", "Incorrect data type for Base Name");\r
+ Log.wrn("Clone", "<html>Incorrect data type for the Name, it must<br>be a single word, starting with an alpha character.</html>");\r
return false;\r
}\r
\r
// Check Guid\r
//\r
if (isEmpty(this.jTextFieldGuid.getText())) {\r
- Log.wrn("Clone", "Guid couldn't be empty!");\r
+ Log.wrn("Clone", "A Guid is required!!");\r
return false;\r
}\r
if (!DataValidation.isGuid(this.jTextFieldGuid.getText())) {\r
- Log.wrn("Clone", "Incorrect data type for Guid");\r
+ Log.wrn("Clone", "<html>Incorrect data type for Guid, which must<br>be in registry format (8-4-4-4-12) for example:<br>d3adb123-eef1-466d-39ac-02febcaf5997</html>");\r
return false;\r
}\r
\r
// Check Version\r
//\r
if (isEmpty(this.jTextFieldVersion.getText())) {\r
- Log.wrn("Clone", "Version couldn't be empty!");\r
+ Log.wrn("Clone", "A Version must be entered!");\r
return false;\r
}\r
if (!DataValidation.isVersion(this.jTextFieldVersion.getText())) {\r
- Log.wrn("Clone", "Incorrect data type for Version");\r
+ Log.wrn("Clone", "<html>Incorrect data type for Version, which must<br>be one or more digits, optionally followed by sequence<br>of one or more dot, one or more digits; examples:<br>1.0 1.0.1 12.25.256</html>");\r
return false;\r
}\r
\r
/**\r
Check before save\r
\r
- @return\r
+ @retval true All check points are passed\r
+ @retval false Any one of check points is failed\r
\r
**/\r
private boolean check() {\r
// Common Check\r
//\r
if (!srcFile.exists()) {\r
- Log.wrn("Clone", "The source doesn't exist");\r
+ Log.wrn("Clone", "The source file does not exist!");\r
return false;\r
}\r
if (isEmpty(trg)) {\r
- Log.wrn("Clone", "The destination file path couldn't be empty");\r
+ Log.wrn("Clone", "The destination file path must be entered!");\r
return false;\r
}\r
if (src.equals(trg)) {\r
- Log.wrn("Clone", "The source and destination couldn't be same");\r
+ Log.wrn("Clone", "The source and destination can not be same!");\r
return false;\r
}\r
if (trgFile.exists()) {\r
- Log.wrn("Clone", "The destination already exists");\r
+ Log.wrn("Clone", "The destination already exists!");\r
return false;\r
}\r
\r
//\r
if (mode == DataType.RETURN_TYPE_WORKSPACE) {\r
if (trg.indexOf(src + DataType.FILE_SEPARATOR) == 0) {\r
- Log.wrn("Clone", "The new workspace couldn't be in current workspace!");\r
+ Log.wrn("Clone", "The new workspace can not be located within the current workspace!");\r
return false;\r
}\r
}\r
// Check for Module\r
//\r
if (mode == DataType.RETURN_TYPE_MODULE_SURFACE_AREA) {\r
- // if (trg.indexOf(DataType.DOS_FILE_SEPARATOR) == -1 && trg.indexOf(DataType.UNIX_FILE_SEPARATOR) == -1) {\r
- // Log.err("The module name must include a path");\r
- // return false;\r
- // }\r
trg = this.getModulePath();\r
if (src.equals(trg)) {\r
- Log.wrn("Clone", "The source and destination couldn't be same");\r
+ Log.wrn("Clone", "The source and destination paths for cloning a module must be different!");\r
return false;\r
}\r
trgFile = new File(trg);\r
if (trgFile.exists()) {\r
- Log.wrn("Clone", "The target module already exists");\r
+ Log.wrn("Clone", "The target module already exists!");\r
return false;\r
}\r
return checkId();\r
//\r
if (mode == DataType.RETURN_TYPE_PACKAGE_SURFACE_AREA) {\r
if (trg.indexOf(DataType.DOS_FILE_SEPARATOR) == -1 && trg.indexOf(DataType.UNIX_FILE_SEPARATOR) == -1) {\r
- Log.wrn("Clone", "The package name must include a path");\r
+ Log.wrn("Clone", "The package name must include a path!");\r
return false;\r
}\r
trg = this.getPackagePath();\r
if (Tools.getFilePathOnly(src).equals(Tools.getFilePathOnly(trg))) {\r
- Log.wrn("Clone", "The source and destination couldn't be same");\r
+ Log.wrn("Clone", "The source and destination paths for cloning a package must be different!");\r
return false;\r
}\r
trgFile = new File(trg);\r
if (trgFile.exists()) {\r
- Log.wrn("Clone", "The target package already exists");\r
+ Log.wrn("Clone", "The target package already exists!");\r
return false;\r
}\r
return checkId();\r
//\r
if (mode == DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA) {\r
if (trg.indexOf(Workspace.getCurrentWorkspace()) != 0) {\r
- Log.wrn("Clone", "The target platform must be in current workspace");\r
+ Log.wrn("Clone", "The platform clone must be located in the current workspace!");\r
return false;\r
}\r
trgFile = new File(trg);\r
if (trgFile.exists()) {\r
- Log.wrn("Clone", "The target platform already exists");\r
+ Log.wrn("Clone", "The target platform already exists.");\r
return false;\r
}\r
return checkId();\r
return true;\r
}\r
\r
+ /**\r
+ Save clone target to new location\r
+ \r
+ @throws IOException\r
+ @throws XmlException\r
+ @throws Exception\r
+ \r
+ **/\r
private void save() throws IOException, XmlException, Exception {\r
String src = this.oldId.getPath();\r
String trg = this.jTextFieldFilePath.getText();\r
//\r
trg = getModulePath();\r
newId.setPath(trg);\r
- vFiles = wt.getAllModuleFilesPath(src);\r
+ vFiles = wt.getAllFilesPathOfModule(src);\r
\r
//\r
// First copy all files to new directory\r
msa.getMsaHeader().setVersion(newId.getVersion());\r
\r
//\r
- // Update Cloned From element\r
+ // Update <Cloned> Section\r
//\r
updateModuleClonedId(msa, oldId);\r
-\r
+ \r
//\r
// Save to file\r
//\r
// Update the db file\r
//\r
wt.addModuleToPackage(mid, psa);\r
+ \r
+ //\r
+ // Update GlobalData\r
+ //\r
+ GlobalData.vModuleList.addElement(mid);\r
+ GlobalData.openingModuleList.insertToOpeningModuleList(mid, msa);\r
\r
this.returnType = DataType.RETURN_TYPE_MODULE_SURFACE_AREA;\r
}\r
//\r
trg = this.getPackagePath();\r
newId.setPath(trg);\r
- vFiles = wt.getAllPakcageFilesPath(src);\r
+ vFiles = wt.getAllFilesPathOfPakcage(src);\r
\r
+ //\r
+ // First copy all files to new directory\r
+ //\r
FileOperation.copyFile(src, trg);\r
for (int index = 1; index < vFiles.size(); index++) {\r
String oldFile = vFiles.get(index);\r
FileOperation.copyFile(oldFile, newFile);\r
}\r
\r
- //\r
- // First copy all files to new directory\r
- //\r
- //FileOperation.copyFolder(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg));\r
-\r
- //\r
- // Delete old spd file\r
- //\r
- //FileOperation.delFile(Tools.getFilePathOnly(trg) + DataType.FILE_SEPARATOR + Tools.getFileNameOnly(src));\r
-\r
//\r
// Create new spd file\r
//\r
spd.getSpdHeader().setVersion(newId.getVersion());\r
\r
//\r
- // Update Cloned From element\r
+ // Update <Cloned> Section\r
//\r
updatePackageClonedId(spd, oldId);\r
\r
// Update the db file\r
//\r
wt.addPackageToDatabase(pid);\r
-\r
+ \r
+ //\r
+ // Update GlobalData\r
+ //\r
+ GlobalData.vPackageList.addElement(pid);\r
+ GlobalData.openingPackageList.insertToOpeningPackageList(pid, spd);\r
+ \r
+ //\r
+ // Add all cloned modules\r
+ //\r
+ Vector<String> modulePaths = GlobalData.getAllModulesOfPackage(pid.getPath());\r
+ String modulePath = null;\r
+ ModuleSurfaceArea msa = null;\r
+ \r
+ for (int indexJ = 0; indexJ < modulePaths.size(); indexJ++) {\r
+ try {\r
+ modulePath = modulePaths.get(indexJ);\r
+ msa = OpenFile.openMsaFile(modulePath);\r
+ } catch (IOException e) {\r
+ Log.err("Open Module Surface Area " + modulePath, e.getMessage());\r
+ continue;\r
+ } catch (XmlException e) {\r
+ Log.err("Open Module Surface Area " + modulePath, e.getMessage());\r
+ continue;\r
+ } catch (Exception e) {\r
+ Log.err("Open Module Surface Area " + modulePath, "Invalid file type");\r
+ continue;\r
+ }\r
+ Identification id = Tools.getId(modulePath, msa);\r
+ mid = new ModuleIdentification(id, pid);\r
+ GlobalData.vModuleList.addElement(mid);\r
+ GlobalData.openingModuleList.insertToOpeningModuleList(mid, msa);\r
+ }\r
+ \r
this.returnType = DataType.RETURN_TYPE_PACKAGE_SURFACE_AREA;\r
}\r
\r
// Update the db file\r
//\r
wt.addPlatformToDatabase(fid);\r
+ \r
+ //\r
+ // Update GlobalData\r
+ //\r
+ GlobalData.vPlatformList.addElement(fid);\r
+ GlobalData.openingPlatformList.insertToOpeningPlatformList(fid, fpd);\r
\r
this.returnType = DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA;\r
}\r
vFiles = null;\r
}\r
\r
+ /**\r
+ Get the path of selected package\r
+ \r
+ @return String The path of selected package\r
+ \r
+ **/\r
private String getSelectPackagePath() {\r
return Tools.getFilePathOnly(packages.elementAt(this.jComboBoxExistingPackage.getSelectedIndex()).getPath());\r
}\r
\r
+ /**\r
+ Get the path of source module\r
+ Since the path of source module is relative, make it up to full path.\r
+ \r
+ @return String The full path of source module\r
+ \r
+ **/\r
private String getModulePath() {\r
String trg = this.jTextFieldFilePath.getText();\r
trg = Tools.addPathExt(trg, mode);\r
return trg;\r
}\r
\r
+ /**\r
+ Get the path of source package\r
+ Since the path of source package is relative, make it up to full path.\r
+ \r
+ @return String The full path of source package\r
+ \r
+ **/\r
private String getPackagePath() {\r
String trg = this.jTextFieldFilePath.getText();\r
trg = Tools.addPathExt(trg, mode);\r
}\r
\r
/**\r
- Set target item's Cloned From element\r
-\r
- @param id\r
- @return\r
-\r
+ Set msa file's <Cloned> section via given identification\r
+ \r
+ @param msa ModuleSurfaceArea for clone target\r
+ @param id Identification of clone source\r
+ \r
**/\r
private void updateModuleClonedId(ModuleSurfaceArea msa, Identification id) {\r
//\r
}\r
\r
/**\r
- Set target item's Cloned From element\r
+ Set spd file's <Cloned> section via given identification\r
\r
- @param id\r
- @return\r
+ @param spd PackageSurfaceArea for clone target\r
+ @param id Identification of clone source\r
\r
**/\r
private void updatePackageClonedId(PackageSurfaceArea spd, Identification id) {\r
c.setPackageGuid(id.getGuid());\r
c.setPackageVersion(id.getVersion());\r
c.setId(count.add(new BigInteger("1")));\r
- String guid = wt.getModuleFarGuid(oldId);\r
+ String guid = wt.getPackageFarGuid(oldId);\r
if (guid != null && !guid.equals("")) {\r
c.setFarGuid(guid);\r
}\r
}\r
\r
/**\r
- Set target item's Cloned From element\r
+ Set fpd file's <Cloned> section via given identification\r
\r
- @param id\r
- @return\r
+ @param fpd PlatformSurfaceArea for clone target\r
+ @param id Identification of clone source\r
\r
**/\r
private void updatePlatformClonedId(PlatformSurfaceArea fpd, Identification id) {\r
c.setPlatformGuid(id.getGuid());\r
c.setPlatformVersion(id.getVersion());\r
c.setId(count.add(new BigInteger("1")));\r
- String guid = wt.getModuleFarGuid(oldId);\r
+ String guid = wt.getPlatformFarGuid(oldId);\r
if (guid != null && !guid.equals("")) {\r
c.setFarGuid(guid);\r
}\r
fpd.setPlatformDefinitions(pd);\r
}\r
\r
+ /**\r
+ Get PlatformIdentification\r
+ \r
+ @return PlatformIdentification\r
+ \r
+ **/\r
public PlatformIdentification getFid() {\r
return fid;\r
}\r
\r
+ /**\r
+ Set PlatformIdentification\r
+ \r
+ @param fid PlatformIdentification\r
+ \r
+ **/\r
public void setFid(PlatformIdentification fid) {\r
this.fid = fid;\r
}\r
\r
+ /**\r
+ Get ModuleIdentification\r
+ \r
+ @return ModuleIdentification\r
+ \r
+ **/\r
public ModuleIdentification getMid() {\r
return mid;\r
}\r
\r
+ /**\r
+ Set ModuleIdentification\r
+ \r
+ @param mid ModuleIdentification\r
+ \r
+ **/\r
public void setMid(ModuleIdentification mid) {\r
this.mid = mid;\r
}\r
\r
+ /**\r
+ Get PackageIdentification\r
+ \r
+ @return PackageIdentification\r
+ \r
+ **/\r
public PackageIdentification getPid() {\r
return pid;\r
}\r
\r
+ /**\r
+ Set PackageIdentification\r
+ \r
+ @param pid PackageIdentification\r
+ \r
+ **/\r
public void setPid(PackageIdentification pid) {\r
this.pid = pid;\r
}\r