com.plumtree.server
Interface IPTSavedSearch

All Superinterfaces:
IPTLocalizable, IPTObject, IPTServerContext, IPTStorable, IPTUnknown

public interface IPTSavedSearch
extends IPTObject

Version:
$Revision$
Author:
Stephen Chang

Method Summary
 IPTSearchResponse FollowupSearch(int _iUserID, int _lPropertyID, int _lSkipResults, IPTFilter _spFollowupFilter)
          creates a follow up query based on filter and 'Ands' follow up qry with original query in a follow up Search call.
 java.lang.Object[] GetReturnProps()
          Returns the props that have been returned via the search.
 IPTSearchQuery GetSearchQuery()
          Retrieves the Search Query.
 IPTSearchRequest GetSearchRequest()
          Returns an interface to the Search Request.
 boolean GetSubscriptionEnabled()
          Returns whether the storage and retrieval of Subscriber userIDs is supported on this SavedSearch object
 boolean IsSubscribed(int lUserID)
          Checks whether a User is a subscriber to this SavedSearch
 IPTQueryResult QueryPortletList()
          Returns the list of portlets that reference this query.
 int[] RetrieveSubscribedUsers()
          Retrieves all Users subscribed to this SavedSearch
 IPTSearchResponse SearchAsUser(int lUserID)
          Executes the search as a specified user.
 void SetReturnProps(int[] _aReturnProps)
          Sets the props that will be used as PT_SEARCH_SETTING.PT_SEARCHSETTING_RET_PROPS in the search.
 void SetSearchQuery(IPTSearchQuery Value)
          Sets the SearchQuery.
 void SetSearchRequest(IPTSearchRequest Value)
          Set the member Search Request object and marks the object as dirty.
 void SetSubscriptionEnabled(boolean Value)
          Sets whether the storage and retrieval of Subscriber userIDs is supported on this SavedSearch object
 int StoreResultPortlet(java.lang.String bstrTitle, int Type, boolean bSimple)
          Creates a Portlet corresponding to this SavedSearch which can be used to view its results
 void SubscribeUser(int lUserID)
          Adds a user id to the list of userIDs serialized with the SavedSearch object which can then be retrieved later.
 void UnSubscribeUser(int lUserID)
          Removes a user id from the list of userIDs serialized with the SavedSearch object
 
Methods inherited from interface com.plumtree.server.IPTObject
GetAdminFolderID, GetClassID, GetCreated, GetImageUUID, GetLastModified, GetObjectProperties, SetAdminFolderID, SetImageUUID, SetLastModified
 
Methods inherited from interface com.plumtree.server.IPTLocalizable
GetDescription, GetIsLocalized, GetLocalizedDescription, GetLocalizedDescriptions, GetLocalizedName, GetLocalizedNames, GetName, GetPrimaryLang, GetSupportsLocalization, SetDescription, SetIsLocalized, SetLocalizedDescriptions, SetLocalizedNames, SetName, SetPrimaryLang
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 
Methods inherited from interface com.plumtree.server.IPTServerContext
GetAccessLevel, GetACL, GetLastModifiedBy, GetLockState, GetObjectID, GetOwnerID, GetServerContextSettings, GetSession, GetSettings, LockObject, SetLastModifiedBy, SetObjectID, SetOwnerID, SetServerContextSettings, SetSettings, UnlockObject
 
Methods inherited from interface com.plumtree.server.IPTStorable
Store
 

Method Detail

GetSearchRequest

IPTSearchRequest GetSearchRequest()
Returns an interface to the Search Request.

Returns:
IPTSearchRequest

SetSearchRequest

void SetSearchRequest(IPTSearchRequest Value)
Set the member Search Request object and marks the object as dirty.

Parameters:
Value - new IPTSearchRequest to be set

GetSearchQuery

IPTSearchQuery GetSearchQuery()
Retrieves the Search Query. New SavedSearches will throw an exception if the SearchQuery has not yet been set.

Returns:
IPTSearchQuery

SetSearchQuery

void SetSearchQuery(IPTSearchQuery Value)
Sets the SearchQuery. This will be the query from which the Filter is extracted.

Parameters:
Value - IPTSearchQuery to be set

SearchAsUser

IPTSearchResponse SearchAsUser(int lUserID)
Executes the search as a specified user. Must be an administrator to use this method.

Parameters:
lUserID - userID of the user to search by
Returns:
Search results as an IPTSearchResponse.

StoreResultPortlet

int StoreResultPortlet(java.lang.String bstrTitle,
                       int Type,
                       boolean bSimple)
Creates a Portlet corresponding to this SavedSearch which can be used to view its results

Parameters:
bstrTitle - Portlet title
Type - Portlet type (personal or community)
bSimple - should results be name only?
Returns:
portletID

SubscribeUser

void SubscribeUser(int lUserID)
Adds a user id to the list of userIDs serialized with the SavedSearch object which can then be retrieved later.

Parameters:
lUserID - userID of the subscriber

UnSubscribeUser

void UnSubscribeUser(int lUserID)
Removes a user id from the list of userIDs serialized with the SavedSearch object

Parameters:
lUserID - userID of the unsubscriber

RetrieveSubscribedUsers

int[] RetrieveSubscribedUsers()
Retrieves all Users subscribed to this SavedSearch

Returns:
array of all Users subscribed to this SavedSearch

IsSubscribed

boolean IsSubscribed(int lUserID)
Checks whether a User is a subscriber to this SavedSearch

Parameters:
lUserID - userID of the subscriber
Returns:
whether the User is subscribed to this SavedSearch

GetSubscriptionEnabled

boolean GetSubscriptionEnabled()
Returns whether the storage and retrieval of Subscriber userIDs is supported on this SavedSearch object

Returns:
whether or not subscription is enabled for this object

SetSubscriptionEnabled

void SetSubscriptionEnabled(boolean Value)
Sets whether the storage and retrieval of Subscriber userIDs is supported on this SavedSearch object

Parameters:
Value - whether or not subscription should be enabled for this object

GetReturnProps

java.lang.Object[] GetReturnProps()
Returns the props that have been returned via the search.

Returns:
object array of property id Integers

SetReturnProps

void SetReturnProps(int[] _aReturnProps)
Sets the props that will be used as PT_SEARCH_SETTING.PT_SEARCHSETTING_RET_PROPS in the search.

Parameters:
int - array of property ids

FollowupSearch

IPTSearchResponse FollowupSearch(int _iUserID,
                                 int _lPropertyID,
                                 int _lSkipResults,
                                 IPTFilter _spFollowupFilter)
creates a follow up query based on filter and 'Ands' follow up qry with original query in a follow up Search call. The followup qry can also be ordered by a sortable property id. If the propid is specified but the filter is null, this has the effect of reordering the original qry.

Parameters:
id - of user doing follow up search
property - id to sort by or 0 to not specifiy
number - of results to skip @see PT_SEARCH_SETTING.PT_SEARCHSETTING_SKIPRESULTS
follow - up query or null
Returns:
response from search server.

QueryPortletList

IPTQueryResult QueryPortletList()
Returns the list of portlets that reference this query. Use PT_PROPIDS.PT_PROPID_CLASSID and PT_PROPIDS.PT_PROPID_OBJECTID

Returns:
a QueryResult containing the object ID, and class ID of portlets referencing this query