com.plumtree.portaluiinfrastructure.helpers
Class BannerSearchHelperService

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.helpers.BannerSearchHelperService
All Implemented Interfaces:
IBannerSearchHelper

public class BannerSearchHelperService
extends java.lang.Object
implements IBannerSearchHelper


Field Summary
protected  AActivitySpace _parentAS
           
static int BIT_CARD
           
static int BIT_COLLAB
           
static int BIT_COMMUNITY
           
static int BIT_CONTENT
           
static int BIT_FOLDER
           
static int BIT_PAGE
           
static int BIT_PORTLET
           
static int BIT_USER
           
static java.lang.String SEARCHPREF_GROUPBY
           
static java.lang.String SEARCHPREF_OBJECTTYPES
           
static java.lang.String SEARCHPREF_OBJECTTYPES_OVERRIDE
          Name of Object Type override search preference.
static java.lang.String SPECIAL_SORT_BY_LASTMODIFIED_VALUE
           
static java.lang.String SPECIAL_SORT_BY_NAME_VALUE
           
 
Method Summary
 java.lang.String GetBannerSearchPreferenceSortOrder(AActivitySpace _parent)
          Unit tests should use this method to overwrite/teardown existing helper singleton.
static IBannerSearchHelper GetInstance()
           
 int GetIntSessionSetting(IPTSessionInfo sessionInfo, java.lang.String settingName, int def)
          Helper method to get an integer setting from the user's session.
 int GetIntSetting(IPTSessionInfo sessionInfo, java.lang.String settingName, int def)
          Helper method to get an integer setting out of the database
 java.lang.String GetPathwaysClassIdStringValue(int value)
           
 XPArrayList GetPortalObjectTypes(IPTSessionInfo sessionInfo, int objectTypeBitmask)
          helper method to decipher the bitmask value
 XPArrayList GetSearchConstraints(AActivitySpace _parent)
          looks up the bitmask for search object constraints this function came from BannerStartSearchControl.GetPreferences()
 java.lang.String GetStringSetting(IPTSessionInfo sessionInfo, java.lang.String settingName, java.lang.String def)
          Helper method to get a String setting out of the database
 XPArrayList setCollabItems(XPArrayList constraints)
           
 XPArrayList setContentItems(XPArrayList constraints)
           
 java.lang.String SetPathwaysSearchHistory(java.lang.Object[] queryArray)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parentAS

protected AActivitySpace _parentAS

SEARCHPREF_OBJECTTYPES_OVERRIDE

public static final java.lang.String SEARCHPREF_OBJECTTYPES_OVERRIDE
Name of Object Type override search preference. Used when performing tag searches from KD Browse

See Also:
Constant Field Values

SEARCHPREF_GROUPBY

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

SEARCHPREF_OBJECTTYPES

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

SPECIAL_SORT_BY_LASTMODIFIED_VALUE

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

SPECIAL_SORT_BY_NAME_VALUE

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

BIT_CARD

public static final int BIT_CARD
See Also:
Constant Field Values

BIT_FOLDER

public static final int BIT_FOLDER
See Also:
Constant Field Values

BIT_USER

public static final int BIT_USER
See Also:
Constant Field Values

BIT_COMMUNITY

public static final int BIT_COMMUNITY
See Also:
Constant Field Values

BIT_PORTLET

public static final int BIT_PORTLET
See Also:
Constant Field Values

BIT_COLLAB

public static final int BIT_COLLAB
See Also:
Constant Field Values

BIT_CONTENT

public static final int BIT_CONTENT
See Also:
Constant Field Values

BIT_PAGE

public static final int BIT_PAGE
See Also:
Constant Field Values
Method Detail

GetInstance

public static IBannerSearchHelper GetInstance()
Returns:
The singleton PT config helper.

GetBannerSearchPreferenceSortOrder

public java.lang.String GetBannerSearchPreferenceSortOrder(AActivitySpace _parent)
Unit tests should use this method to overwrite/teardown existing helper singleton. DO NOT USE for production code. NOTE: When finished with a unit test, this should be set back to null so as not to interfere with other tests.

Specified by:
GetBannerSearchPreferenceSortOrder in interface IBannerSearchHelper

GetSearchConstraints

public XPArrayList GetSearchConstraints(AActivitySpace _parent)
Description copied from interface: IBannerSearchHelper
looks up the bitmask for search object constraints this function came from BannerStartSearchControl.GetPreferences()

Specified by:
GetSearchConstraints in interface IBannerSearchHelper
Parameters:
_parent - AActivityspace to get user session

GetPortalObjectTypes

public XPArrayList GetPortalObjectTypes(IPTSessionInfo sessionInfo,
                                        int objectTypeBitmask)
Description copied from interface: IBannerSearchHelper
helper method to decipher the bitmask value

Specified by:
GetPortalObjectTypes in interface IBannerSearchHelper
objectTypeBitmask - The bitmask value of the object types to search for
Returns:
list of Portal Object Types from User Search Preferences.

GetPathwaysClassIdStringValue

public java.lang.String GetPathwaysClassIdStringValue(int value)
Specified by:
GetPathwaysClassIdStringValue in interface IBannerSearchHelper

setCollabItems

public XPArrayList setCollabItems(XPArrayList constraints)
Specified by:
setCollabItems in interface IBannerSearchHelper

setContentItems

public XPArrayList setContentItems(XPArrayList constraints)
Specified by:
setContentItems in interface IBannerSearchHelper

GetIntSetting

public int GetIntSetting(IPTSessionInfo sessionInfo,
                         java.lang.String settingName,
                         int def)
Description copied from interface: IBannerSearchHelper
Helper method to get an integer setting out of the database

Specified by:
GetIntSetting in interface IBannerSearchHelper
Parameters:
sessionInfo - the current user's IPTSessionInfo object.
settingName - the name of the desired setting.
def - a default value to return if the setting is not found in the database.
Returns:
the value of the setting, or def if not found.

GetIntSessionSetting

public int GetIntSessionSetting(IPTSessionInfo sessionInfo,
                                java.lang.String settingName,
                                int def)
Description copied from interface: IBannerSearchHelper
Helper method to get an integer setting from the user's session.

Specified by:
GetIntSessionSetting in interface IBannerSearchHelper
Parameters:
sessionInfo - the current user's IPTSessionInfo object.
settingName - the name of the desired setting.
def - a default value to return if the setting is not found in the session.
Returns:
the value of the setting, or def if not found.

GetStringSetting

public java.lang.String GetStringSetting(IPTSessionInfo sessionInfo,
                                         java.lang.String settingName,
                                         java.lang.String def)
Description copied from interface: IBannerSearchHelper
Helper method to get a String setting out of the database

Specified by:
GetStringSetting in interface IBannerSearchHelper
Parameters:
sessionInfo - the current user's IPTSessionInfo object.
settingName - the name of the desired setting.
def - a default value to return if the setting is not found in the database.
Returns:
the value of the setting, or def if not found.

SetPathwaysSearchHistory

public java.lang.String SetPathwaysSearchHistory(java.lang.Object[] queryArray)
Specified by:
SetPathwaysSearchHistory in interface IBannerSearchHelper



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