com.atlassian.confluence.plugins.linkbrowser.client
Class LinkInfo

java.lang.Object
  extended by com.atlassian.confluence.plugins.linkbrowser.client.LinkInfo

public class LinkInfo
extends java.lang.Object


Nested Class Summary
static class LinkInfo.LinkType
           
 
Constructor Summary
LinkInfo(java.lang.String currentSpaceKey, java.lang.String currentPageTitle, java.lang.String linkText, boolean parse)
           
LinkInfo(java.lang.String currentSpaceKey, java.lang.String currentPageTitle, java.lang.String linkText, java.lang.String linkAlias)
           
 
Method Summary
static java.lang.String divideOn(java.lang.StringBuffer buffer, char divider)
          Split a StringBuffer on some dividing character.
 java.lang.String getAlias()
           
 java.lang.String getAnchor()
           
 java.lang.String getAttachmentName()
           
 java.lang.String getContentId()
          Gets the content id parsed.
 java.lang.String getDestinationTitle()
           
 java.lang.String getLinkBody()
           
 java.lang.String getLinkTitle()
           
 java.lang.String getNotLinkBody()
           
 java.lang.String getOriginalLinkText()
           
 java.lang.String getPageTitle()
          Gets the title of the destination content.
 java.lang.String getPostingDay()
           
 java.lang.String getShortcutName()
          Returns the name of the shortcut.
 java.lang.String getShortcutValue()
          Returns the value of the shortcut.
 java.lang.String getSpaceKey()
           
 LinkInfo.LinkType getType()
           
 java.lang.String getUserName()
           
 boolean isExternal()
           
 void parseAsContentLink()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkInfo

public LinkInfo(java.lang.String currentSpaceKey,
                java.lang.String currentPageTitle,
                java.lang.String linkText,
                boolean parse)

LinkInfo

public LinkInfo(java.lang.String currentSpaceKey,
                java.lang.String currentPageTitle,
                java.lang.String linkText,
                java.lang.String linkAlias)
Method Detail

parseAsContentLink

public void parseAsContentLink()

getOriginalLinkText

public java.lang.String getOriginalLinkText()

getLinkBody

public java.lang.String getLinkBody()

getNotLinkBody

public java.lang.String getNotLinkBody()

getSpaceKey

public java.lang.String getSpaceKey()

getPageTitle

public java.lang.String getPageTitle()
Gets the title of the destination content. Only populated by calling parseAsContentLink(), empty string otherwise.


getPostingDay

public java.lang.String getPostingDay()

getUserName

public java.lang.String getUserName()

getAnchor

public java.lang.String getAnchor()

getShortcutName

public java.lang.String getShortcutName()
Returns the name of the shortcut. Only populated by calling parseAsContentLink(). Null if not parsed as content link or if the link isn't a shortcut link.


getShortcutValue

public java.lang.String getShortcutValue()
Returns the value of the shortcut. Only populated by calling parseAsContentLink(). Null if not parsed as content link or if the link isn't a shortcut link.


getAlias

public java.lang.String getAlias()

isExternal

public boolean isExternal()

getLinkTitle

public java.lang.String getLinkTitle()

getDestinationTitle

public java.lang.String getDestinationTitle()

getAttachmentName

public java.lang.String getAttachmentName()

getContentId

public java.lang.String getContentId()
Gets the content id parsed. Returns 0 if not defined in the original link text.


divideOn

public static java.lang.String divideOn(java.lang.StringBuffer buffer,
                                        char divider)
Split a StringBuffer on some dividing character. Return everything before the divider, and remove that prefix _and_ the divider from the StringBuffer. If there is no divider, return null.

If the buffer begins with the divider, then the divider will be removed _and_ null returned. If the buffer ends with the divider, everything before the divider is returned and the buffer will remain empty.

Parameters:
buffer - the text we want to divide. Will be modified during the operation
divider - the character to divide the buffer on
Returns:
the characters before the divider, or the default if there are none

getType

public LinkInfo.LinkType getType()


Copyright © 2003-2010 Atlassian. All Rights Reserved.