com.plumtree.uiinfrastructure.activityspace
Interface ILink

All Known Subinterfaces:
ILinkElement
All Known Implementing Classes:
ASURL, PassthruURL, Redirect

public interface ILink

This interface provides a common way to create an object that links to an AActivitySpace. It also provides methods to specify optional Page, Controls, and Query String arguments. To use this interface, first create an object that implements the interface, then call one of the SetSpace* methods to set what kind of link you want. Than add optional arguments (page, etc...)

Author:
Don Hayler

Method Summary
 void AddControlArgument(java.lang.String strName)
          This method allows you to add a control argument to the HTML URL with no value.
 void AddControlArgument(java.lang.String strName, boolean bValue)
          This method allows you to add a control argument to the HTML URL.
 void AddControlArgument(java.lang.String strName, int nValue)
          This method allows you to add a control argument to the HTML URL.
 void AddControlArgument(java.lang.String strName, java.lang.String strValue)
          This method allows you to add a control argument to the HTML URL.
 void AddControlArgument(java.lang.String strName, java.lang.String[] strValues)
          This method allows you to add a control argument to the HTML URL.
 void SetControl(java.lang.String strControl)
           
 void SetDisplayPage(java.lang.String strPage)
           
 boolean SetLinkCreateNewSpace(java.lang.String strSpace, AActivitySpace parent)
          This method creates a brand new AActivitySpace.
 boolean SetLinkGetCachedSpace(AActivitySpace space)
          This method takes a specific space and returns a link to that (including space ID).
 boolean SetLinkGetSpaceIfCached(java.lang.String strSpace, AActivitySpace parent)
          This method gets a named AActivitySpace from the cache if it is there, or creates a new one if it is not in the cache.
 boolean SetLinkToExternalURL(java.lang.String url)
           
 void SetSubSpaceKey(java.lang.String sSubSpaceKey)
          This method sets the sub space key.
 

Method Detail

AddControlArgument

void AddControlArgument(java.lang.String strName,
                        java.lang.String strValue)
This method allows you to add a control argument to the HTML URL. Do not use this method to set arguments that already have their own methods, such as sub-space key, display page, and control. For HTTP URLs, strValue should be automatically URL encoded. The behavior when arguments are added with the same name is undefined. Sometimes it will overwrite the first name/value pair, and sometimes it will append the second name/value pair after the first. Arguments should not be added twice.

Parameters:
strName - the name of the argument
strValue - the value of the argument

AddControlArgument

void AddControlArgument(java.lang.String strName,
                        java.lang.String[] strValues)
This method allows you to add a control argument to the HTML URL. Do not use this method to set arguments that already have their own methods, such as sub-space key, display page, and control. For HTTP URLs, strValues should be automatically URL encoded. The behavior when arguments are added with the same name is undefined. Sometimes it will overwrite the first name/value pair, and sometimes it will append the second name/value pair after the first. Arguments should not be added twice.

Parameters:
strName - the name of the argument
strValues - the value of the argument

AddControlArgument

void AddControlArgument(java.lang.String strName,
                        int nValue)
This method allows you to add a control argument to the HTML URL.

Parameters:
strName -
nValue -
See Also:
AddControlArgument(String, String)

AddControlArgument

void AddControlArgument(java.lang.String strName,
                        boolean bValue)
This method allows you to add a control argument to the HTML URL.

Parameters:
strName -
booleanValue -
See Also:
AddControlArgument(String, String)

AddControlArgument

void AddControlArgument(java.lang.String strName)
This method allows you to add a control argument to the HTML URL with no value.

Parameters:
strName -
booleanValue -
See Also:
AddControlArgument(String, String)

SetControl

void SetControl(java.lang.String strControl)
Parameters:
strControl - the name of the control to link to

SetDisplayPage

void SetDisplayPage(java.lang.String strPage)
Parameters:
strPage - the name of the page to link to

SetLinkCreateNewSpace

boolean SetLinkCreateNewSpace(java.lang.String strSpace,
                              AActivitySpace parent)
This method creates a brand new AActivitySpace.

Parameters:
strSpace - The name of the space to create
parent - the parent space
Returns:
boolean true implies success, false implies failure

SetLinkGetCachedSpace

boolean SetLinkGetCachedSpace(AActivitySpace space)
This method takes a specific space and returns a link to that (including space ID).

Parameters:
space - the space to create a link to
Returns:
boolean true implies success, false implies failure

SetLinkGetSpaceIfCached

boolean SetLinkGetSpaceIfCached(java.lang.String strSpace,
                                AActivitySpace parent)
This method gets a named AActivitySpace from the cache if it is there, or creates a new one if it is not in the cache. This method should be used to get common AActivitySpaces such as MyPage and Community, not minor spaces like Tree and Editors. The SetLinkGetCachedSpace(AActivitySpace) should be used instead of this one when you can.

Parameters:
strSpace - the name of the space to get or create (if it can't be found)
parent - the parent space
Returns:
boolean true implies success, false implies failure

SetSubSpaceKey

void SetSubSpaceKey(java.lang.String sSubSpaceKey)
This method sets the sub space key. If this is not called, or is empty, the space will not be a sub-space. Otherwise it will be. The sub-space key is different from the space ID.

Parameters:
sSubSpaceKey - the key for the sub-space

SetLinkToExternalURL

boolean SetLinkToExternalURL(java.lang.String url)



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.