net.sourceforge.blogentis.plugins.base
Interface ILinkTo

All Known Subinterfaces:
IPostEditExtension.IPostAction
All Known Implementing Classes:
AbstractNavigationExtension.AbstractLink

public interface ILinkTo

This interface defines a linked item in the blogs UI. Only the target link and the description are relevant, the caller will know what to do with them.

Author:
abas

Method Summary
 java.lang.String getLabel()
          Get this links label.
 AbsoluteLinkURL getLink(BlogRunData data, AbsoluteLinkURL link)
          Get the linked page that this link should lead to.
 boolean isAuthorized(BlogRunData data)
          Check if this links target is accessible with the current requests credentials.
 boolean isCurrentPage(BlogRunData data)
          Check if this link's target is the same as the current request.
 

Method Detail

getLabel

public java.lang.String getLabel()
Get this links label. TODO: provide i18n support?

Returns:
the label for this link.

getLink

public AbsoluteLinkURL getLink(BlogRunData data,
                               AbsoluteLinkURL link)
Get the linked page that this link should lead to.

Parameters:
data - the RunData of the request.
link - an (possibly modified) link.
Returns:

isCurrentPage

public boolean isCurrentPage(BlogRunData data)
Check if this link's target is the same as the current request.

Parameters:
data - The current request
Returns:
true if the current request shows the current page.

isAuthorized

public boolean isAuthorized(BlogRunData data)
Check if this links target is accessible with the current requests credentials.

Parameters:
data - The current request
Returns:
true if the target page is viewable with the current credentials.


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.