com.plumtree.portalpages.common.mediator
Class CListURLFullMediator

java.lang.Object
  extended by com.plumtree.portalpages.common.mediator.CListURLFullMediator
All Implemented Interfaces:
ICPListIterator
Direct Known Subclasses:
CListURLFullLinkMediator

public class CListURLFullMediator
extends java.lang.Object
implements ICPListIterator

NOTE: Use CListURLFullLinkMediator to get HTMLAnchors, this class might get changed in the future. Generates HTMLAnchors with target URLs in href, display string and image(s) if assigned. This class is similar to CListURLTemplateMediator, except that the HREF is used to go to the URL instead of onlick evens. Hence, it is 508 compatible since no browser Javascript capability is required. Example use: ICPListIterator mediator = new CListURLFullMediator(m_asOwner, cpList1); mediator.SetLabelMaxLength(50); //set the maximum label length to 50 characters while (mediator.Next()) { HTMLAnchor anchor = (HTMLAnchor) mediator.GetEntry(); ... }

Author:
robertz

Field Summary
static int ACTIONIMAGE_SPACE_WIDTH
           
static int IMAGE_SPACE_WIDTH
           
 
Constructor Summary
CListURLFullMediator(AActivitySpace aspace, ICPListEntryIterator list)
          Constructor for CompoundListASURLMediator.
 
Method Summary
protected  HTMLAnchor CreateCommPageASURL(ListEntry entry)
          Creates an ASURL to a Community page
protected  HTMLAnchor CreateDirPageASURL(ListEntry entry)
          Creates an ASURL to a directory page
protected  HTMLAnchor CreateDocHTMLAnchor(ListEntry entry)
          Creates an HTMLAnchor to a directory document page
protected  ASURL CreateEditorASURL(ListEntry entry)
          Creates an ASURL to an editor page
protected  HTMLAnchor CreateFullInternalURLHTMLAnchor(ListEntry entry)
          Creates an HTMLAnchor that links to a portal URL
protected  HTMLAnchor CreateFullURLHTMLAnchor(ListEntry entry)
          Creates an HTMLAnchor that links to an external URL
protected  ASURL CreateGenericASURL(ListEntry entry)
          Creates an ASURL for generic Portal 50 pages
protected  HTMLAnchor CreateMyPageASURL(ListEntry entry)
          Creatse ASURL to a mypage
protected  ASURL CreatePrefsASURL(ListEntry entry)
          Creates ASURL to a user preference page
protected  ASURL CreateSiteMapRootASURL(ListEntry entry)
          Creates an ASURL to a Community Knowledge Directory Root page
protected  ASURL CreateStringLabelASURL(ListEntry entry)
          Creates an ASURL with just a label, no URL
protected  HTMLAnchor CreateUserHTMLAnchor(ListEntry entry)
          Creates an HTMLAnchor to a user profile page
 java.lang.Object GetEntry()
          Get the current entry in the list.
 java.lang.Object GetEntryAtIndex(int nIndex)
          Get the entry at a specific index
 int GetEntryType()
          Returns the entry type of the current listentry
 int GetEntryTypeAtIndex(int nIndex)
          Returns the entry type of the specified index
 ICPListEntryIterator GetList()
          Get an iterator, the index is set to before the first element, call Next() to advance to first entry.
 boolean Next()
          Advances the iterator to next element.
protected  void SetImage(ASURL url, ListEntry entry)
          Set image(s) on the ASURL from the assigned images in the Listentry object.
protected  void SetImage(HTMLAnchor anchor, ListEntry entry)
          Sets the image(s) on the HTMLAnchor from the Listentry object.
 void SetLabelMaxLength(int nMax)
          Set the truncation width for all subsequent entries, can be altered between entries during an iteration
 void SetShowImages(boolean bShow)
          Set to display images for subsequent entries in the list, can be altered between entries during an iteration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_SPACE_WIDTH

public static final int IMAGE_SPACE_WIDTH
See Also:
Constant Field Values

ACTIONIMAGE_SPACE_WIDTH

public static final int ACTIONIMAGE_SPACE_WIDTH
See Also:
Constant Field Values
Constructor Detail

CListURLFullMediator

public CListURLFullMediator(AActivitySpace aspace,
                            ICPListEntryIterator list)
Constructor for CompoundListASURLMediator. Get the iterator interface for the list

Parameters:
aspace - The current activityspace
list - The ASCompoundlist for this mediator
Method Detail

GetEntry

public java.lang.Object GetEntry()
Description copied from interface: ICPListIterator
Get the current entry in the list. Doesn't advance the iterator

Specified by:
GetEntry in interface ICPListIterator
Returns:
HTMLAnchor with target url as href target. Also returns HTMLAnchors with null as href target, which will only generate a plain HTML string without the anchor.
See Also:
ICPListIterator.GetEntry()

