com.atlassian.confluence.user
Class PersonalInformation

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.core.ConfluenceEntityObject
          extended by com.atlassian.confluence.core.AbstractVersionedEntityObject
              extended by com.atlassian.confluence.core.AbstractLabelableEntityObject
                  extended by com.atlassian.confluence.core.ContentEntityObject
                      extended by com.atlassian.confluence.user.PersonalInformation
All Implemented Interfaces:
com.atlassian.bonnie.Searchable, Content, Addressable, ContentTypeAware, HasLinkWikiMarkup, Versioned, EditableLabelable, Labelable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class PersonalInformation
extends ContentEntityObject
implements HasLinkWikiMarkup

See Also:
Serialized Form

Field Summary
static java.lang.String CONTENT_TYPE
           
 
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
CREATED, CURRENT, DELETED, MODIFIED
 
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
 
Constructor Summary
PersonalInformation()
           
PersonalInformation(ConfluenceUser user, java.lang.String personalInformation)
           
PersonalInformation(com.atlassian.user.User user, UserAccessor userAccessor)
          Deprecated. since Confluence 5.2.
 
Method Summary
 boolean belongsTo(com.atlassian.user.User user)
          Returns true if this object belongs to the specified user.
 boolean equals(java.lang.Object o)
           
 java.lang.String getAttachmentUrlPath(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).
 java.util.List<BodyContent> getBodyContents()
           
 ContentEntityObject getContentEntityObject()
           
 BodyType getDefaultBodyType()
           
 java.lang.String getDisplayTitle()
          Returns the display title.
 java.lang.String getEmail()
           
 java.lang.String getFullName()
           
 java.lang.String getHasPersonalSpace()
           
 java.lang.String getLinkWikiMarkup()
           
 java.lang.String getNameForComparison()
          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.
 java.lang.String getType()
          An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.
 java.lang.String getUrlPath()
           
 ConfluenceUser getUser()
           
 java.lang.String getUsername()
           
 int hashCode()
           
 void setEmail(java.lang.String email)
          Deprecated. since 5.2
 void setFullName(java.lang.String fullName)
          Deprecated. since 5.2.
 void setUser(ConfluenceUser user)
           
 void setUsername(java.lang.String username)
          Deprecated. Since 5.2. Use setUser(ConfluenceUser) instead.
 java.lang.String toString()
          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, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, clone, compareTo, convertToHistoricalVersion, ensureAttachmentBelongsToContent, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getEntity, getExcerpt, getIdAsString, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTitle, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isIndexable, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, trash
 
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings
 
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getLatestVersion, getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, 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.bonnie.Searchable
getId
 
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
 
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

PersonalInformation

public PersonalInformation()

PersonalInformation

@Deprecated
public PersonalInformation(com.atlassian.user.User user,
                                      UserAccessor userAccessor)
Deprecated. since Confluence 5.2.

Parameters:
user -
userAccessor -
See Also:
PersonalInformation(ConfluenceUser, String)

PersonalInformation

public PersonalInformation(ConfluenceUser user,
                           java.lang.String personalInformation)
Since:
5.2
Method Detail

getContentEntityObject

public ContentEntityObject getContentEntityObject()

toString

public java.lang.String toString()
Override this method so we don't call getFullName() everytime toString is called on the object!

Overrides:
toString in class ContentEntityObject
Returns:
a string representation of this personal information object

getDisplayTitle

public java.lang.String getDisplayTitle()
Description copied from class: ContentEntityObject
Returns 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:
getDisplayTitle in interface Addressable
Overrides:
getDisplayTitle in class ContentEntityObject
Returns:
the display title

getUrlPath

public java.lang.String getUrlPath()
Specified by:
getUrlPath in interface Addressable
Specified by:
getUrlPath in class ContentEntityObject

getAttachmentUrlPath

public java.lang.String getAttachmentUrlPath(Attachment attachment)
Description copied from class: ContentEntityObject
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). Generally you will want to call Attachment.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:
getAttachmentUrlPath in class ContentEntityObject
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

public java.lang.String getUsername()

getUser

public ConfluenceUser getUser()
Since:
5.2

setUser

public void setUser(ConfluenceUser user)
Parameters:
user - this personal information applies to
Since:
5.2

setUsername

@Deprecated
public void setUsername(java.lang.String username)
Deprecated. Since 5.2. Use setUser(ConfluenceUser) instead.

Parameters:
username - the username for the user this personal information applies to
Throws:
java.lang.IllegalArgumentException - if the identified user cannot be found.

getDefaultBodyType

public BodyType getDefaultBodyType()
Overrides:
getDefaultBodyType in class ContentEntityObject

getBodyContents

public java.util.List<BodyContent> getBodyContents()
Overrides:
getBodyContents in class ContentEntityObject

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

public java.lang.String getFullName()

setFullName

@Deprecated
public void setFullName(java.lang.String fullName)
Deprecated. since 5.2.

Parameters:
fullName -

getEmail

public java.lang.String getEmail()

setEmail

@Deprecated
public void setEmail(java.lang.String email)
Deprecated. since 5.2

Parameters:
email -

getType

public java.lang.String getType()
Description copied from class: ContentEntityObject
An 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:
getType in interface ContentTypeAware
Specified by:
getType in class ContentEntityObject
Returns:
the content type

hashCode

public int hashCode()
Overrides:
hashCode in class ContentEntityObject

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class ContentEntityObject

getNameForComparison

public java.lang.String getNameForComparison()
Description copied from class: ContentEntityObject
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.

Specified by:
getNameForComparison in class ContentEntityObject

getHasPersonalSpace

public java.lang.String getHasPersonalSpace()

getLinkWikiMarkup

public java.lang.String getLinkWikiMarkup()
Specified by:
getLinkWikiMarkup in interface HasLinkWikiMarkup
Returns:
the wiki markup used to link to this content


Copyright © 2003-2014 Atlassian. All Rights Reserved.