Jive Forums API (5.5.20.2-oracle) Core Javadocs

com.jivesoftware.forum
Interface QueryLogger


public interface QueryLogger

This manager provides methods to retrieve query objects previously used for searching either the whole system or just in particular forums.

Since:
4.0

Method Summary
 java.util.Map getLoggedQueryInfo(Query query)
          Returns the logged information about the query, or null if the query has not been logged yet.
 java.util.Iterator getQueries()
          Returns an iterator of all the queries that have been made.
 java.util.Iterator getQueries(User user)
          Returns an Iterator consisting of all the Query's that the specified user has made.
 Query getQuery(long queryID)
          Returns the query associated with the given queryID.
 int getQueryCount()
          Returns a count of all the queries that have been made in the system.
 int getQueryCount(User user)
          Returns a count of all the queries that the user has made.
 

Method Detail

getQueryCount

int getQueryCount()
                  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

getQueryCount

int getQueryCount(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.

getQueries

java.util.Iterator getQueries()
                              throws UnauthorizedException
Returns an iterator of all the queries that have been made. The returned Iterator will return Query objects ordered by search date with the most recent search first and oldest last.

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

getQueries

java.util.Iterator getQueries(User user)
                              throws UnauthorizedException
Returns an Iterator consisting of all the Query's that the specified user has made. The returned Iterator will return Query 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 Iterator consisting of all the Query's that the specified user has made.
Throws:
UnauthorizedException - if not a System Administrator or the specified user.

getQuery

Query getQuery(long queryID)
               throws NotFoundException,
                      UnauthorizedException
Returns the query associated with the given queryID.

Parameters:
queryID - the id of the query to retrieve
Returns:
the 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.

getLoggedQueryInfo

java.util.Map getLoggedQueryInfo(Query query)
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
categoriesKbCategory[] or null if none specified (searching all categories)

Parameters:
query -
Returns:
a map of the logged query info.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.