Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Retrieving attributes for a custom Crowd directory

David Clegg July 10, 2013

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?

1 answer

1 accepted

0 votes
Answer accepted
David Clegg July 11, 2013

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());
  }
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events