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

Retrieving attributes for a custom Crowd directory

David Clegg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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