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()); } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.