com.arsdigita.cms.ui
Class ContentSectionContainer.URLTableCellRenderer

java.lang.Object
  extended bycom.arsdigita.cms.ui.ContentSectionContainer.URLTableCellRenderer
All Implemented Interfaces:
com.arsdigita.bebop.table.TableCellRenderer
Direct Known Subclasses:
ContentSectionContainer.AdminURLTableCellRenderer
Enclosing class:
ContentSectionContainer

public static class ContentSectionContainer.URLTableCellRenderer
extends Object
implements com.arsdigita.bebop.table.TableCellRenderer

Generates the correct URL to the public pages for a content section.

Author:
Michael Bryzek

Field Summary
 
Fields inherited from interface com.arsdigita.bebop.table.TableCellRenderer
versionId
 
Constructor Summary
ContentSectionContainer.URLTableCellRenderer()
           
 
Method Summary
protected  String generateURL(String prefix)
          Generates the url for the specified prefix.
protected  String getBaseURL()
          Returns the current url stub from the webapp context and the requested site node.
 com.arsdigita.bebop.Component getComponent(com.arsdigita.bebop.Table table, com.arsdigita.bebop.PageState state, Object value, boolean isSelected, Object key, int row, int column)
          The object passed in is the current content section.
protected  String trimSlashes(String string)
          Trims leading slashes, if any, on the specified string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentSectionContainer.URLTableCellRenderer

public ContentSectionContainer.URLTableCellRenderer()
Method Detail

getComponent

public com.arsdigita.bebop.Component getComponent(com.arsdigita.bebop.Table table,
                                                  com.arsdigita.bebop.PageState state,
                                                  Object value,
                                                  boolean isSelected,
                                                  Object key,
                                                  int row,
                                                  int column)
The object passed in is the current content section. This returns a Link whose name and target are the url to the public pages.

Specified by:
getComponent in interface com.arsdigita.bebop.table.TableCellRenderer

trimSlashes

protected String trimSlashes(String string)
Trims leading slashes, if any, on the specified string.

Parameters:
string - The string for which we want to remove leading slashes

generateURL

protected String generateURL(String prefix)
Generates the url for the specified prefix. Always returns something that does not start with a forward slash.

Parameters:
prefix - The prefix of the URL

getBaseURL

protected String getBaseURL()
Returns the current url stub from the webapp context and the requested site node. Always returns something that ends with a forward slash.



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC