First of all there seems to be an issue and missing documentation of the PortletRequest.P3PUserInfos enum.
Aside from similar observations for containers like Liferay this was discussed and answered for WebSphere Portal in late 2008
IBM support engineer Jim Barnes replied:
>I talked with dev on this and it seems this is a errata in the spec and the toString must be called, and this will be pushed in the next >errata for the spec
Specifying and documenting this properly is the minimum requirement I'd see we should cover in this JSR.
Beside I'd like to raise the question, to what extent the enum attributes are still relevant.
Fields like: USER_HOMEINFO_TELECOM_PAGER_NUMBER
while other obvious ones like
USER_HOMEINFO_ONLINE_TWITTER (or _FACEBOOK, etc.) are clearly missing in today's world.
The EG of JSR-351, Identity Management for Java discussed similar challenges, including the problem of enums and their limited extensibility as well as an often changing set of Identity Attributes that this enum and the Portlet 2.0 spec hoped to cover somehow.
I may propose synergies with JSR-351 in the "extensions" component, but wanted to mention it here, too. Potentially an area where 351 could help, but at the very least the enum vs. toString() problem should be resolved and the enum better documented. Where appropriate some attributes may be added others at least deprecated.