com.plumtree.portalpages.admin.editors.savedsearch
Class SavedSearchModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.admin.editors.savedsearch.SavedSearchModel
All Implemented Interfaces:
ISavedSearchModelRO, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IFilterIteratorContainerRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class SavedSearchModel
extends ObjEditorModel
implements ISavedSearchModelRO

Author:
MikeS

Field Summary
static java.lang.String CLASSID_KDDOCUMENT
           
static java.lang.String CLASSID_KDFOLDER
           
static int DESTINATION_FOLDER_GROUP
           
static int INDEX_DISPLAYPROPID
           
static int INDEX_DISPLAYPROPNAME
           
static int INDEX_DISPLAYPROPTYPE
           
static int KDTYPES_DOCUMENTS
           
static int KDTYPES_FOLDERS
           
protected  XPArrayList m_ActionData
           
 java.lang.String m_lastAdmTreeSpaceId
           
 java.lang.String m_lastCatTreeSpaceId
           
 int m_nAction
           
protected  boolean m_sortAscending
           
static int REPOSITORY_SETTINGS_ALLDOCUMENTS
           
static int REPOSITORY_SETTINGS_ALLFOLDERS
           
static int REPOSITORY_SETTINGS_SUBFOLDERS
           
static int REPOSITORY_TYPES_ADMIN
           
static int REPOSITORY_TYPES_COLLAB
           
static int REPOSITORY_TYPES_CONTENT
           
static int REPOSITORY_TYPES_KD
           
static int SOURCE_FOLDER_GROUP
           
static java.lang.String STR_MVC_CLASS_NAME
           
static int TOTAL_GROUPS
           
 
Fields inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
EDITOR_CLASSID_UNKNOWN, EDITOR_FOLDERID_UNKNOWN, EDITOR_OBJECTID_UNKNOWN, EDITOR_QS_BOL_QS_FORCESAVEINFOLDER, EDITOR_QS_INT_CLASS_ID, EDITOR_QS_INT_QS_FOLDER_ID, EDITOR_QS_INT_QS_OBJECT_ID, m_bDisableDescription, m_bDisableSecurity, m_bForceSavedInSuppliedFolder, m_bIsSysAdmin, m_nClassID, m_nFolderID, m_nFolderType, m_nObjectID, m_ptObject, m_Session, m_sFolderName, OBJECT_NAME_TRUNCATE
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
isReadAccessAvailable, m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bEnableCancelButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
SavedSearchModel()
           
 
Method Summary
protected  void AddFolder(int intFolderType, int id)
          Helper function for adding a folder to the list of folders
 boolean AreClassIDsShown()
          Deprecated. ClassIDs are always shown.
 void BuildSavedSearchFromForm(XPHashtable form)
           
protected  void ClearActionData()
          Clears the m_ActionData member variable
protected  void ClearDeleteData(int intSize)
          Clears and recreates the hashtable member variable m_DeleteData
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  void DeleteFolder(java.lang.String strCheckboxName, int id)
          Deletes a folder
 void DoTaskAfterStore()
          That method contains the code that should be executed just after the object has been stored in the DB.
 void DoTaskBeforeStore()
          Code executed before the object is stored.
 void DoTaskOnChangePage(java.lang.String _sNewSpace, java.lang.String _sNewPage)
          This method can be implemented by classes extending this one.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 void DoTaskOnStartEditor(XPHashtable _htFormData)
          Code executed when the Editor is starting.
protected  void ExtractActionData_FoldersFromCheckboxes(java.lang.Object oCatalogPost, java.lang.Object oAdminPost)
           
protected  void ExtractActionData_FoldersFromTree(int intFolderType)
           
protected  java.lang.String ExtractOneElement(java.lang.Object o)
           
 IPTSearchResponse GenerateResponse()
           
