com.plumtree.portalpages.portlets.savedsearch
Class SavedSearchPortletModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AClearModel
      extended by com.plumtree.portaluiinfrastructure.intrinsicportlets.IntrinsicPortletModel
          extended by com.plumtree.portalpages.portlets.savedsearch.SavedSearchPortletModel
All Implemented Interfaces:
ISavedSearchPortletModelRO, IIntrinsicPortletModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IRepostModel, IPagination, IPaginationRO

public class SavedSearchPortletModel
extends IntrinsicPortletModel
implements ISavedSearchPortletModelRO, IRepostModel, IPagination, IPaginationRO

Author:
mikesample

Field Summary
static java.lang.String ADMIN_PREF_DISPLAY_FIELDS
           
static java.lang.String ADMIN_PREF_PARAMETERIC_PROPS
           
static int DATA_INDEX_DISPLAY_FIELDS
          Index of search ID in data array
static int DATA_INDEX_PARAMETERICIDS
          Index of search ID in data array
static int DATA_INDEX_SEARCHID
          Index of search ID in data array
static int DATA_INDEX_SEARCHTITLE
          Index of search title in data array
static int DATA_INDEX_SIMPLE
          Index of simple flag in data array
static int PROPINFO_INDEX_ID
          Index of Property ID in property info array
static int PROPINFO_INDEX_NAME
          Index of Property Name in property info array
static int PROPINFO_INDEX_ORIENT
          Index of UI Orientation (column or row) in property info array
static int PROPINFO_INDEX_TYPE
          Index of Property Type in property info array
static java.lang.String PROPINFO_ORIENT_COL
          orientation values - column
static java.lang.String PROPINFO_ORIENT_ROW
          orientation values - row
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the model
static java.lang.String strTitleKey
           
 
Fields inherited from class com.plumtree.portaluiinfrastructure.intrinsicportlets.IntrinsicPortletModel
m_asOwner, m_nContainerClassID, m_nContainerObjectID, m_nPageID, m_nPortletID, m_nPrefType, m_ptAppDataState, m_ptPortlet, m_ptSession, PREF_TYPE_ADMIN, PREF_TYPE_COMMUNITY, PREF_TYPE_PERSONAL, SETTINGSTYPE_ADMIN, SETTINGSTYPE_COMMUNITY, SETTINGSTYPE_COMMUNITYPORTLET, SETTINGSTYPE_PORTLET, SETTINGSTYPE_USER
 
Constructor Summary
SavedSearchPortletModel()
           
 
Method Summary
 void ClearParametericResults()
           
 boolean ControlExists()
          Returns true if the portlet has a control associated with it.
 Redirect ConvertSearchToQueryString()
           
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 JSDateTimePickerMgr GetDatePickerMgr()
           
 int GetFirstDisplayableItem()
          Returns the index of the first displayable item.
 IPTSearchResponse GetFollowupResponse()
           
 int GetItemsPerPage()
          Returns the user's desired results per page.
 java.lang.String GetName()
          Returns the Class name.
 java.lang.Object GetNewTempData()
          This method returns a new temporary data object.
 int GetNumDisplayableItems()
          Returns the number of results actually returned.
 PageMgr GetPageMgr()
           
 FilterIterator GetParametericFilterIterator()
           
 java.lang.String GetPortletName()
          Returns the portlet name
 Redirect GetRedirectAfterFinish()
          Returns the Redirect object (this is were we need to go at the end of the Editor).
 java.lang.Object[][] GetReturnedPropertyInfo()
           
 IPTSearchResponse GetSearchResponseObject()
           
 java.lang.Object[] GetSearchSettings()
           
 java.lang.String GetSortOrder()
          Returns the current sort order.
 int GetTotalItems()
          Returns the total number of items, some of which may not currently be displayable.
 int GetTotalMatches()
           
 void GoToPage(java.lang.String sortOrder, int firstItemOnPage, int pageSize, java.lang.Object additionalInfo)
          Go to another page.
 boolean HasParametericResults()
           
 void InitPortlet(IPTPageInfo _ptPageInfo, IPTState _ptAppDataState, IPTGadget _ptPortlet, int _nPortletID)
          Initializes the member variables of the portlet.
 boolean IsPaginationEnabled()
           
 boolean IsParameterized()
           
 boolean IsSubscriptionEnabled()
           
 boolean IsUserSubscribed()
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetParametericFilter(XPHashtable _htFormData)
           
 void SetSortOrder(int _nSortID)
           
 void SetSubscribe(int nValue)
           
 
