Class Profile
- java.lang.Object
-
- org.exoplatform.social.core.identity.model.Profile
-
public class Profile extends Object
The Class Profile.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProfile.AttachedActivityTypestatic classProfile.UpdateTypeTypes of updating of profile.
-
Field Summary
Fields Modifier and Type Field Description static StringABOUT_MEAbout me key.static StringAVATARproperty of typeAvatarAttachmentthat contains the avatarstatic StringBANNERstatic StringCITYCITY.static StringCOMPANYCOMPANY.static StringCONTACT_IMSIMS key.static StringCONTACT_PHONESPHONES key.static StringCONTACT_URLSURLS key.static StringCOUNTRYCOUNTRY.static StringDELETEDprofile of a deleted userstatic StringDEPARTMENTDEPARTMENT.static StringEMAILemail key.static StringENROLLMENT_DATEENROLLMENT DATE.static StringEXPERIENCESEXPERIENCE.static StringEXPERIENCES_COMPANYCOMPANY.static StringEXPERIENCES_DESCRIPTIONDESCRIPTION OF EXPERIENCE.static StringEXPERIENCES_END_DATEEND DATE OF EXPERIENCE.static StringEXPERIENCES_IDID.static StringEXPERIENCES_IS_CURRENTCURRENT OR PAST EXPERIENCE.static StringEXPERIENCES_POSITIONPOSITION.static StringEXPERIENCES_SKILLSPOSITION.static StringEXPERIENCES_START_DATESTART DATE OF EXPERIENCE.static StringEXTERNALEXTERNAL.static StringFEMALEstatic StringFIRST_NAMEfirstname key.static StringFULL_NAMElastname key.static StringGENDERgender key.static StringLAST_LOGIN_TIMELAST LOGIN TIME.static StringLAST_NAMElastname key.static StringLOCATIONLOCATION.static StringMALEstatic StringPOSITIONPOSITION.static StringPROFESSIONPROFESSION.static StringRESIZED_SUBFIXResized subfixstatic StringSYNCHRONIZED_DATESYNCHRONIZED DATE.static StringTEAMTEAM.static StringTIME_ZONETimeZone key.static StringTIME_ZONE_DST_SAVINGSTimeZone DayLight savings key.static StringURLDeprecated.static StringURL_POSTFIXurl postfixstatic StringUSERNAMEusername key.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddOrModifyProperties(Map<String,Object> props)Add or modify properties of the profilevoidclearHasChanged()Clear the has changed flag.booleancontains(String name)Contains.StringgetAboutMe()Profile.AttachedActivityTypegetAttachedActivityType()StringgetAvatarImageSource()Deprecated.usegetAvatarUrl().LonggetAvatarLastUpdated()Gets the last updated time in milliseconds of avatar in a profileStringgetAvatarUrl()Gets avatar urlLonggetBannerLastUpdated()StringgetBannerUrl()Gets avatar urlStringgetCity()StringgetCompany()StringgetCountry()longgetCreatedTime()StringgetDepartment()StringgetEmail()Gets email address of this profile.StringgetFullName()Gets the full name.StringgetGender()Gets genderStringgetId()Gets the id.IdentitygetIdentity()Gets the identity.longgetLastLoaded()Gets the last loaded time.List<Profile.UpdateType>getListUpdateTypes()StringgetLocation()List<Map<String,String>>getPhones()Gets PhonesStringgetPosition()Gets positionStringgetProfession()Map<String,Object>getProperties()Gets the properties.ObjectgetProperty(String name)Gets the property.ObjectgetPropertyValue(String name)Deprecated.usegetProperty(String).StringgetSynchronizedDate()Get this profile synchronized dateStringgetTeam()StringgetTimeZone()IntegergetTimeZoneDSTSavings()Profile.UpdateTypegetUpdateType()Gets type of update.StringgetUrl()Get this profile URLBooleanhasAvatar()booleanhasChanged()Indicates whether or not the profile has been modified locally.voidremoveProperty(String name)Removes the property.voidsetAboutMe(String aboutMe)voidsetAttachedActivityType(Profile.AttachedActivityType attachedActivityType)voidsetAvatarLastUpdated(Long avatarLastUpdated)Sets the last updated time in milliseconds of avatar in a profilevoidsetAvatarUrl(String avatarUrl)Sets avatar urlvoidsetBannerLastUpdated(Long bannerLastUpdated)voidsetBannerUrl(String bannerUrl)Sets avatar urlvoidsetCreatedTime(Long createdTime)voidsetId(String id)Sets the id.voidsetIdentity(Identity identity)Sets the identity.voidsetLastLoaded(long lastLoaded)Sets the last loaded time.voidsetListUpdateTypes(List<Profile.UpdateType> listUpdateTypes)voidsetProperty(String name, Object value)Sets the property.voidsetSynchronizedDate(String synchronizedDate)Set this profile synchronized datevoidsetTimeZone(String timeZone)voidsetTimeZoneDSTSavings(Object timeZoneDayLightSaving)protected voidsetUpdateType(String updateType)Sets type of update.voidsetUrl(String url)Set this profile URLStringtoString()
-
-
-
Field Detail
-
GENDER
public static final String GENDER
gender key.- See Also:
- Constant Field Values
-
MALE
public static final String MALE
- See Also:
- Constant Field Values
-
FEMALE
public static final String FEMALE
- See Also:
- Constant Field Values
-
USERNAME
public static final String USERNAME
username key.- See Also:
- Constant Field Values
-
FIRST_NAME
public static final String FIRST_NAME
firstname key.- See Also:
- Constant Field Values
-
LAST_NAME
public static final String LAST_NAME
lastname key.- See Also:
- Constant Field Values
-
FULL_NAME
public static final String FULL_NAME
lastname key.- See Also:
- Constant Field Values
-
EMAIL
public static final String EMAIL
email key.- See Also:
- Constant Field Values
-
ABOUT_ME
public static final String ABOUT_ME
About me key.- See Also:
- Constant Field Values
-
TIME_ZONE
public static final String TIME_ZONE
TimeZone key.- See Also:
- Constant Field Values
-
TIME_ZONE_DST_SAVINGS
public static final String TIME_ZONE_DST_SAVINGS
TimeZone DayLight savings key.- See Also:
- Constant Field Values
-
DELETED
public static final String DELETED
profile of a deleted user- See Also:
- Constant Field Values
-
AVATAR
public static final String AVATAR
property of typeAvatarAttachmentthat contains the avatar- See Also:
- Constant Field Values
-
BANNER
public static final String BANNER
- See Also:
- Constant Field Values
-
EXPERIENCES
public static final String EXPERIENCES
EXPERIENCE.- See Also:
- Constant Field Values
-
EXPERIENCES_ID
public static final String EXPERIENCES_ID
ID.- See Also:
- Constant Field Values
-
EXPERIENCES_COMPANY
public static final String EXPERIENCES_COMPANY
COMPANY.- See Also:
- Constant Field Values
-
EXPERIENCES_POSITION
public static final String EXPERIENCES_POSITION
POSITION.- See Also:
- Constant Field Values
-
EXPERIENCES_SKILLS
public static final String EXPERIENCES_SKILLS
POSITION.- See Also:
- Constant Field Values
-
EXPERIENCES_START_DATE
public static final String EXPERIENCES_START_DATE
START DATE OF EXPERIENCE.- See Also:
- Constant Field Values
-
EXPERIENCES_END_DATE
public static final String EXPERIENCES_END_DATE
END DATE OF EXPERIENCE.- See Also:
- Constant Field Values
-
EXPERIENCES_IS_CURRENT
public static final String EXPERIENCES_IS_CURRENT
CURRENT OR PAST EXPERIENCE.- See Also:
- Constant Field Values
-
EXPERIENCES_DESCRIPTION
public static final String EXPERIENCES_DESCRIPTION
DESCRIPTION OF EXPERIENCE.- See Also:
- Constant Field Values
-
POSITION
public static final String POSITION
POSITION.- See Also:
- Constant Field Values
-
COMPANY
public static final String COMPANY
COMPANY.- See Also:
- Constant Field Values
-
LOCATION
public static final String LOCATION
LOCATION.- See Also:
- Constant Field Values
-
DEPARTMENT
public static final String DEPARTMENT
DEPARTMENT.- See Also:
- Constant Field Values
-
TEAM
public static final String TEAM
TEAM.- See Also:
- Constant Field Values
-
PROFESSION
public static final String PROFESSION
PROFESSION.- See Also:
- Constant Field Values
-
COUNTRY
public static final String COUNTRY
COUNTRY.- See Also:
- Constant Field Values
-
CITY
public static final String CITY
CITY.- See Also:
- Constant Field Values
-
EXTERNAL
public static final String EXTERNAL
EXTERNAL.- See Also:
- Constant Field Values
-
ENROLLMENT_DATE
public static final String ENROLLMENT_DATE
ENROLLMENT DATE.- See Also:
- Constant Field Values
-
SYNCHRONIZED_DATE
public static final String SYNCHRONIZED_DATE
SYNCHRONIZED DATE.- See Also:
- Constant Field Values
-
LAST_LOGIN_TIME
public static final String LAST_LOGIN_TIME
LAST LOGIN TIME.- See Also:
- Constant Field Values
-
URL
@Deprecated public static final String URL
Deprecated.An optional url for this profile- See Also:
- Constant Field Values
-
CONTACT_PHONES
public static final String CONTACT_PHONES
PHONES key.- See Also:
- Constant Field Values
-
CONTACT_IMS
public static final String CONTACT_IMS
IMS key.- See Also:
- Constant Field Values
-
CONTACT_URLS
public static final String CONTACT_URLS
URLS key.- See Also:
- Constant Field Values
-
URL_POSTFIX
public static final String URL_POSTFIX
url postfix- See Also:
- Constant Field Values
-
RESIZED_SUBFIX
public static final String RESIZED_SUBFIX
Resized subfix- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Profile
public Profile()
-
Profile
public Profile(Identity identity)
Instantiates a new profile.- Parameters:
identity- the identity
-
-
Method Detail
-
getIdentity
public final Identity getIdentity()
Gets the identity.- Returns:
- the identity
-
setIdentity
public final void setIdentity(Identity identity)
Sets the identity.- Parameters:
identity- the identity
-
getId
public final String getId()
Gets the id.- Returns:
- the id
-
setId
public final void setId(String id)
Sets the id.- Parameters:
id- the new id
-
getLastLoaded
public final long getLastLoaded()
Gets the last loaded time.- Returns:
- the last loaded time
-
setLastLoaded
public final void setLastLoaded(long lastLoaded)
Sets the last loaded time.- Parameters:
lastLoaded- the new last loaded time
-
hasChanged
public final boolean hasChanged()
Indicates whether or not the profile has been modified locally.- Returns:
trueif it has been modified locally,falseotherwise.
-
clearHasChanged
public final void clearHasChanged()
Clear the has changed flag.
-
getUpdateType
public Profile.UpdateType getUpdateType()
Gets type of update.- Returns:
- the updated type for a profile
- Since:
- 1.2.0-GA
-
getAttachedActivityType
public Profile.AttachedActivityType getAttachedActivityType()
-
setAttachedActivityType
public void setAttachedActivityType(Profile.AttachedActivityType attachedActivityType)
-
setUpdateType
protected void setUpdateType(String updateType)
Sets type of update.- Parameters:
updateType-- Since:
- 1.2.0-GA
-
getProperty
public final Object getProperty(String name)
Gets the property.- Parameters:
name- the name- Returns:
- the property
-
setProperty
public final void setProperty(String name, Object value)
Sets the property.- Parameters:
name- the namevalue- the value
-
contains
public final boolean contains(String name)
Contains.- Parameters:
name- the name- Returns:
- true, if successful
-
getProperties
public final Map<String,Object> getProperties()
Gets the properties.- Returns:
- the properties
-
removeProperty
public final void removeProperty(String name)
Removes the property.- Parameters:
name- the name
-
getPropertyValue
public final Object getPropertyValue(String name)
Deprecated.usegetProperty(String). Will be removed at 1.3.xGets the property value.- Parameters:
name- the name- Returns:
- the property value
-
getFullName
public final String getFullName()
Gets the full name.- Returns:
- the full name
-
getSynchronizedDate
public String getSynchronizedDate()
Get this profile synchronized date- Returns:
- this profile synchronized date
-
setSynchronizedDate
public void setSynchronizedDate(String synchronizedDate)
Set this profile synchronized date
-
getUrl
public final String getUrl()
Get this profile URL- Returns:
- this profile URL
-
setUrl
public void setUrl(String url)
Set this profile URL
-
getEmail
public final String getEmail()
Gets email address of this profile.- Returns:
- email in String format
-
addOrModifyProperties
public final void addOrModifyProperties(Map<String,Object> props)
Add or modify properties of the profile- Parameters:
props-
-
getAvatarImageSource
@Deprecated public final String getAvatarImageSource()
Deprecated.usegetAvatarUrl(). Will be removed at 1.3.xGets avatar url- Returns:
- avatar image source
-
getAvatarUrl
public final String getAvatarUrl()
Gets avatar url- Returns:
- avatar image source
- Since:
- 1.2.0-GA
-
setAvatarUrl
public void setAvatarUrl(String avatarUrl)
Sets avatar url- Since:
- 1.2.0-GA
-
getBannerUrl
public final String getBannerUrl()
Gets avatar url- Returns:
- avatar image source
- Since:
- 1.2.0-GA
-
setBannerUrl
public void setBannerUrl(String bannerUrl)
Sets avatar url- Since:
- 1.2.0-GA
-
getPosition
public final String getPosition()
Gets position- Returns:
- position
- Since:
- 1.2.0-GA
-
getCompany
public final String getCompany()
-
getLocation
public final String getLocation()
-
getDepartment
public final String getDepartment()
-
getTeam
public final String getTeam()
-
getProfession
public final String getProfession()
-
getCountry
public final String getCountry()
-
getCity
public final String getCity()
-
getAboutMe
public String getAboutMe()
-
setAboutMe
public void setAboutMe(String aboutMe)
-
getTimeZone
public String getTimeZone()
-
setTimeZone
public void setTimeZone(String timeZone)
-
getTimeZoneDSTSavings
public Integer getTimeZoneDSTSavings()
-
setTimeZoneDSTSavings
public void setTimeZoneDSTSavings(Object timeZoneDayLightSaving)
-
getGender
public final String getGender()
Gets gender- Returns:
- gender of user
- Since:
- 4.0.0.Alpha1
-
getPhones
public final List<Map<String,String>> getPhones()
Gets Phones- Returns:
- list of user's number phone
- Since:
- 4.0.0.Alpha1
-
getCreatedTime
public long getCreatedTime()
-
setCreatedTime
public void setCreatedTime(Long createdTime)
-
getListUpdateTypes
public List<Profile.UpdateType> getListUpdateTypes()
-
setListUpdateTypes
public void setListUpdateTypes(List<Profile.UpdateType> listUpdateTypes)
-
getAvatarLastUpdated
public Long getAvatarLastUpdated()
Gets the last updated time in milliseconds of avatar in a profile- Returns:
Void
-
setAvatarLastUpdated
public void setAvatarLastUpdated(Long avatarLastUpdated)
Sets the last updated time in milliseconds of avatar in a profile- Parameters:
avatarLastUpdated-
-
getBannerLastUpdated
public Long getBannerLastUpdated()
-
setBannerLastUpdated
public void setBannerLastUpdated(Long bannerLastUpdated)
-
hasAvatar
public Boolean hasAvatar()
-
-