Package com.polarion.alm.projects.model
Interface IUser
- All Superinterfaces:
IAdaptable
,IChangeListener
,IHasCustomValues
,IHasValues
,IPObject
- All Known Subinterfaces:
ITrackerUser
The model representation of user.
- Author:
- dobisekm
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns avatar image URL, which can be either the user uploaded image or reference to external image or to default image.getEmail()
getId()
The actual ID of the user.getLabel()
Returns the name of the user, unless the name is empty or the user is unresolvable, in which case it returns the user ID.The same asgetId()
.getName()
boolean
boolean
boolean
void
Removes custom avatar.void
setAvatarFileData
(String sourceFileName, InputStream data) Sets custom avatar for the user.void
setDescription
(Text description) void
setDisabledNotifications
(boolean disabled) Disable/Enable notifications for the user.void
void
setHomePageContent
(Text value) void
setInitials
(String initials) void
Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adapt
Methods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChanged
Methods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomField
Methods inherited from interface com.polarion.platform.persistence.model.IPObject
can, copyTo, createStructureForKey, forget, getContextId, getDataRevision, getDataSvc, getEnumerationOptionForField, getEnumerationTypeForField, getFieldLabel, getFieldType, getIncompatibleCustomField, getIncompatibleCustomFieldPrototype, getIncompatibleCustomFieldsList, getLastRevision, getLocalId, getObjectId, getPrototype, getRevision, getUri, getValue, isModified, isPersisted, isReadOnly, isResolved, isUnresolvable, resolve, save, setEnumerationValue, setValue, update
-
Field Details
-
PROTO
- See Also:
-
KEY_ID
- See Also:
-
KEY_NAME
- See Also:
-
KEY_EMAIL
- See Also:
-
KEY_DESCRIPTION
- See Also:
-
KEY_INITIALS
- Since:
- 3.5.0
- See Also:
-
KEY_AVATAR_FILE_NAME
- Since:
- 3.6.0
- See Also:
-
KEY_DISABLED_NOTIFICATIONS
- Since:
- 3.6.1
- See Also:
-
KEY_HOMEPAGECONTENT
- Since:
- 3.10.1
- See Also:
-
DIFF_IGNORED_FIELDS
- Since:
- 3.6.0
-
-
Method Details
-
getId
The actual ID of the user. The same asgetLoginName()
. This method can be used even when the user is unresolvable.- See Also:
-
getLoginName
String getLoginName()The same asgetId()
. This is just a bussiness method - facade forgetId()
, there is nologinName
field.- Returns:
- the ID
-
getName
String getName() -
getLabel
Returns the name of the user, unless the name is empty or the user is unresolvable, in which case it returns the user ID.- Since:
- 3.8.2
- See Also:
-
setName
-
getEmail
String getEmail() -
setEmail
-
getDescription
Text getDescription() -
setDescription
-
getInitials
String getInitials()- Since:
- 3.5.0
-
setInitials
- Since:
- 3.5.0
-
isDisabled
boolean isDisabled() -
getAvatarURL
String getAvatarURL()Returns avatar image URL, which can be either the user uploaded image or reference to external image or to default image. The URL may be absolute, or relative to portal base URL. Does not throwUnresolvableObjectException
orPermissionDeniedException
when this user is unresolvable, not yet persisted or if current user has no read permission.- Returns:
- avatar URL, never
null
- Since:
- 3.6.0
-
setAvatarFileData
Sets custom avatar for the user. CallsIPObject.save()
internally.- Parameters:
sourceFileName
- name of the file with avatardata
- avatar data stream- Since:
- 3.6.0
-
hasAvatarFile
boolean hasAvatarFile()- Returns:
- true if user has custom avatar
- Since:
- 3.6.0
-
removeAvatarFile
void removeAvatarFile()Removes custom avatar. CallsIPObject.save()
internally.- Since:
- 3.6.0
-
getAvatarFileData
InputStream getAvatarFileData()- Returns:
- avatar data stream, or
null
if the user does not have custom avatar - Since:
- 3.6.0
-
hasDisabledNotifications
boolean hasDisabledNotifications()- Returns:
- true if user has disabled notifications
- Since:
- 3.6.1
-
setDisabledNotifications
void setDisabledNotifications(boolean disabled) Disable/Enable notifications for the user.- Parameters:
disabled
-- Since:
- 3.6.1
-
getHomePageContent
- Since:
- 3.10.1
-
setHomePageContent
- Since:
- 3.10.1
-