Package com.atlassian.confluence.user
Class PersonalInformation
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- All Implemented Interfaces:
Searchable,Content,Addressable,ContentTypeAware,HasLinkWikiMarkup,Versioned,RelatableEntity,EditableLabelable,Labelable,Serializable,Cloneable,Comparable<ContentEntityObject>
public class PersonalInformation extends ContentEntityObject implements HasLinkWikiMarkup
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPE-
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCE
-
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
-
-
Constructor Summary
Constructors Constructor Description PersonalInformation()PersonalInformation(ConfluenceUser user, String personalInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanbelongsTo(com.atlassian.user.User user)Returns true if this object belongs to the specified user.booleanequals(Object o)StringgetAttachmentUrlPath(Attachment attachment)Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments).List<BodyContent>getBodyContents()BodyTypegetDefaultBodyType()StringgetDisplayTitle()Returns the display title.StringgetEmail()Deprecated.Since 5.5.StringgetFullName()Deprecated.Since 5.5.StringgetHasPersonalSpace()StringgetLinkWikiMarkup()StringgetNameForComparison()Subclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.StringgetType()An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.StringgetUrlPath()ConfluenceUsergetUser()StringgetUsername()Deprecated.Since 5.5.inthashCode()voidsetUser(ConfluenceUser user)StringtoString()Override this method so we don't call getFullName() everytime toString is called on the object!-
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, applyChildVersioningPolicy, applyChildVersioningPolicy, clone, compareTo, convertToHistoricalVersion, ensureAttachmentBelongsToContent, getAttachmentManager, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getCollaborativeEditingUuid, getComments, getContainerContent, getContentId, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getCustomContent, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getRenderedVersionComment, getSearchableDependants, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrashDate, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isIndexable, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setTitle, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, trash, trash, trashDependents, wasCreatedBy
-
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellings
-
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getConfluenceRevision, getLatestVersion, getVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersion
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
-
Methods inherited from class com.atlassian.core.bean.EntityObject
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
-
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
-
Methods inherited from interface com.atlassian.bonnie.Searchable
getId
-
-
-
-
Field Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PersonalInformation
public PersonalInformation()
-
PersonalInformation
public PersonalInformation(ConfluenceUser user, String personalInformation)
- Since:
- 5.2
-
-
Method Detail
-
toString
public String toString()
Override this method so we don't call getFullName() everytime toString is called on the object!- Overrides:
toStringin classContentEntityObject- Returns:
- a string representation of this personal information object
-
getDisplayTitle
public String getDisplayTitle()
Description copied from class:ContentEntityObjectReturns the display title. Some entities don't have titles for identification. For example, personal information objects use the user's fullname. Override this method to provide a custom title.- Specified by:
getDisplayTitlein interfaceAddressable- Overrides:
getDisplayTitlein classContentEntityObject- Returns:
- the display title
-
getUrlPath
public String getUrlPath()
- Specified by:
getUrlPathin interfaceAddressable- Specified by:
getUrlPathin classContentEntityObject
-
getAttachmentUrlPath
public String getAttachmentUrlPath(Attachment attachment)
Description copied from class:ContentEntityObjectGets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments). Generally you will want to callAttachment.getUrlPath()instead of this method: if we ever implement view pages for individual attachments, that's the method that will be changed to point to them.The default implementation just returns the view page for this content.
- Overrides:
getAttachmentUrlPathin classContentEntityObject- Parameters:
attachment- one of this content's attachments- Returns:
- the path relative to the base url to view the attachment in the context of this content.
-
getUsername
@Deprecated public String getUsername()
Deprecated.Since 5.5. UsegetUser()
-
getUser
public ConfluenceUser getUser()
- Since:
- 5.2
-
setUser
public void setUser(ConfluenceUser user)
- Parameters:
user- this personal information applies to- Since:
- 5.2
-
getDefaultBodyType
public BodyType getDefaultBodyType()
- Overrides:
getDefaultBodyTypein classContentEntityObject
-
getBodyContents
public List<BodyContent> getBodyContents()
- Overrides:
getBodyContentsin classContentEntityObject
-
belongsTo
public boolean belongsTo(com.atlassian.user.User user)
Returns true if this object belongs to the specified user.- Parameters:
user- the user to check- Returns:
- true if the user owns this object, otherwise false
- Since:
- 2.8
-
getFullName
@Deprecated public String getFullName()
Deprecated.Since 5.5. UsegetUser()
-
getEmail
@Deprecated public String getEmail()
Deprecated.Since 5.5. UsegetUser()
-
getType
public String getType()
Description copied from class:ContentEntityObjectAn easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.This is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
- Specified by:
getTypein interfaceContentTypeAware- Specified by:
getTypein classContentEntityObject- Returns:
- the content type
-
hashCode
public int hashCode()
- Overrides:
hashCodein classContentEntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classContentEntityObject
-
getNameForComparison
public String getNameForComparison()
Description copied from class:ContentEntityObjectSubclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.- Specified by:
getNameForComparisonin classContentEntityObject
-
getHasPersonalSpace
public String getHasPersonalSpace()
-
getLinkWikiMarkup
public String getLinkWikiMarkup()
- Specified by:
getLinkWikiMarkupin interfaceHasLinkWikiMarkup- Returns:
- the wiki markup used to link to this content
-
-