Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Change delimiter for multivalued attributes returned by WS?

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Change delimiter for multivalued attributes returned by WS?


Chronological Thread 
  • From: Baron Fujimoto <>
  • To: Grouper Users <>
  • Subject: [grouper-users] Change delimiter for multivalued attributes returned by WS?
  • Date: Tue, 6 Sep 2022 10:26:02 -1000

We've finally had a chance to circle back to our attempts to have the WS return all the values for multivalued attributes. With the advice provided previously, we were able to achieve this. For example, for an attribute "uhOrgAffiliation" we included the following in our sources.xml:

    <init-param>
        <param-name>subjectVirtualAttribute_0_uhOrgAffiliation</param-name>
            <param-value>
                ${subject.getAttributeValueOrCommaSeparated('uhOrgAffiliation')?:""}
        </param-value>
    </init-param>

This results in a comma-separated set of values for the attribute. However, this particular attribute's values themselves contain commas, so this makes the returned set of values more difficult to parse for each constituent value. E.g., for a set of source attribute values like:

uhOrgAffiliation: eduPersonOrgDN=kcc,eduPersonAffiliation=staff
uhOrgAffiliation: eduPersonOrgDN=lcc,eduPersonAffiliation=faculty
uhOrgAffiliation: eduPersonOrgDN=uhsystem,eduPersonAffiliation=staff

It returns:

eduPersonOrgDN=lcc,eduPersonAffiliation=faculty, eduPersonOrgDN=uhsystem,eduPersonAffiliation=staff, eduPersonOrgDN=kcc,eduPersonAffiliation=staff

(line wrapping may break that up, but each value is separated by a comma-space ", " – but I don't think we can rely on comma-space as a delimiter, because it's possible that some values may have their own comma-spaces)

Is there a way for us to change the delimiter for the returned values from a comma to, say, a colon ":"? I.e. so we wind up with something like this instead:

eduPersonOrgDN=lcc,eduPersonAffiliation=faculty:eduPersonOrgDN=uhsystem,eduPersonAffiliation=staff:eduPersonOrgDN=kcc,eduPersonAffiliation=staff

We are currently running Grouper 2.2.2
--
Baron Fujimoto <> ::: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum descendus pantorum



Archive powered by MHonArc 2.6.24.

Top of Page