protected  int GetAction()
           
 XPArrayList GetAdmFolderIDs()
           
 boolean GetApplyRecursive()
          Deprecated. @see GetRepositories() and REPOSITORY_SETTINGS_SUBFOLDERS
 XPArrayList GetCatFolderIDs()
           
 int[] GetDisplayFields()
           
 java.lang.Object[][] GetDisplayFieldsInfo()
           
 IFilterIteratorRO GetFilterIterator()
          Returns the current filter iterator.
 int GetKDTypes()
          Returns a bitmask of the enabled knowledge directory types.
 java.lang.String GetLastAdmTreeSpaceId()
           
 java.lang.String GetLastCatTreeSpaceId()
           
 int GetMaxResults()
           
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetPortletFormat()
          Deprecated. the portlet format & presentation style are now set via the portlet editor
 IASQueryResult GetProperties()
           
 int GetRepositories()
          Returns a bitmask of the enabled repositories.
 XPArrayList GetSelectedFolderIDs(int _type, boolean _accessible)
           
 java.lang.String GetSelectedOrderProp()
           
 boolean GetSortAscending()
           
 boolean IsAscending()
           
 boolean IsClassIDChecked(java.lang.String strID)
           
 boolean IsCollabInstalled()
           
 boolean IsContentInstalled()
           
 int LoadResultParameters(XPHashtable _htFormData)
           
 void OnAdd(int intFolderType)
          Add an element to the list of folders
 void OnCreatePortlet()
           
 void OnDel()
          Delete an element from the list of folders
 void OnSort()
           
protected  int RemoveGroupFromAction(int action)
           
protected  int SaveMainPage(XPHashtable _htFormData)
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 boolean ShouldRegenerate()
          Deprecated. we don't regenerate portlets anymore. instead, via a 'create portlet link', a portlet is created and added to an exp list. this method will always return false.
 void StartSelectPTObject()
          Helper method to start the Select PTObject List.
 boolean SubscriptionEnabled()
           
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, Finish, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, Init, InitIsSysAdminFlag, InitPTObject, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMemberVariablesFromQS, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, GetUserHasAccessToEditor, SetCloseOnDone, SetDeleteOnCancel, SetEditorType, SetEnableApplyButton, SetHideLeftNav, SetPageStatus, SetUserHasAccessToEditor
 
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.editor.IObjEditorModelRO
GetClassID, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession
 
Methods inherited from interface com.plumtree.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

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

SOURCE_FOLDER_GROUP

public static final int SOURCE_FOLDER_GROUP
See Also:
Constant Field Values

DESTINATION_FOLDER_GROUP

public static final int DESTINATION_FOLDER_GROUP
See Also:
Constant Field Values

TOTAL_GROUPS

public static final int TOTAL_GROUPS
See Also:
Constant Field Values

m_lastAdmTreeSpaceId

public java.lang.String m_lastAdmTreeSpaceId

m_lastCatTreeSpaceId

public java.lang.String m_lastCatTreeSpaceId

m_nAction

public int m_nAction

m_ActionData

protected XPArrayList m_ActionData

m_sortAscending

protected boolean m_sortAscending

KDTYPES_FOLDERS

public static final int KDTYPES_FOLDERS
See Also:
Constant Field Values

KDTYPES_DOCUMENTS

public static final int KDTYPES_DOCUMENTS
See Also:
Constant Field Values

REPOSITORY_TYPES_KD

public static final int REPOSITORY_TYPES_KD
See Also:
Constant Field Values

REPOSITORY_TYPES_ADMIN

public static final int REPOSITORY_TYPES_ADMIN
See Also:
Constant Field Values

REPOSITORY_TYPES_COLLAB

public static final int REPOSITORY_TYPES_COLLAB
See Also:
Constant Field Values

REPOSITORY_TYPES_CONTENT

public static final int REPOSITORY_TYPES_CONTENT
See Also:
Constant Field Values

REPOSITORY_SETTINGS_ALLFOLDERS

public static final int REPOSITORY_SETTINGS_ALLFOLDERS
See Also:
Constant Field Values

REPOSITORY_SETTINGS_ALLDOCUMENTS

public static final int REPOSITORY_SETTINGS_ALLDOCUMENTS
See Also:
Constant Field Values

REPOSITORY_SETTINGS_SUBFOLDERS

public static final int REPOSITORY_SETTINGS_SUBFOLDERS
See Also:
Constant Field Values

CLASSID_KDFOLDER

public static final java.lang.String CLASSID_KDFOLDER

CLASSID_KDDOCUMENT

public static final java.lang.String CLASSID_KDDOCUMENT

INDEX_DISPLAYPROPID

