Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.impl
Class BaseContainerLinkProvider

java.lang.Object
  extended by com.jivesoftware.community.impl.BaseContainerLinkProvider
All Implemented Interfaces:
LinkProvider

public abstract class BaseContainerLinkProvider
extends Object
implements LinkProvider

Base implementation of LinkProvider for containers.


Constructor Summary
BaseContainerLinkProvider()
           
 
Method Summary
 boolean allowsAttachmentLinks()
          Attachments not possible for containers.
 String getAnchorLinkFromAnchorHrefMatcher(Matcher urlMatcher)
          No anchor links for containers.
 String getAttachmentNameFromAnchorHrefMatcher(Matcher urlMatcher)
          Attachments not possible for containers.
 String getLinkURLFromJiveObject(JiveObject jiveObject, boolean isAbsoluteURL)
           Given a JiveObject, this method should construct a relative, or full, URL (depending on the isAbsoluteURL) parameter.
 String parseRelativeURL(String href, String baseUrl)
           Returns the relative URL from the passed in href.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jivesoftware.community.LinkProvider
getAnchorHrefMatcher, getLinkCSS, getLinkDescriptionFromJiveObject, getLinkTextFromJiveObject, getObjectIdFromAnchorHrefMatcher
 

Constructor Detail

BaseContainerLinkProvider

public BaseContainerLinkProvider()
Method Detail

allowsAttachmentLinks

public boolean allowsAttachmentLinks()
Attachments not possible for containers.

Specified by:
allowsAttachmentLinks in interface LinkProvider
Returns:
true if this object type allows being linked from other object types.

getAttachmentNameFromAnchorHrefMatcher

public String getAttachmentNameFromAnchorHrefMatcher(Matcher urlMatcher)
Attachments not possible for containers.

Specified by:
getAttachmentNameFromAnchorHrefMatcher in interface LinkProvider
Parameters:
urlMatcher - matcher previously constructed for an anchor href
Returns:
the attachment name from the href being parsed by the matcher
See Also:
com.jivesoftware.base.wiki.JiveLinkBuilder

getAnchorLinkFromAnchorHrefMatcher

public String getAnchorLinkFromAnchorHrefMatcher(Matcher urlMatcher)
No anchor links for containers.

Specified by:
getAnchorLinkFromAnchorHrefMatcher in interface LinkProvider
Parameters:
urlMatcher - matcher previously constructed for an anchor href
Returns:
any anchor links from the href being parsed by the matcher
See Also:
com.jivesoftware.base.wiki.JiveLinkBuilder

getLinkURLFromJiveObject

public String getLinkURLFromJiveObject(JiveObject jiveObject,
                                       boolean isAbsoluteURL)
Description copied from interface: LinkProvider
 Given a JiveObject, this method should construct a relative, or full, URL (depending on the isAbsoluteURL)
 parameter.

 Primarily consumed by the com.jivesoftware.base.wiki.JiveLinkBuilder class.
 

Specified by:
getLinkURLFromJiveObject in interface LinkProvider
Parameters:
jiveObject - the jive object to retrieve the link url from
isAbsoluteURL - whether or not the url is absolute
Returns:
a relative, or full, URL (depending on the isAbsoluteURL) parameter

parseRelativeURL

public String parseRelativeURL(String href,
                               String baseUrl)
Description copied from interface: LinkProvider
 Returns the relative URL from the passed in href.

 Should return empty or NULL if a relative URL relating to the content type cannot be parsed from the input href.
 

Specified by:
parseRelativeURL in interface LinkProvider
Parameters:
href - a link anchor href
baseUrl - base resource of the url
Returns:
empty or NULL if a relative URL relating to the content type cannot be parsed from the input href

Jive Product Page

Copyright © 1999-2007 Jive Software.