We're updating the issue view to help you get more done. 

Support multiple AttributeValues

Description

Currently only AttributeValues with one value are supported.
To handle multiple AttributeValues the following changes have to be done:

The convert(...) method of the DataTypeAttributes must take the AttributeValue itself and not a string anymore:

01.10.2012:
Florian and René have discussed the necessary changes. These are listed below:

  • The interface DataTypeAttribute<E> must be changed at convert-Method from:

    1 E convertTo(String jaxbRepresentation) throws SyntaxException;

    to:

    1 2 // the parameter will be the marshalled XML content: JaxbElement (for complex xml types)and string (for simple xml types) E convertTo(List<?> jaxbRepresentation) throws SyntaxException;
  • All implementations of the interface have to be adjusted, so that they accordingly convert the 'List<?> jaxbRepresentation'. These are 16 implementations.

  • The AttributeDesignatorType must be refactored at addAndConvertAttrValue. Remove the 'get(0)' and the cast.

    1 2 3 4 5 try { returnValues.add(dataType.convertTo((String) attrVal.getContent().get(0))); } catch (ClassCastException e) { throw new SyntaxException(e); }

    The same has to be done at AttributeValueType.handle(...) and TargetMatcherImpl.match(...)

  • A howto should be written for the handling of custom "complex datatypes"

  • All according Unit tests need to be refactored. Integration Tests should be written that prove the exact behaviour

Environment

None

Status

Assignee

Florian Huonder

Reporter

Florian Huonder

Labels

None

Time tracking

16h

Components

Fix versions

Priority

Major