Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Accessing Attributes of People in SSP-Open-Source-Project

Person attributes are available through the PersonAttributesService, which is a Spring managed bean that may be injected into classes that need it.

@Autowired Example
@Autowired
private PersonAttributesService personAttributeService;

The PersonAttributesService currently has one method -- getAttributes -- with the following signature (we can add a method that fetches attributes for multiple people at once if needed):

Method Signature of getAttributes
Map<String,List<String>> getAttributes(HttpServletRequest req, HttpServletResponse res, String username) throws ObjectNotFoundException;

Use the PersonAttributesService bean as in the following example:

Usage Example
Map<String,List<String>> attr = personAttributeService.getAttributes(req, res, "admin");
String mail = attr.get("mail").get(0);

Configuring Attributes in SSP-Platform

The person attributes available to SSP as a whole can be defined, configured, and aggregated in the personDirectoryContext.xml file within SSP-Platform.  (Location:  SSP-Platform/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml).  SSP uses the Jasig Person Directory project for attributes.  Configuration instructions can be found in the Person Directory Manual.

  • No labels