com.plumtree.portalpages.browsing.search.results
Class GroupedResultsViewHelper

java.lang.Object
  extended by com.plumtree.portalpages.browsing.search.results.GroupedResultsViewHelper
All Implemented Interfaces:
IGroupedResultsViewHelper

public class GroupedResultsViewHelper
extends java.lang.Object
implements IGroupedResultsViewHelper

Author:
CraigS

Field Summary
protected  XPDateFormat _dateFormat
           
protected  ISearchResultModelRO _model
           
protected  SearchPageModeHelper _pageMode
           
protected  GroupedResultsView _view
           
protected static java.lang.String CELL_HEIGHT
           
protected  XPStringBuilder checkBoxScriptBuilder
           
static java.lang.String DOC_FOLDER_INPUT
           
static java.lang.String DOC_INPUT
           
static java.lang.String FELEM_ELEMENTS
           
static java.lang.String HTMLFORM_NAME
           
static java.lang.String IN_CB_MASTER
           
protected static java.lang.String LOW_CELL_HEIGHT
           
protected  AActivitySpace m_asOwner
           
static int MULTIFOLDER_CODE
           
 
Constructor Summary
GroupedResultsViewHelper(SearchPageModeHelper pageMode)
           
 
Method Summary
protected  void AddCheckBoxScript(java.lang.String value, java.lang.String name, int groupNum, XPStringBuilder script)
           
protected  boolean CardHasMoreThanOneFolder(int resultNum)
           
