Wednesday, March 16, 2016

Sample code to get the user profile information in the WebCenter Portal

The sample code to get the currently logged in user profile information is as below


import oracle.webcenter.peopleconnections.profile.WCUserProfile;

String currentUserId = ADFContext.getCurrent().getSecurityContext().getUserName();
WCUserProfile currentProfile = ProfileFactory.getProfileManager().getProfile(currentUserId);
currentProfile.getDisplayName();


The complete documentation for WCUserProfile is here

Some other supported methods are as below

  1. currentProfile.getBusinessCity()
  2. currentProfile.getBusinessCountry()
  3. currentProfile.getBusinessEmail()
  4. currentProfile.getBusinessFax()
  5. currentProfile.getBusinessLocationMapURL()
  6. currentProfile.getBusinessMobile()
  7. currentProfile.getBusinessPOBox()
  8. currentProfile.getBusinessPager()
  9. currentProfile.getBusinessPhone()
  10. currentProfile.getBusinessPostalCode()
  11. currentProfile.getBusinessState()
  12. currentProfile.getBusinessStreet()
  13. currentProfile.getDateofBirth()
  14. currentProfile.getDateofHire()
  15. currentProfile.getDefaultGroup()
  16. currentProfile.getDepartment()
  17. currentProfile.getDescription()
  18. currentProfile.getDisplayName()
  19. currentProfile.getEmployeeNumber()
  20. currentProfile.getEmployeeType()
  21. currentProfile.getExpertise()
  22. currentProfile.getFirstName()
  23. currentProfile.getGuid()
  24. currentProfile.getHomeAddress()
  25. currentProfile.getHomePhone()
  26. currentProfile.getID()
  27. currentProfile.getInitials()
  28. currentProfile.getLastName()
  29. currentProfile.getLocalizedDisplayNames()
  30. currentProfile.getMaidenName()
  31. currentProfile.getManager()
  32. currentProfile.getManagerDisplayName()
  33. currentProfile.getMiddleName()
  34. currentProfile.getName()
  35. currentProfile.getNameSuffix()
  36. currentProfile.getOrganization()
  37. currentProfile.getOrganizationalUnit()
  38. currentProfile.getOriginalPhoto()
  39. currentProfile.getPersonalStatusNote()
  40. currentProfile.getPhoto(WCUserProfile.PhotoSize size)
  41. currentProfile.getPhotoUID()
  42. currentProfile.getPreferredLanguage()
  43. currentProfile.getReporteeDisplayNames()
  44. currentProfile.getReporteeList()
  45. currentProfile.getReporteeProfiles()
  46. currentProfile.getReportees()
  47. currentProfile.getTimeZone()
  48. currentProfile.getTimeZoneAsObject()
  49. currentProfile.getTitle()
  50. currentProfile.getUpdateDate()
  51. currentProfile.getUserName()
  52. currentProfile.getWirelessAcctNumber()

No comments:

Post a Comment