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

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

public class LinkInfo
extends Object


Nested Class Summary
static class LinkInfo.LinkType
           
 
Constructor Summary
LinkInfo(String currentSpaceKey, String currentPageTitle, String linkText, boolean parse)
           
LinkInfo(String currentSpaceKey, String currentPageTitle, String linkText, String linkAlias)
           
LinkInfo(String currentSpaceKey, String currentPageTitle, String linkText, String linkAlias, String href)
           
 
Method Summary
static String divideOn(StringBuffer buffer, char divider)
          Split a StringBuffer on some dividing character.
 String getAlias()
           
 String getAnchor()
           
 String getAttachmentName()
           
 String getContentId()
          Gets the content id parsed.
 String getDestinationTitle()
           
 String getHref()
           
 String getLinkBody()
           
 String getLinkTitle()
           
 String getNotLinkBody()
           
 String getOriginalLinkText()
           
 String getPageTitle()
          Gets the title of the destination content.
 String getPostingDay()
           
 String getShortcutName()
          Returns the name of the shortcut.
 String getShortcutValue()
          Returns the value of the shortcut.
 String getSpaceKey()
           
 LinkInfo.LinkType getType()
           
 String getUserName()
           
 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(String currentSpaceKey,
                String currentPageTitle,
                String linkText,
                boolean parse)

LinkInfo

public LinkInfo(String currentSpaceKey,
                String currentPageTitle,
                String linkText,
                String linkAlias)

LinkInfo

public LinkInfo(String currentSpaceKey,
                String currentPageTitle,
                String linkText,
                String linkAlias,
                String href)
Method Detail

parseAsContentLink

public void parseAsContentLink()

getOriginalLinkText

public String getOriginalLinkText()

getLinkBody

public String getLinkBody()

getNotLinkBody

public String getNotLinkBody()

getSpaceKey

public String getSpaceKey()

getPageTitle

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


getPostingDay

public String getPostingDay()

getUserName

public String getUserName()

getAnchor

public String getAnchor()

getHref

public String getHref()

getShortcutName

public 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 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 String getAlias()

getLinkTitle

public String getLinkTitle()

getDestinationTitle

public String getDestinationTitle()

getAttachmentName

public String getAttachmentName()

getContentId

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


divideOn

public static String divideOn(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-2011 Atlassian. All Rights Reserved.