protected  boolean CheckBoxForMode(int objID, int classID, int folderID)
           
 HTMLElement DisplayCollection()
          Returns the element that all other elements will be added to, such as an HTMLTable.
 HTMLElement DisplayFooter()
          Returns an element that will appear after all results regardless of whether the results are grouped.
 HTMLElement DisplayFooterIfUngrouped()
          Returns an element that will appear after all results if the results are not grouped.
 HTMLElement DisplayGroupFooter(int groupNum)
          Returns an element that will appear after all results in a single group.
 HTMLElement DisplayGroupHeader(int groupNum)
          Returns the header element (e.g.
 HTMLElement DisplayHeader()
          Returns an element that will appear before all results, whether or not the results are grouped.
 HTMLElement DisplayHeaderIfUngrouped()
          Returns the header element (e.g.
 HTMLScript DisplayJavascript()
          Returns javascript for the view.
 HTMLElement DisplaySingleResult(int resultNum, boolean oddRow, int groupNum)
          Returns the header element (e.g.
 java.lang.String formatPath(java.lang.String path)
          Helper method to format path string in a friendly way
 java.lang.String formatSize(int sizeInBytes)
          Helper method to format size string in a friendly way
 java.lang.String GetAdminFolderPath(int folderID)
           
 XPStringBuilder GetCheckBoxScriptBuilder()
           
 int GetFolderIDForCard(int cardID)
           
 java.lang.String GetFolderPath(int folderID)
           
 java.lang.String GetFolderPathForCard(int cardID)
           
 void Init(AActivitySpace owner, ISearchResultModelRO model, GroupedResultsView view)
          Called to set the activityspace, model, and view being used
 void InitDisplayResults()
          Call this method before calling any of the other methods to do initialization.
 boolean ObjectHasBeenDeleted(int objID, int classID, int folderID)
           
 boolean ObjectIsAdminFolder(int classID)
           
 boolean ObjectIsFolder(int classID)
           
 boolean SuppressEditLinkForClass(int classID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_asOwner

protected AActivitySpace m_asOwner

_model

protected ISearchResultModelRO _model

_view

protected GroupedResultsView _view

_pageMode

protected SearchPageModeHelper _pageMode

CELL_HEIGHT

protected static final java.lang.String CELL_HEIGHT
See Also:
Constant Field Values

LOW_CELL_HEIGHT

protected static final java.lang.String LOW_CELL_HEIGHT
See Also:
Constant Field Values

_dateFormat

protected XPDateFormat _dateFormat

HTMLFORM_NAME

public static final java.lang.String HTMLFORM_NAME
See Also:
Constant Field Values

IN_CB_MASTER

public static final java.lang.String IN_CB_MASTER
See Also:
Constant Field Values

DOC_FOLDER_INPUT

public static final java.lang.String DOC_FOLDER_INPUT
See Also:
Constant Field Values

DOC_INPUT

public static final java.lang.String DOC_INPUT
See Also:
Constant Field Values

MULTIFOLDER_CODE

public static final int MULTIFOLDER_CODE
See Also:
Constant Field Values

checkBoxScriptBuilder

protected XPStringBuilder checkBoxScriptBuilder

FELEM_ELEMENTS

public static final java.lang.String FELEM_ELEMENTS
See Also:
Constant Field Values
Constructor Detail

GroupedResultsViewHelper

public GroupedResultsViewHelper(SearchPageModeHelper pageMode)
Method Detail

Init

public void Init(AActivitySpace owner,
                 ISearchResultModelRO model,
                 GroupedResultsView view)
Description copied from interface: IGroupedResultsViewHelper
Called to set the activityspace, model, and view being used

Specified by:
Init in interface IGroupedResultsViewHelper

formatPath

public java.lang.String formatPath(java.lang.String path)
Helper method to format path string in a friendly way


formatSize

public java.lang.String formatSize(int sizeInBytes)
Helper method to format size string in a friendly way


DisplayJavascript

public HTMLScript DisplayJavascript()
Returns javascript for the view.

Specified by:
DisplayJavascript in interface IGroupedResultsViewHelper

DisplayCollection

public HTMLElement DisplayCollection()
Returns the element that all other elements will be added to, such as an HTMLTable. If null is returned, a generic HTMLElementCollection will be used.

Specified by:
DisplayCollection in interface IGroupedResultsViewHelper

DisplayHeader

public HTMLElement DisplayHeader()
Returns an element that will appear before all results, whether or not the results are grouped.

Specified by:
DisplayHeader in interface IGroupedResultsViewHelper

DisplayFooter

public HTMLElement DisplayFooter()
Returns an element that will appear after all results regardless of whether the results are grouped.

Specified by:
DisplayFooter in interface IGroupedResultsViewHelper

DisplayHeaderIfUngrouped

public HTMLElement DisplayHeaderIfUngrouped()
Returns the header element (e.g. an HTMLTableRow containing column headings) that will be used if the results are not grouped. Not called if the results are grouped.

Specified by:
DisplayHeaderIfUngrouped in interface IGroupedResultsViewHelper

DisplayFooterIfUngrouped

public HTMLElement DisplayFooterIfUngrouped()
Returns an element that will appear after all results if the results are not grouped. Not called if the results are grouped.

Specified by:
DisplayFooterIfUngrouped in interface IGroupedResultsViewHelper

DisplayGroupHeader

public HTMLElement DisplayGroupHeader(int groupNum)
Returns the header element (e.g. an HTMLTableRow containing column headings) that will be used if the results are grouped. Not called if the results are ungrouped.

Specified by:
DisplayGroupHeader in interface IGroupedResultsViewHelper

DisplayGroupFooter

public HTMLElement DisplayGroupFooter(int groupNum)
Returns an element that will appear after all results in a single group. Not called if the results are ungrouped.

Specified by:
DisplayGroupFooter in interface IGroupedResultsViewHelper

AddCheckBoxScript

protected void AddCheckBoxScript(java.lang.String value,
                                 java.lang.String name,
                                 int groupNum,
                                 XPStringBuilder script)

DisplaySingleResult

public HTMLElement DisplaySingleResult(int resultNum,
                                       boolean oddRow,
                                       int groupNum)
Returns the header element (e.g. an HTMLTableRow) headings) for a single search result.

Specified by:
DisplaySingleResult in interface IGroupedResultsViewHelper

InitDisplayResults

public void InitDisplayResults()
Description copied from interface: IGroupedResultsViewHelper
Call this method before calling any of the other methods to do initialization.

Specified by:
InitDisplayResults in interface IGroupedResultsViewHelper

GetCheckBoxScriptBuilder

public XPStringBuilder GetCheckBoxScriptBuilder()

ObjectIsFolder

public boolean ObjectIsFolder(int classID)

ObjectIsAdminFolder

public boolean ObjectIsAdminFolder(int classID)

SuppressEditLinkForClass

public boolean SuppressEditLinkForClass(int classID)

ObjectHasBeenDeleted

public boolean ObjectHasBeenDeleted(int objID,
                                    int classID,
                                    int folderID)

GetAdminFolderPath

public java.lang.String GetAdminFolderPath(int folderID)

GetFolderPath

public java.lang.String GetFolderPath(int folderID)

GetFolderPathForCard

public java.lang.String GetFolderPathForCard(int cardID)

GetFolderIDForCard

public int GetFolderIDForCard(int cardID)

CheckBoxForMode

protected boolean CheckBoxForMode(int objID,
                                  int classID,
                                  int folderID)

CardHasMoreThanOneFolder

protected boolean CardHasMoreThanOneFolder(int resultNum)



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