Methods inherited from class com.plumtree.portaluiinfrastructure.intrinsicportlets.IntrinsicPortletModel
CleanupAllData, CleanupTempData, GetPortletID, GetSettingValue, GetSettingValues, Init, IsIntrinsicPortlet
 
Methods inherited from class com.plumtree.uiinfrastructure.activityspace.AClearModel
GetTempData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.portaluiinfrastructure.intrinsicportlets.IIntrinsicPortletModelRO
GetPortletID
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IModel
CleanupAllData, CleanupTempData, Init
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Class name for the model

See Also:
Constant Field Values

strTitleKey

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

ADMIN_PREF_DISPLAY_FIELDS

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

ADMIN_PREF_PARAMETERIC_PROPS

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

DATA_INDEX_SEARCHTITLE

public static final int DATA_INDEX_SEARCHTITLE
Index of search title in data array

See Also:
Constant Field Values

DATA_INDEX_SIMPLE

public static final int DATA_INDEX_SIMPLE
Index of simple flag in data array

See Also:
Constant Field Values

DATA_INDEX_SEARCHID

public static final int DATA_INDEX_SEARCHID
Index of search ID in data array

See Also:
Constant Field Values

DATA_INDEX_PARAMETERICIDS

public static final int DATA_INDEX_PARAMETERICIDS
Index of search ID in data array

See Also:
Constant Field Values

DATA_INDEX_DISPLAY_FIELDS

public static final int DATA_INDEX_DISPLAY_FIELDS
Index of search ID in data array

See Also:
Constant Field Values

PROPINFO_INDEX_ID

public static final int PROPINFO_INDEX_ID
Index of Property ID in property info array

See Also:
Constant Field Values

PROPINFO_INDEX_NAME

public static final int PROPINFO_INDEX_NAME
Index of Property Name in property info array

See Also:
Constant Field Values

PROPINFO_INDEX_TYPE

public static final int PROPINFO_INDEX_TYPE
Index of Property Type in property info array

See Also:
Constant Field Values

PROPINFO_INDEX_ORIENT

public static final int PROPINFO_INDEX_ORIENT
Index of UI Orientation (column or row) in property info array

See Also:
Constant Field Values

PROPINFO_ORIENT_COL

public static final java.lang.String PROPINFO_ORIENT_COL
orientation values - column

See Also:
Constant Field Values

PROPINFO_ORIENT_ROW

public static final java.lang.String PROPINFO_ORIENT_ROW
orientation values - row

See Also:
Constant Field Values
Constructor Detail

SavedSearchPortletModel

public SavedSearchPortletModel()
Method Detail

ControlExists

public boolean ControlExists()
Description copied from class: IntrinsicPortletModel
Returns true if the portlet has a control associated with it. This function should be implemented by the child class.

Specified by:
ControlExists in interface IIntrinsicPortletModelRO
Specified by:
ControlExists in class IntrinsicPortletModel
Returns:
See Also:
IIntrinsicPortletModelRO.ControlExists()

Create

public java.lang.Object Create()
Description copied from class: AClearModel
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class AClearModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

Finish

public void Finish()
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel

InitPortlet

public void InitPortlet(IPTPageInfo _ptPageInfo,
                        IPTState _ptAppDataState,
                        IPTGadget _ptPortlet,
                        int _nPortletID)
Description copied from class: IntrinsicPortletModel
Initializes the member variables of the portlet.

Overrides:
InitPortlet in class IntrinsicPortletModel
_ptAppDataState - AppDataState object
_ptPortlet - Portlet object
_nPortletID - Portlet ID

GetSearchSettings

public java.lang.Object[] GetSearchSettings()
Specified by:
GetSearchSettings in interface ISavedSearchPortletModelRO
Returns:

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class IntrinsicPortletModel
Returns:
String
See Also:
IMVCObject.GetName()

GetNewTempData

public java.lang.Object GetNewTempData()
Description copied from class: AClearModel
This method returns a new temporary data object. It is called at the beginning of a new HTTP Request. This method can perform initialization on the data object if necessary.

Specified by:
GetNewTempData in class AClearModel
Returns:

GetPortletName

public java.lang.String GetPortletName()
Returns the portlet name

Specified by:
GetPortletName in interface ISavedSearchPortletModelRO
Returns:
Portlet name

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Returns the Redirect object (this is were we need to go at the end of the Editor).

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Returns:
Redirect

