com.atlassian.crowd.util
Class SOAPPrincipalHelper

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

public class SOAPPrincipalHelper
extends java.lang.Object

A helper to retrieve attributes from SOAPPrincipal


Constructor Summary
SOAPPrincipalHelper()
           
 
Method Summary
 SOAPAttribute getAttribute(java.lang.String name, SOAPPrincipal principal)
          Retrieves the SOAPAttribute belonging to the user
 java.lang.String getEmail(SOAPPrincipal principal)
          Retrieves the email address from the specified user
 java.lang.String getFirstAttributeValue(java.lang.String name, SOAPPrincipal principal)
          Retrieves the first attribute from the specified SOAPAttribute belonging to the user
 java.lang.String getFirstName(SOAPPrincipal principal)
          Retrieves the first name from the specified user
 java.lang.String getFullName(SOAPPrincipal principal)
          Retrieves the full name from the specified user
 java.lang.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 java.lang.String getFirstName(SOAPPrincipal principal)
Retrieves the first name from the specified user

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

getLastName

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

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

getEmail

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

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

getFullName

public java.lang.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 java.lang.String getFirstAttributeValue(java.lang.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(java.lang.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 © 2011 Atlassian. All Rights Reserved.