[JIRA] (MDA-241) Add individual String validator classes

Ian Young (Jira) jira at shibboleth.atlassian.net
Tue Oct 18 10:02:50 UTC 2022


Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) *commented* on MDA-241 ( https://shibboleth.atlassian.net/browse/MDA-241?atlOrigin=eyJpIjoiMWNhMTdjZTg2NmI3NDQyYTliOTAyNjlkMjk1NzBjYjYiLCJwIjoiaiJ9 )

Re: Add individual String validator classes ( https://shibboleth.atlassian.net/browse/MDA-241?atlOrigin=eyJpIjoiMWNhMTdjZTg2NmI3NDQyYTliOTAyNjlkMjk1NzBjYjYiLCJwIjoiaiJ9 )

This should appear like the StringElementValidationStage but with a single (nominal) additional property to specify the set of attributes to be tested. In practice, that probably needs one getter but four setters:

* Collection<QName> is the canonical form
* QName for the common case of a single attribute
* Collection<String> for the almost universal case of a set of attributes without namespaces
* String for the common case of a single attribute

Internally, this is probably an unmodifiable private final Collection<QName>.

The DOM traversal would be the same as for StringElementValidationStage , which is to say visiting each element named by the elements collection, then working through all of the attributes on visited elements and processing each one which matches any of the indicated attributes.

It might be possible to write this most simply as a subclass of AbstractElementValidationStage which doesn’t initially convert the values to strings but instead passes them as Element}}s. It may be worth having an intermediate {{AbstractAttributeValidationStage in that hierarchy.

It’s probably not worth dividing the hierarchy further up, as it would lead to an awful lot of duplication.

( https://shibboleth.atlassian.net/browse/MDA-241#add-comment?atlOrigin=eyJpIjoiMWNhMTdjZTg2NmI3NDQyYTliOTAyNjlkMjk1NzBjYjYiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/MDA-241#add-comment?atlOrigin=eyJpIjoiMWNhMTdjZTg2NmI3NDQyYTliOTAyNjlkMjk1NzBjYjYiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:597f6a7 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20221018/579afcb8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-2a92f077-5f2d-4d56-b308-640e5a4331ea
Type: image/png
Size: 341 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221018/579afcb8/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-52150c87-1d92-410e-b239-bd975905e3f0
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221018/579afcb8/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-4bbc23cf-5f44-4f69-be0b-e0740be9efb6
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221018/579afcb8/attachment-0005.png>


More information about the commits mailing list