hahaking119 / vienna-add-in

Automatically exported from code.google.com/p/vienna-add-in
0 stars 0 forks source link

Handling of uniqueIdentifier and dictionaryEntryName incorrect #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Current state:

The behavior for handling uniqueIdentifiers and dictionaryEntryNames has
been changed with issue 59.

The new behavior is that when creating or updating an element and the spec
does not contain a value for the uniqueIdentifier or DEN, the value will be
automatically generated according to the UPCC rules.

What's the problem:

Let's look at an example: When cloning a CDT (CdtSpec.CloneCdt()), the spec
contains all of the CDT's data (including DEN and unique ID). When creating
a new CDT with this spec, it will get the same unique ID (and DEN) as the
original CDT, which is of course unacceptable.

Solution:

- Add a flag to the MetaModel for auto-generated tagged values.
- In the clone methods, do not clone auto-generated tagged values (i.e.
leave them empty in the spec).
- When updating an element, for each auto-generated tagged value:
  - Check whether it is explicitly set in the spec.
  - If not, check whether the element already has a value for the tagged value.
  - If not, auto-generate it.

Original issue reported on code.google.com by cschollum on 11 Dec 2009 at 11:21

GoogleCodeExporter commented 9 years ago
Scenario: Creating a new CDT with auto-generated unique ID and DEN

- Create a new CdtSpec.
- Do not set unique ID and DEN.
- Create the CDT.
- Assert that the unique ID is non-empty and that the DEN has been set 
according to
the UPCC rules.

Original comment by cschollum on 11 Dec 2009 at 11:23

GoogleCodeExporter commented 9 years ago
Scenario: Creating a new CDT with explicitly set unique ID and DEN

- Create a new CdtSpec.
- Set unique ID and DEN.
- Create the CDT.
- Assert that the unique ID and the DEN have the correct values.

Original comment by cschollum on 11 Dec 2009 at 11:24

GoogleCodeExporter commented 9 years ago
Scenario: Creating a new CDT by cloning another CDT

- Create a new CdtSpec by cloning a CDT.
- Set the CdtSpec.Name property to a different value.
- Create the CDT.
- Assert that
  - the unique ID is non-empty and different from the original CDT's unique ID 
  - the DEN has been set according to the UPCC rules

Original comment by cschollum on 11 Dec 2009 at 11:25

GoogleCodeExporter commented 9 years ago
Scenario: Change the name of an exsting CDT

- Create a new CdtSpec by cloning the CDT.
- Change the CdtSpec.Name property.
- Update the CDT.
- Assert that the unique ID and DEN have their original values.

Original comment by cschollum on 11 Dec 2009 at 11:26

GoogleCodeExporter commented 9 years ago
Scenario: Change the DEN of an existing CDT

- Create a new CdtSpec by cloning the CDT.
- Set CdtSpec.DictionaryEntryName to a new value.
- Update the CDT.
- Assert that the DEN has the correct value.

Original comment by cschollum on 11 Dec 2009 at 11:28

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1049.

Original comment by christia...@researchstudio.at on 11 Dec 2009 at 3:28