Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface SearchQueryLogger


public interface SearchQueryLogger

This interface provides methods to retrieve query objects previously used for searching.

See Also:
SearchQuery

Method Summary
 void deleteSearchQueries(User user)
          Delete all logged search queries for the given user
 Map<String,?> getLoggedSearchQueryInfo(SearchQuery searchQuery)
          Returns the logged information about the query, or null if the query has not been logged yet.
 JiveIterator<SearchQuery> getSearchQueries()
          Returns an iterable of all the queries that have been made.
 JiveIterator<SearchQuery> getSearchQueries(User user)
          Returns an Iterable consisting of all the SearchQuery's that the specified user has made.
 SearchQuery getSearchQuery(long queryID)
          Returns the query associated with the given queryID.
 int getSearchQueryCount()
          Returns a count of all the queries that have been made in the system.
 int getSearchQueryCount(User user)
          Returns a count of all the queries that the user has made.
 

Method Detail

getSearchQueryCount

int getSearchQueryCount()
                        throws UnauthorizedException
Returns a count of all the queries that have been made in the system.

Returns:
a count of all the queries that have been made in the system.
Throws:
UnauthorizedException - if not a System Administrator

getSearchQueryCount

int getSearchQueryCount(User user)
                        throws UnauthorizedException
Returns a count of all the queries that the user has made.

Parameters:
user - the user to return the query count for.
Returns:
a count of all the queries that the user has made.
Throws:
UnauthorizedException - if not a System Administrator or the specified user.

getSearchQueries

JiveIterator<SearchQuery> getSearchQueries()
                                           throws UnauthorizedException
Returns an iterable of all the queries that have been made. The returned Iterable will return SearchQuery objects ordered by search date with the most recent search first and oldest last.

Returns:
an iterable of all the queries that have been made.
Throws:
UnauthorizedException - if not a System Administrator

getSearchQueries

JiveIterator<SearchQuery> getSearchQueries(User user)
                                           throws UnauthorizedException
Returns an Iterable consisting of all the SearchQuery's that the specified user has made. The returned Iterable will return SearchQuery objects ordered by search date with the most recent search first and oldest last.

Parameters:
user - the user to return the query count for.
Returns:
an Iterable consisting of all the SearchQuery's that the specified user has made.
Throws:
UnauthorizedException - if not a System Administrator or the specified user.

getSearchQuery

SearchQuery getSearchQuery(long queryID)
                           throws NotFoundException,
                                  UnauthorizedException
Returns the query associated with the given queryID.

Parameters:
queryID - the id of the query to retrieve
Returns:
the search query
Throws:
NotFoundException - if the query associated with the queryID cannot be found.
UnauthorizedException - if not the user who issued the query or an administrator.

getLoggedSearchQueryInfo

Map<String,?> getLoggedSearchQueryInfo(SearchQuery searchQuery)
Returns the logged information about the query, or null if the query has not been logged yet. The returned Map will have the following:

Key (String) Value
searchDurationInteger
numResultsInteger
searchDateDate
communityIDslong[]
criteriacriteria.toString()

Parameters:
searchQuery - the search query to return the logged query info for
Returns:
a map of the logged query info.

deleteSearchQueries

void deleteSearchQueries(User user)
Delete all logged search queries for the given user

Parameters:
user - the user to delete all logged search queries for

Jive Product Page

Copyright © 1999-2007 Jive Software.