public static final int INDEX_DISPLAYPROPID
See Also:
Constant Field Values

INDEX_DISPLAYPROPTYPE

public static final int INDEX_DISPLAYPROPTYPE
See Also:
Constant Field Values

INDEX_DISPLAYPROPNAME

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

SavedSearchModel

public SavedSearchModel()
Method Detail

AreClassIDsShown

public boolean AreClassIDsShown()
Deprecated. ClassIDs are always shown.

Specified by:
AreClassIDsShown in interface ISavedSearchModelRO
Returns:

BuildSavedSearchFromForm

public void BuildSavedSearchFromForm(XPHashtable form)
Parameters:
form -

GetFilterIterator

public IFilterIteratorRO GetFilterIterator()
Returns the current filter iterator.

Specified by:
GetFilterIterator in interface IFilterIteratorContainerRO
Returns:
the current filter iterator.

Create

public java.lang.Object Create()
Description copied from class: EditorModel
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 EditorModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DoTaskBeforeStore

public void DoTaskBeforeStore()
Code executed before the object is stored.

Overrides:
DoTaskBeforeStore in class EditorModel

DoTaskAfterStore

public void DoTaskAfterStore()
Description copied from class: EditorModel
That method contains the code that should be executed just after the object has been stored in the DB.

Overrides:
DoTaskAfterStore in class EditorModel

DoTaskOnStartEditor

public void DoTaskOnStartEditor(XPHashtable _htFormData)
Code executed when the Editor is starting.

Overrides:
DoTaskOnStartEditor in class EditorModel
Parameters:
_htFormData -

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
Description copied from class: ObjEditorModel
This method will be called when you come back to the main Editor from a sub Editor.

Overrides:
DoTaskOnComeBackFromSubEditor in class ObjEditorModel

DoTaskOnChangePage

public void DoTaskOnChangePage(java.lang.String _sNewSpace,
                               java.lang.String _sNewPage)
Description copied from class: EditorModel
This method can be implemented by classes extending this one. It will be executed each time the user changes page on the left navigation menu.

Overrides:
DoTaskOnChangePage in class EditorModel

StartSelectPTObject

public void StartSelectPTObject()
Helper method to start the Select PTObject List.


GenerateResponse

public IPTSearchResponse GenerateResponse()
Specified by:
GenerateResponse in interface ISavedSearchModelRO
Returns:

GetAdmFolderIDs

public XPArrayList GetAdmFolderIDs()
Specified by:
GetAdmFolderIDs in interface ISavedSearchModelRO
Returns:

GetCatFolderIDs

public XPArrayList GetCatFolderIDs()
Specified by:
GetCatFolderIDs in interface ISavedSearchModelRO
Returns:

GetSelectedFolderIDs

public XPArrayList GetSelectedFolderIDs(int _type,
                                        boolean _accessible)
Specified by:
GetSelectedFolderIDs in interface ISavedSearchModelRO
Returns:

GetLastAdmTreeSpaceId

public java.lang.String GetLastAdmTreeSpaceId()
Specified by:
GetLastAdmTreeSpaceId in interface ISavedSearchModelRO
Returns:

GetLastCatTreeSpaceId

public java.lang.String GetLastCatTreeSpaceId()
Specified by:
GetLastCatTreeSpaceId in interface ISavedSearchModelRO
Returns:

GetRepositories

public int GetRepositories()
Description copied from interface: ISavedSearchModelRO
Returns a bitmask of the enabled repositories. Possible Repositories: SavedSearchModel.REPOSITORY_KD SavedSearchModel.REPOSITORY_ADMIN SavedSearchModel.REPOSITORY_COLLAB SavedSearchModel.REPOSITORY_CONTENT

Specified by:
GetRepositories in interface ISavedSearchModelRO
Returns:
bitmask of enabled repsitories.

GetKDTypes

public int GetKDTypes()
Description copied from interface: ISavedSearchModelRO
Returns a bitmask of the enabled knowledge directory types. Possible KD Types: SavedSearchModel.KDTYPES_FOLDERS SavedSearchModel.KDTYPES_DOCUMENTS

Specified by:
GetKDTypes in interface ISavedSearchModelRO
Returns:
bitmask of enabled knowledge directory types.

GetMaxResults