GetSearchResponseObject

public IPTSearchResponse GetSearchResponseObject()
Specified by:
GetSearchResponseObject in interface ISavedSearchPortletModelRO
Returns:

IsSubscriptionEnabled

public boolean IsSubscriptionEnabled()
Specified by:
IsSubscriptionEnabled in interface ISavedSearchPortletModelRO
Returns:

IsUserSubscribed

public boolean IsUserSubscribed()
Specified by:
IsUserSubscribed in interface ISavedSearchPortletModelRO
Returns:

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Parameters:
_sPageName -
_htFormData -
Returns:

SetSubscribe

public void SetSubscribe(int nValue)
Parameters:
nValue -

SetParametericFilter

public void SetParametericFilter(XPHashtable _htFormData)

SetSortOrder

public void SetSortOrder(int _nSortID)

GetSortOrder

public java.lang.String GetSortOrder()
Description copied from interface: IPaginationRO
Returns the current sort order.

Specified by:
GetSortOrder in interface ISavedSearchPortletModelRO
Specified by:
GetSortOrder in interface IPaginationRO

GetFollowupResponse

public IPTSearchResponse GetFollowupResponse()
Specified by:
GetFollowupResponse in interface ISavedSearchPortletModelRO
Returns:

GetTotalMatches

public int GetTotalMatches()
Specified by:
GetTotalMatches in interface ISavedSearchPortletModelRO
Returns:

HasParametericResults

public boolean HasParametericResults()
Specified by:
HasParametericResults in interface ISavedSearchPortletModelRO
Returns:

ClearParametericResults

public void ClearParametericResults()

GetReturnedPropertyInfo

public java.lang.Object[][] GetReturnedPropertyInfo()
Specified by:
GetReturnedPropertyInfo in interface ISavedSearchPortletModelRO
Returns:

ConvertSearchToQueryString

public Redirect ConvertSearchToQueryString()
Specified by:
ConvertSearchToQueryString in interface ISavedSearchPortletModelRO
Returns:

GetParametericFilterIterator

public FilterIterator GetParametericFilterIterator()
Specified by:
GetParametericFilterIterator in interface ISavedSearchPortletModelRO
Returns:

GetPageMgr

public PageMgr GetPageMgr()
Specified by:
GetPageMgr in interface ISavedSearchPortletModelRO
Returns:

GetDatePickerMgr

public JSDateTimePickerMgr GetDatePickerMgr()
Specified by:
GetDatePickerMgr in interface ISavedSearchPortletModelRO
Returns:

IsParameterized

public boolean IsParameterized()
Specified by:
IsParameterized in interface ISavedSearchPortletModelRO
Returns:

IsPaginationEnabled

public boolean IsPaginationEnabled()
Specified by:
IsPaginationEnabled in interface ISavedSearchPortletModelRO
Returns:

GoToPage

public void GoToPage(java.lang.String sortOrder,
                     int firstItemOnPage,
                     int pageSize,
                     java.lang.Object additionalInfo)
Description copied from interface: IPagination
Go to another page.

Specified by:
GoToPage in interface IPagination
Parameters:
sortOrder - Sort order in which firstItemOnPage should be interpreted
firstItemOnPage - First item to appear on page (1-based)
pageSize - Desired number of items on page
additionalInfo - Additional application-specific info, if needed

GetFirstDisplayableItem

public int GetFirstDisplayableItem()
Description copied from interface: IPaginationRO
Returns the index of the first displayable item. On the first page of results, this will be 1; on subsequent pages it will be 11, 21, and so on (if there are 10 items per page).

Specified by:
GetFirstDisplayableItem in interface IPaginationRO

GetItemsPerPage

public int GetItemsPerPage()
Description copied from interface: IPaginationRO
Returns the user's desired results per page. This may differ from the number of currently displayable items if the total number of items is short or if the user is looking at the last page. or if the user is looking at the last result page.

Specified by:
GetItemsPerPage in interface IPaginationRO

GetNumDisplayableItems

public int GetNumDisplayableItems()
Description copied from interface: IPaginationRO
Returns the number of results actually returned.

Specified by:
GetNumDisplayableItems in interface IPaginationRO

GetTotalItems

public int GetTotalItems()
Description copied from interface: IPaginationRO
Returns the total number of items, some of which may not currently be displayable.

Specified by:
GetTotalItems in interface IPaginationRO



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