Does anyone have an example of how to retrieve the values in code for the attributes specified on the Attributes tab when configuring a custom Crowd Directory?
Any attributes specified here are passed to your custom directory implementation via the RemoteDirectory.setAttributes method. So you can use the following to store the attributes, so you can fetch them later:-
private HashMap<String,String> attributes = new HashMap<String, String>(); @Override public void setAttributes(Map<String, String> attrs) { for (Map.Entry<String, String> entry : attrs.entrySet()) { attributes.put(entry.getKey(), entry.getValue()); } }
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.