[ http://issues.apache.org/jira/browse/WSCOMMONS-17?page=all ]
Brian Hulse updated WSCOMMONS-17:
---------------------------------
Attachment: patch.zip
I've worked it as a method on the Policy, so if this doesn't suit, it'll have
to be reworked.
> Utilities do not allow for multiple choice navigation, an iterator would be
> useful.
> -----------------------------------------------------------------------------------
>
> Key: WSCOMMONS-17
> URL: http://issues.apache.org/jira/browse/WSCOMMONS-17
> Project: WS-Commons
> Type: Improvement
> Components: Policy
> Reporter: Brian Hulse
> Priority: Minor
> Attachments: patch.zip
>
> If a Policy has a number of Alternatives, you can only get the first one
> easily using getPrimTermsList(). It's still possible to get the other
> Alternatives, but the user would have to go tracking through the tree
> structure, which isn't very usable. What I'm suggesting is an Iterator which
> just presents the Alternatives in the Policy. There are a couple of ways of
> doing this, first would be to have this as a static utility, but the second
> seems neater and that is to have an iterator() method on Policy itself which
> would return an Iterator object. So the user code would look like ...
> Iterator it = pol.iterator();
> while (it.hasNext()) {
> List alternative = (List) it.next();
> // Now go and check whether the alternative can be supported and
> suits ...
> }
> As previously stated, this is one of the changes that I'd like to see since
> they're used heavily is the test bucket we have.
> Comments?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira