Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: 1.1-beta-1
    • Fix versions: None
    • Components: None
    • Labels:
      None
    • Sprint:

      Description

      The use of AssertionDescriptor is inconsistent, and does not fit cleanly into the framework API:

      1. The AssertionDescriptor constructor sets the archetype id to be new ArchetypeId("descriptor.assertion.1.0")
      however when creating an instance of an assertion, this is overridden. E.g, given:
      AssertionDescriptor assertion = (AssertionDescriptor) service.create("assertion.regularExpression");

      The returned archetype id is "assertion.regularExpression".

      2. Requires special case handling. E.g, see DescriptorHelper.getArchetypeDescriptor():
      //TODO This is a work around until we resolve the current
      // problem with archetyping and archetype.
      if (object instanceof AssertionDescriptor)

      { AssertionTypeDescriptor atDesc = service.getAssertionTypeDescriptor( object.getName()); archId = new ArchetypeId(atDesc.getPropertyArchetype()); }

      descriptor = service.getArchetypeDescriptor(archId);
      if (descriptor == null)

      { descriptor = getArchetypeDescriptor( object.getArchetypeId().getShortName()); }

      3. AssertionTypeDescriptor must be handled differently to other IMObjects.
      These must be loaded separately, via an assertionTypes.xml file

      Both AssertionDescriptor and AssertionTypeDescriptor should be like any other IMObject.
      The following changes should be made:

      1. AssertionDescriptor should explicitly reference an AssertionTypeDescriptor.
      Currently, the getType() method returns a String representing the AssertionTypeDescriptor's name.
      This is passed to the IArchetypeService.getAssertionTypeDescriptor() method
      The getType() method should return the AssertionTypeDescriptor directly.

      2. AssertionDescriptor.getArchetypeId() should always return the actual archetype id, not descriptor.assertion.1.0

      3. assertionTypes.xml should be removed

      4. Update database schema, and provide migration strategy

        Attachments

          Activity

            People

            • Assignee:
              tanderson Tim Anderson
              Reporter:
              tanderson Tim Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                  Who's Looking?