com.atlassian.crowd.util
Class SOAPPrincipalHelper

java.lang.Object
  extended by com.atlassian.crowd.util.SOAPPrincipalHelper

public class SOAPPrincipalHelper
extends Object

A helper to retrieve attributes from SOAPPrincipal


Constructor Summary
SOAPPrincipalHelper()
           
 
Method Summary
 SOAPAttribute getAttribute(String name, SOAPPrincipal principal)
          Retrieves the SOAPAttribute belonging to the user
 String getEmail(SOAPPrincipal principal)
          Retrieves the email address from the specified user
 String getFirstAttributeValue(String name, SOAPPrincipal principal)
          Retrieves the first attribute from the specified SOAPAttribute belonging to the user
 String getFirstName(SOAPPrincipal principal)
          Retrieves the first name from the specified user
 String getFullName(SOAPPrincipal principal)
          Retrieves the full name from the specified user
 String getLastName(SOAPPrincipal principal)
          Retrieves the last name from the specified user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPPrincipalHelper

public SOAPPrincipalHelper()
Method Detail

getFirstName

public String getFirstName(SOAPPrincipal principal)
Retrieves the first name from the specified user

Parameters:
principal - SOAPPrincipal
Returns:
the user's first name

getLastName

public String getLastName(SOAPPrincipal principal)
Retrieves the last name from the specified user

Parameters:
principal - SOAPPrincipal
Returns:
the user's last name

getEmail

public String getEmail(SOAPPrincipal principal)
Retrieves the email address from the specified user

Parameters:
principal - SOAPPrincipal
Returns:
the user's email address

getFullName

public String getFullName(SOAPPrincipal principal)
Retrieves the full name from the specified user

Parameters:
principal - SOAPPrincipal
Returns:
the user's full name (display naame)

getFirstAttributeValue

public String getFirstAttributeValue(String name,
                                     SOAPPrincipal principal)
Retrieves the first attribute from the specified SOAPAttribute belonging to the user

Parameters:
name - the name of the SOAPAttribute
principal - SOAPPrincipal
Returns:
the first value of the specified SOAPAttribute. null if SOAPAttribute does not exist or does not contain any values

getAttribute

public SOAPAttribute getAttribute(String name,
                                  SOAPPrincipal principal)
Retrieves the SOAPAttribute belonging to the user

Parameters:
name - name of the SOAPAttribute
principal - SOAPPrincipal
Returns:
the SOAPAttribute belonging to the principal. null if no attribute is found


Copyright © 2013 Atlassian. All Rights Reserved.