public int GetMaxResults()
Specified by:
GetMaxResults in interface ISavedSearchModelRO
Returns:

GetName

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

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorModel
Returns:
String

GetPortletFormat

public java.lang.String GetPortletFormat()
Deprecated. the portlet format & presentation style are now set via the portlet editor

Specified by:
GetPortletFormat in interface ISavedSearchModelRO
Returns:

GetSelectedOrderProp

public java.lang.String GetSelectedOrderProp()
Specified by:
GetSelectedOrderProp in interface ISavedSearchModelRO
Returns:

GetSortAscending

public boolean GetSortAscending()
Specified by:
GetSortAscending in interface ISavedSearchModelRO
Returns:

IsAscending

public boolean IsAscending()
Specified by:
IsAscending in interface ISavedSearchModelRO
Returns:

IsClassIDChecked

public boolean IsClassIDChecked(java.lang.String strID)
Specified by:
IsClassIDChecked in interface ISavedSearchModelRO
Parameters:
strID -
Returns:

LoadResultParameters

public int LoadResultParameters(XPHashtable _htFormData)
Parameters:
_htFormData -

OnAdd

public void OnAdd(int intFolderType)
Add an element to the list of folders


OnDel

public void OnDel()
Delete an element from the list of folders


OnSort

public void OnSort()

OnCreatePortlet

public void OnCreatePortlet()

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
Overrides:
SavePage in class ObjEditorModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

ShouldRegenerate

public boolean ShouldRegenerate()
Deprecated. we don't regenerate portlets anymore. instead, via a 'create portlet link', a portlet is created and added to an exp list. this method will always return false.

Specified by:
ShouldRegenerate in interface ISavedSearchModelRO
Returns:

SubscriptionEnabled

public boolean SubscriptionEnabled()
Specified by:
SubscriptionEnabled in interface ISavedSearchModelRO
Returns:

AddFolder

protected void AddFolder(int intFolderType,
                         int id)
Helper function for adding a folder to the list of folders

Parameters:
intFolderType - - The type of folder, Catalog or Admin
id - The ID of the folder

ClearActionData

protected void ClearActionData()
Clears the m_ActionData member variable


ClearDeleteData

protected void ClearDeleteData(int intSize)
Clears and recreates the hashtable member variable m_DeleteData

Parameters:
intSize - - The size of the new hash table

DeleteFolder

protected void DeleteFolder(java.lang.String strCheckboxName,
                            int id)
Deletes a folder

Parameters:
id -

ExtractActionData_FoldersFromCheckboxes

protected void ExtractActionData_FoldersFromCheckboxes(java.lang.Object oCatalogPost,
                                                       java.lang.Object oAdminPost)
Parameters:
o -

ExtractActionData_FoldersFromTree

protected void ExtractActionData_FoldersFromTree(int intFolderType)

ExtractOneElement

protected java.lang.String ExtractOneElement(java.lang.Object o)
Parameters:
o -
Returns:

GetAction

protected int GetAction()
Returns:

RemoveGroupFromAction

protected int RemoveGroupFromAction(int action)
Parameters:
action -
Returns:

SaveMainPage

protected int SaveMainPage(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

GetProperties

public IASQueryResult GetProperties()
Specified by:
GetProperties in interface ISavedSearchModelRO
Returns:

GetDisplayFieldsInfo

public java.lang.Object[][] GetDisplayFieldsInfo()
Specified by:
GetDisplayFieldsInfo in interface ISavedSearchModelRO
Returns:

GetDisplayFields

public int[] GetDisplayFields()
Specified by:
GetDisplayFields in interface ISavedSearchModelRO
Returns:

IsCollabInstalled

public boolean IsCollabInstalled()
Specified by:
IsCollabInstalled in interface ISavedSearchModelRO

IsContentInstalled

public boolean IsContentInstalled()
Specified by:
IsContentInstalled in interface ISavedSearchModelRO

GetApplyRecursive

public boolean GetApplyRecursive()
Deprecated. @see GetRepositories() and REPOSITORY_SETTINGS_SUBFOLDERS

returns whether the folder limitations should be applied recursively to subfolders.

Specified by:
GetApplyRecursive in interface ISavedSearchModelRO
Returns:



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