]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/ModuleEditor/src/org/tianocore/packaging/module/ui/ModuleGuids.java
186709644f65073aaffd1aba7477372eba841517
[mirror_edk2.git] / Tools / Source / ModuleEditor / src / org / tianocore / packaging / module / ui / ModuleGuids.java
1 /** @file
2
3 The file is used to create, update Guids of MSA/MBD file
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15 package org.tianocore.packaging.module.ui;
16
17 import java.awt.event.ActionEvent;
18
19 import javax.swing.JButton;
20 import javax.swing.JComboBox;
21 import javax.swing.JLabel;
22 import javax.swing.JPanel;
23 import javax.swing.JRadioButton;
24 import javax.swing.JTextField;
25
26 import org.tianocore.ConditionalExpressionDocument;
27 import org.tianocore.DefaultValueDocument;
28 import org.tianocore.GuidUsage;
29 import org.tianocore.GuidsDocument;
30 import org.tianocore.common.DataValidation;
31 import org.tianocore.common.Log;
32 import org.tianocore.common.Tools;
33 import org.tianocore.packaging.common.ui.IComboBox;
34 import org.tianocore.packaging.common.ui.IInternalFrame;
35 import org.tianocore.packaging.common.ui.StarLabel;
36
37 /**
38 The class is used to create, update Guids of MSA/MBD file
39 It extends IInternalFrame
40
41 @since ModuleEditor 1.0
42
43 **/
44 public class ModuleGuids extends IInternalFrame {
45
46 ///
47 /// Define class Serial Version UID
48 ///
49 private static final long serialVersionUID = 6710858997766979803L;
50
51 //
52 //Define class members
53 //
54 private GuidsDocument.Guids guids = null;
55
56 private int location = -1;
57
58 private JPanel jContentPane = null;
59
60 private JLabel jLabelC_Name = null;
61
62 private JTextField jTextFieldC_Name = null;
63
64 private JLabel jLabelGuidValue = null;
65
66 private JTextField jTextFieldGuidValue = null;
67
68 private JLabel jLabelFeatureFlag = null;
69
70 private IComboBox iComboBoxFeatureFlag = null;
71
72 private JLabel jLabelConditionalExpression = null;
73
74 private IComboBox iComboBoxConditionalExpression = null;
75
76 private JLabel jLabelDefault = null;
77
78 private JTextField jTextFieldDefaultValue = null;
79
80 private JLabel jLabelHelpText = null;
81
82 private JTextField jTextFieldHelpText = null;
83
84 private JLabel jLabelEnableFeature = null;
85
86 private JRadioButton jRadioButtonEnableFeature = null;
87
88 private JRadioButton jRadioButtonDisableFeature = null;
89
90 private JLabel jLabelUsage = null;
91
92 private JComboBox jComboBoxUsage = null;
93
94 private JButton jButtonOk = null;
95
96 private JButton jButtonCancel = null;
97
98 private JButton jButtonGenerateGuid = null;
99
100 private JLabel jLabelOverrideID = null;
101
102 private JTextField jTextFieldOverrideID = null;
103
104 /**
105 This method initializes jTextFieldC_Name
106
107 @return javax.swing.JTextField jTextFieldC_Name
108
109 **/
110 private JTextField getJTextFieldC_Name() {
111 if (jTextFieldC_Name == null) {
112 jTextFieldC_Name = new JTextField();
113 jTextFieldC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20));
114 }
115 return jTextFieldC_Name;
116 }
117
118 /**
119 This method initializes jTextFieldGuidValsue
120
121 @return javax.swing.JTextField jTextFieldGuidValue
122
123 **/
124 private JTextField getJTextFieldGuidValsue() {
125 if (jTextFieldGuidValue == null) {
126 jTextFieldGuidValue = new JTextField();
127 jTextFieldGuidValue.setBounds(new java.awt.Rectangle(160, 35, 240, 20));
128 }
129 return jTextFieldGuidValue;
130 }
131
132 /**
133 This method initializes jTextFieldFeatureFlag
134
135 @return javax.swing.JTextField iComboBoxFeatureFlag
136
137 **/
138 private IComboBox getIComboBoxFeatureFlag() {
139 if (iComboBoxFeatureFlag == null) {
140 iComboBoxFeatureFlag = new IComboBox();
141 iComboBoxFeatureFlag.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
142 }
143 return iComboBoxFeatureFlag;
144 }
145
146 /**
147 This method initializes jTextFieldConditionalExpression
148
149 @return javax.swing.JTextField iComboBoxConditionalExpression
150
151 **/
152 private IComboBox getIComboBoxConditionalExpression() {
153 if (iComboBoxConditionalExpression == null) {
154 iComboBoxConditionalExpression = new IComboBox();
155 iComboBoxConditionalExpression.setBounds(new java.awt.Rectangle(160, 85, 320, 20));
156 }
157 return iComboBoxConditionalExpression;
158 }
159
160 /**
161 This method initializes jTextFieldDefault
162
163 @return javax.swing.JTextField jTextFieldDefaultValue
164
165 **/
166 private JTextField getJTextFieldDefaultValue() {
167 if (jTextFieldDefaultValue == null) {
168 jTextFieldDefaultValue = new JTextField();
169 jTextFieldDefaultValue.setBounds(new java.awt.Rectangle(160, 110, 320, 20));
170 }
171 return jTextFieldDefaultValue;
172 }
173
174 /**
175 This method initializes jTextFieldHelpText
176
177 @return javax.swing.JTextField jTextFieldHelpText
178
179 **/
180 private JTextField getJTextFieldHelpText() {
181 if (jTextFieldHelpText == null) {
182 jTextFieldHelpText = new JTextField();
183 jTextFieldHelpText.setBounds(new java.awt.Rectangle(160, 135, 320, 20));
184 }
185 return jTextFieldHelpText;
186 }
187
188 /**
189 This method initializes jRadioButtonEnableFeature
190
191 @return javax.swing.JRadioButton jRadioButtonEnableFeature
192
193 **/
194 private JRadioButton getJRadioButtonEnableFeature() {
195 if (jRadioButtonEnableFeature == null) {
196 jRadioButtonEnableFeature = new JRadioButton();
197 jRadioButtonEnableFeature.setText("Enable");
198 jRadioButtonEnableFeature.setBounds(new java.awt.Rectangle(160, 160, 90, 20));
199 jRadioButtonEnableFeature.setSelected(true);
200 jRadioButtonEnableFeature.addActionListener(this);
201 }
202 return jRadioButtonEnableFeature;
203 }
204
205 /**
206 This method initializes jRadioButtonDisableFeature
207
208 @return javax.swing.JRadioButton jRadioButtonDisableFeature
209
210 **/
211 private JRadioButton getJRadioButtonDisableFeature() {
212 if (jRadioButtonDisableFeature == null) {
213 jRadioButtonDisableFeature = new JRadioButton();
214 jRadioButtonDisableFeature.setText("Disable");
215 jRadioButtonDisableFeature.setBounds(new java.awt.Rectangle(320, 160, 90, 20));
216 jRadioButtonDisableFeature.addActionListener(this);
217 }
218 return jRadioButtonDisableFeature;
219 }
220
221 /**
222 This method initializes jComboBoxUsage
223
224 @return javax.swing.JComboBox jComboBoxUsage
225
226 **/
227 private JComboBox getJComboBoxUsage() {
228 if (jComboBoxUsage == null) {
229 jComboBoxUsage = new JComboBox();
230 jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 185, 320, 20));
231 }
232 return jComboBoxUsage;
233 }
234
235 /**
236 This method initializes jButtonOk
237
238 @return javax.swing.JButton jButtonOk
239
240 **/
241 private JButton getJButtonOk() {
242 if (jButtonOk == null) {
243 jButtonOk = new JButton();
244 jButtonOk.setText("OK");
245 jButtonOk.setBounds(new java.awt.Rectangle(290, 240, 90, 20));
246 jButtonOk.addActionListener(this);
247 }
248 return jButtonOk;
249 }
250
251 /**
252 This method initializes jButtonCancel
253
254 @return javax.swing.JButton jButtonCancel
255
256 **/
257 private JButton getJButtonCancel() {
258 if (jButtonCancel == null) {
259 jButtonCancel = new JButton();
260 jButtonCancel.setText("Cancel");
261 jButtonCancel.setBounds(new java.awt.Rectangle(390, 240, 90, 20));
262 jButtonCancel.addActionListener(this);
263 }
264 return jButtonCancel;
265 }
266
267 /**
268 This method initializes jButtonGenerateGuid
269
270 @return javax.swing.JButton jButtonGenerateGuid
271
272 **/
273 private JButton getJButtonGenerateGuid() {
274 if (jButtonGenerateGuid == null) {
275 jButtonGenerateGuid = new JButton();
276 jButtonGenerateGuid.setBounds(new java.awt.Rectangle(405, 35, 75, 20));
277 jButtonGenerateGuid.setText("GEN");
278 jButtonGenerateGuid.addActionListener(this);
279 }
280 return jButtonGenerateGuid;
281 }
282
283 /**
284 This method initializes jTextFieldOverrideID
285
286 @return javax.swing.JTextField jTextFieldOverrideID
287
288 **/
289 private JTextField getJTextFieldOverrideID() {
290 if (jTextFieldOverrideID == null) {
291 jTextFieldOverrideID = new JTextField();
292 jTextFieldOverrideID.setBounds(new java.awt.Rectangle(160, 210, 320, 20));
293 }
294 return jTextFieldOverrideID;
295 }
296
297 public static void main(String[] args) {
298
299 }
300
301 /**
302 This is the default constructor
303
304 **/
305 public ModuleGuids() {
306 super();
307 init();
308 this.setVisible(true);
309 }
310
311 /**
312 This is the override edit constructor
313
314 @param inGuids The input data of GuidsDocument.Guids
315
316 **/
317 public ModuleGuids(GuidsDocument.Guids inGuids) {
318 super();
319 init(inGuids);
320 this.setVisible(true);
321 }
322
323 /**
324 This is the override edit constructor
325
326 @param inGuids The input data of GuidsDocument.Guids
327 @param type The input data of node type
328 @param index The input data of node index
329
330 **/
331 public ModuleGuids(GuidsDocument.Guids inGuids, int type, int index) {
332 super();
333 init(inGuids, type, index);
334 this.setVisible(true);
335 }
336
337 /**
338 This method initializes this
339
340 @param inGuids The input data of GuidsDocument.Guids
341
342 **/
343 private void init(GuidsDocument.Guids inGuids) {
344 init();
345 this.setGuids(inGuids);
346 }
347
348 /**
349 This method initializes this
350 Fill values to all fields if these values are not empty
351
352 @param inGuids The input data of GuidsDocument.Guids
353 @param type The input data of node type
354 @param index The input data of node index
355
356 **/
357 private void init(GuidsDocument.Guids inGuids, int type, int index) {
358 init(inGuids);
359 this.location = index;
360 if (this.guids.getGuidEntryList().size() > 0) {
361 if (this.guids.getGuidEntryArray(index).getCName() != null) {
362 this.jTextFieldC_Name.setText(this.guids.getGuidEntryArray(index).getCName());
363 }
364 if (this.guids.getGuidEntryArray(index).getGuidValue() != null) {
365 this.jTextFieldGuidValue.setText(this.guids.getGuidEntryArray(index).getGuidValue());
366 }
367 if (this.guids.getGuidEntryArray(index).getFeatureFlagList().size() > 0) {
368 for (int indexI = 0; indexI < this.guids.getGuidEntryArray(index).getFeatureFlagList().size(); indexI++) {
369 this.iComboBoxFeatureFlag.addItem(this.guids.getGuidEntryArray(index).getFeatureFlagArray(indexI));
370 }
371 }
372 if (this.guids.getGuidEntryArray(index).getConditionalExpressionList().size() > 0) {
373 for (int indexI = 0; indexI < this.guids.getGuidEntryArray(index).getConditionalExpressionArray(0)
374 .getConditionList().size(); indexI++) {
375 this.iComboBoxConditionalExpression.addItem(this.guids.getGuidEntryArray(index)
376 .getConditionalExpressionArray(0)
377 .getConditionArray(indexI));
378 }
379 }
380 if (this.guids.getGuidEntryArray(index).getDefaultValue() != null) {
381 this.jTextFieldDefaultValue.setText(this.guids.getGuidEntryArray(index).getDefaultValue()
382 .getStringValue());
383 }
384 if (this.guids.getGuidEntryArray(index).getHelpText() != null) {
385 this.jTextFieldHelpText.setText(this.guids.getGuidEntryArray(index).getHelpText());
386 }
387 if (this.guids.getGuidEntryArray(index).getUsage() != null) {
388 this.jComboBoxUsage.setSelectedItem(this.guids.getGuidEntryArray(index).getUsage().toString());
389 }
390 this.jRadioButtonEnableFeature.setSelected(this.guids.getGuidEntryArray(index).getEnableFeature());
391 this.jRadioButtonDisableFeature.setSelected(!this.guids.getGuidEntryArray(index).getEnableFeature());
392 this.jTextFieldOverrideID.setText(String.valueOf(this.guids.getGuidEntryArray(index).getOverrideID()));
393 }
394 }
395
396 /**
397 This method initializes this
398
399 **/
400 private void init() {
401 this.setSize(500, 515);
402 this.setContentPane(getJContentPane());
403 this.setTitle("Guids");
404 initFrame();
405 this.setViewMode(false);
406 }
407
408 /**
409 Disable all components when the mode is view
410
411 @param isView true - The view mode; false - The non-view mode
412
413 **/
414 public void setViewMode(boolean isView) {
415 this.jButtonOk.setVisible(false);
416 this.jButtonCancel.setVisible(false);
417 if (isView) {
418 this.jTextFieldC_Name.setEnabled(!isView);
419 this.jTextFieldGuidValue.setEnabled(!isView);
420 this.iComboBoxFeatureFlag.setEnabled(!isView);
421 this.iComboBoxConditionalExpression.setEnabled(!isView);
422 this.jTextFieldDefaultValue.setEnabled(!isView);
423 this.jTextFieldHelpText.setEnabled(!isView);
424 this.jComboBoxUsage.setEnabled(!isView);
425 this.jRadioButtonEnableFeature.setEnabled(!isView);
426 this.jRadioButtonDisableFeature.setEnabled(!isView);
427 this.jTextFieldOverrideID.setEnabled(!isView);
428 this.jButtonCancel.setEnabled(!isView);
429 this.jButtonGenerateGuid.setEnabled(!isView);
430 this.jButtonOk.setEnabled(!isView);
431 }
432 }
433
434 /**
435 This method initializes jContentPane
436
437 @return javax.swing.JPanel jContentPane
438
439 **/
440 private JPanel getJContentPane() {
441 if (jContentPane == null) {
442 jLabelOverrideID = new JLabel();
443 jLabelOverrideID.setBounds(new java.awt.Rectangle(15, 210, 140, 20));
444 jLabelOverrideID.setText("Override ID");
445 jLabelUsage = new JLabel();
446 jLabelUsage.setText("Usage");
447 jLabelUsage.setBounds(new java.awt.Rectangle(15, 185, 140, 20));
448 jLabelEnableFeature = new JLabel();
449 jLabelEnableFeature.setText("Enable Feature");
450 jLabelEnableFeature.setBounds(new java.awt.Rectangle(15, 160, 140, 20));
451 jLabelHelpText = new JLabel();
452 jLabelHelpText.setText("Help Text");
453 jLabelHelpText.setBounds(new java.awt.Rectangle(15, 135, 140, 20));
454 jLabelDefault = new JLabel();
455 jLabelDefault.setText("Default Value");
456 jLabelDefault.setBounds(new java.awt.Rectangle(15, 110, 140, 20));
457 jLabelConditionalExpression = new JLabel();
458 jLabelConditionalExpression.setText("Conditional Expression");
459 jLabelConditionalExpression.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
460 jLabelFeatureFlag = new JLabel();
461 jLabelFeatureFlag.setText("Feature Flag");
462 jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
463 jLabelGuidValue = new JLabel();
464 jLabelGuidValue.setText("Guid Value");
465 jLabelGuidValue.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
466 jLabelC_Name = new JLabel();
467 jLabelC_Name.setText("C_Name");
468 jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 140, 20));
469 jContentPane = new JPanel();
470 jContentPane.setLayout(null);
471 jContentPane.add(jLabelC_Name, null);
472 jContentPane.add(getJTextFieldC_Name(), null);
473 jContentPane.add(jLabelGuidValue, null);
474 jContentPane.add(getJTextFieldGuidValsue(), null);
475 jContentPane.add(jLabelFeatureFlag, null);
476 jContentPane.add(getIComboBoxFeatureFlag(), null);
477 jContentPane.add(jLabelConditionalExpression, null);
478 jContentPane.add(getIComboBoxConditionalExpression(), null);
479 jContentPane.add(jLabelDefault, null);
480 jContentPane.add(getJTextFieldDefaultValue(), null);
481 jContentPane.add(jLabelHelpText, null);
482 jContentPane.add(getJTextFieldHelpText(), null);
483 jContentPane.add(jLabelEnableFeature, null);
484 jContentPane.add(getJRadioButtonEnableFeature(), null);
485 jContentPane.add(getJRadioButtonDisableFeature(), null);
486 jContentPane.add(jLabelUsage, null);
487 jContentPane.add(getJComboBoxUsage(), null);
488 jContentPane.add(getJButtonOk(), null);
489 jContentPane.add(getJButtonCancel(), null);
490 jContentPane.add(getJButtonGenerateGuid(), null);
491 jContentPane.add(jLabelOverrideID, null);
492 jContentPane.add(getJTextFieldOverrideID(), null);
493
494 StarLabel jStarLabel1 = new StarLabel();
495 jStarLabel1.setLocation(new java.awt.Point(0, 10));
496
497 jContentPane.add(jStarLabel1, null);
498
499 initFrame();
500
501 }
502 return jContentPane;
503 }
504
505 /**
506 This method initializes Usage type
507
508 **/
509 private void initFrame() {
510 jComboBoxUsage.addItem("ALWAYS_CONSUMED");
511 jComboBoxUsage.addItem("SOMETIMES_CONSUMED");
512 jComboBoxUsage.addItem("ALWAYS_PRODUCED");
513 jComboBoxUsage.addItem("SOMETIMES_PRODUCED");
514 jComboBoxUsage.addItem("DEFAULT");
515 }
516
517 /* (non-Javadoc)
518 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
519 *
520 * Override actionPerformed to listen all actions
521 *
522 */
523 public void actionPerformed(ActionEvent arg0) {
524 if (arg0.getSource() == jButtonOk) {
525 this.setEdited(true);
526 this.save();
527 this.dispose();
528 }
529 if (arg0.getSource() == jButtonCancel) {
530 this.dispose();
531 }
532
533 if (arg0.getSource() == jButtonGenerateGuid) {
534 jTextFieldGuidValue.setText(Tools.generateUuidString());
535 }
536
537 //
538 //Contorl the selected status when click RadionButton
539 //Do not use Radio Button Group
540 //
541 if (arg0.getSource() == jRadioButtonEnableFeature) {
542 if (jRadioButtonEnableFeature.isSelected()) {
543 jRadioButtonDisableFeature.setSelected(false);
544 }
545 if (!jRadioButtonDisableFeature.isSelected() && !jRadioButtonEnableFeature.isSelected()) {
546 jRadioButtonEnableFeature.setSelected(true);
547 }
548 }
549
550 if (arg0.getSource() == jRadioButtonDisableFeature) {
551 if (jRadioButtonDisableFeature.isSelected()) {
552 jRadioButtonEnableFeature.setSelected(false);
553 }
554 if (!jRadioButtonDisableFeature.isSelected() && !jRadioButtonEnableFeature.isSelected()) {
555 jRadioButtonDisableFeature.setSelected(true);
556 }
557 }
558 }
559
560 /**
561 Get GuidsDocument.Guids
562
563 @return GuidsDocument.Guids
564
565 **/
566 public GuidsDocument.Guids getGuids() {
567 return guids;
568 }
569
570 /**
571 Set GuidsDocument.Guids
572
573 @param guids The input GuidsDocument.Guids
574
575 **/
576 public void setGuids(GuidsDocument.Guids guids) {
577 this.guids = guids;
578 }
579
580 /**
581 Data validation for all fields
582
583 @retval true - All datas are valid
584 @retval false - At least one data is invalid
585
586 **/
587 public boolean check() {
588 //
589 // Check if all required fields are not empty
590 //
591 if (isEmpty(this.jTextFieldC_Name.getText())) {
592 Log.err("C_Name couldn't be empty");
593 return false;
594 }
595
596 //
597 // Check if all fields have correct data types
598 //
599 if (!DataValidation.isCName(this.jTextFieldC_Name.getText())) {
600 Log.err("Incorrect data type for C_Name");
601 return false;
602 }
603 if (!isEmpty(this.jTextFieldGuidValue.getText()) && !DataValidation.isGuid(this.jTextFieldGuidValue.getText())) {
604 Log.err("Incorrect data type for Guid Value");
605 return false;
606 }
607 if (!isEmpty(this.jTextFieldOverrideID.getText())
608 && !DataValidation.isOverrideID(this.jTextFieldOverrideID.getText())) {
609 Log.err("Incorrect data type for Override ID");
610 return false;
611 }
612
613 return true;
614 }
615
616 /**
617 Save all components of Guids
618 if exists guids, set the value directly
619 if not exists guids, new an instance first
620
621 **/
622 public void save() {
623 try {
624 if (this.guids == null) {
625 guids = GuidsDocument.Guids.Factory.newInstance();
626 }
627 GuidsDocument.Guids.GuidEntry guid = GuidsDocument.Guids.GuidEntry.Factory.newInstance();
628 if (!isEmpty(this.jTextFieldC_Name.getText())) {
629 guid.setCName(this.jTextFieldC_Name.getText());
630 }
631 if (!isEmpty(this.jTextFieldGuidValue.getText())) {
632 guid.setGuidValue(this.jTextFieldGuidValue.getText());
633 }
634 if (this.iComboBoxFeatureFlag.getItemCount() > 0) {
635 for (int index = 0; index < this.iComboBoxFeatureFlag.getItemCount(); index++) {
636 guid.addNewFeatureFlag();
637 guid.setFeatureFlagArray(index, this.iComboBoxFeatureFlag.getItemAt(index).toString());
638 }
639 }
640 if (this.iComboBoxConditionalExpression.getItemCount() > 0) {
641 ConditionalExpressionDocument.ConditionalExpression ce = ConditionalExpressionDocument.ConditionalExpression.Factory
642 .newInstance();
643 for (int index = 0; index < this.iComboBoxConditionalExpression.getItemCount(); index++) {
644 ce.addCondition(this.iComboBoxConditionalExpression.getItemAt(index).toString());
645 }
646 if (guid.getConditionalExpressionList().size() < 1) {
647 guid.addNewConditionalExpression();
648 }
649 guid.setConditionalExpressionArray(0, ce);
650 }
651 if (!isEmpty(this.jTextFieldDefaultValue.getText())) {
652 DefaultValueDocument.DefaultValue dv = DefaultValueDocument.DefaultValue.Factory.newInstance();
653 dv.setStringValue(this.jTextFieldDefaultValue.getText());
654 guid.setDefaultValue(dv);
655 }
656 if (!isEmpty(this.jTextFieldHelpText.getText())) {
657 guid.setHelpText(this.jTextFieldHelpText.getText());
658 }
659 guid.setUsage(GuidUsage.Enum.forString(jComboBoxUsage.getSelectedItem().toString()));
660 guid.setEnableFeature(this.jRadioButtonEnableFeature.isSelected());
661 if (!isEmpty(this.jTextFieldOverrideID.getText())) {
662 guid.setOverrideID(Integer.parseInt(this.jTextFieldOverrideID.getText()));
663 }
664
665 if (location > -1) {
666 guids.setGuidEntryArray(location, guid);
667 } else {
668 guids.addNewGuidEntry();
669 guids.setGuidEntryArray(guids.getGuidEntryList().size() - 1, guid);
670 }
671 } catch (Exception e) {
672 Log.err("Update Guids", e.getMessage());
673 }
674 }
675 }