GetEntryAtIndex

public java.lang.Object GetEntryAtIndex(int nIndex)
Description copied from interface: ICPListIterator
Get the entry at a specific index

Specified by:
GetEntryAtIndex in interface ICPListIterator
Parameters:
nIndex - Index of the entry
Returns:
Entry at specified index
See Also:
ICPListIterator.GetEntryAtIndex(int)

GetEntryType

public int GetEntryType()
Returns the entry type of the current listentry

Returns:
int

GetEntryTypeAtIndex

public int GetEntryTypeAtIndex(int nIndex)
Returns the entry type of the specified index

Parameters:
nIndex - Index of the listentry
Returns:
Type of the specified entry

GetList

public ICPListEntryIterator GetList()
Description copied from interface: ICPListIterator
Get an iterator, the index is set to before the first element, call Next() to advance to first entry.

Specified by:
GetList in interface ICPListIterator
Returns:
Iterator for current list
See Also:
ICPListIterator.GetList()

Next

public boolean Next()
Description copied from interface: ICPListIterator
Advances the iterator to next element.

Specified by:
Next in interface ICPListIterator
Returns:
false if no more elements exist, true otherwise
See Also:
ICPListIterator.Next()

SetLabelMaxLength

public void SetLabelMaxLength(int nMax)
Description copied from interface: ICPListIterator
Set the truncation width for all subsequent entries, can be altered between entries during an iteration

Specified by:
SetLabelMaxLength in interface ICPListIterator
Parameters:
nMax - Character position to truncate at
See Also:
ICPListIterator.SetLabelMaxLength(int)

SetShowImages

public void SetShowImages(boolean bShow)
Description copied from interface: ICPListIterator
Set to display images for subsequent entries in the list, can be altered between entries during an iteration

Specified by:
SetShowImages in interface ICPListIterator
Parameters:
bShow - true to show images (default), false to no show images in entries
See Also:
ICPListIterator.SetShowImages(boolean)

CreateCommPageASURL

protected HTMLAnchor CreateCommPageASURL(ListEntry entry)
Creates an ASURL to a Community page

Parameters:
entry - Current listentry object
Returns:
ASURL to the target URL

CreateSiteMapRootASURL

protected ASURL CreateSiteMapRootASURL(ListEntry entry)
Creates an ASURL to a Community Knowledge Directory Root page

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

CreateDirPageASURL

protected HTMLAnchor CreateDirPageASURL(ListEntry entry)
Creates an ASURL to a directory page

Parameters:
entry - Current listentry object
Returns:
ASURL to the target URL

CreateDocHTMLAnchor

protected HTMLAnchor CreateDocHTMLAnchor(ListEntry entry)
Creates an HTMLAnchor to a directory document page

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

CreateEditorASURL

protected ASURL CreateEditorASURL(ListEntry entry)
Creates an ASURL to an editor page

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

CreateFullInternalURLHTMLAnchor

protected HTMLAnchor CreateFullInternalURLHTMLAnchor(ListEntry entry)
Creates an HTMLAnchor that links to a portal URL

Parameters:
entry -
Returns:

CreateFullURLHTMLAnchor

protected HTMLAnchor CreateFullURLHTMLAnchor(ListEntry entry)
Creates an HTMLAnchor that links to an external URL

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

CreateGenericASURL

protected ASURL CreateGenericASURL(ListEntry entry)
Creates an ASURL for generic Portal 50 pages

Parameters:
entry - Current listentry object
Returns:
ASURL to the target URL

CreateMyPageASURL

protected HTMLAnchor CreateMyPageASURL(ListEntry entry)
Creatse ASURL to a mypage

Parameters:
entry - Current listentry object
Returns:
ASURL to the target URL

CreatePrefsASURL

protected ASURL CreatePrefsASURL(ListEntry entry)
Creates ASURL to a user preference page

Parameters:
entry - Current listentry object
Returns:
ASURL to the target URL

CreateStringLabelASURL

protected ASURL CreateStringLabelASURL(ListEntry entry)
Creates an ASURL with just a label, no URL

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

CreateUserHTMLAnchor

protected HTMLAnchor CreateUserHTMLAnchor(ListEntry entry)
Creates an HTMLAnchor to a user profile page

Parameters:
entry - Current listentry object
Returns:
HTMLAnchor linking to the target URL in the href

SetImage

protected void SetImage(ASURL url,
                        ListEntry entry)
Set image(s) on the ASURL from the assigned images in the Listentry object.

Parameters:
url -
entry -

SetImage

protected void SetImage(HTMLAnchor anchor,
                        ListEntry entry)
Sets the image(s) on the HTMLAnchor from the Listentry object. Adds spacer images to get straight marigin between images and text

Parameters:
anchor - The HTMLAnchor
entry - The Listentry object



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