|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.proxy.QueryLoggerProxy
public class QueryLoggerProxy
A protection proxy for the QueryLogger. A proxy has a set of permissions that are specified at creation time of the proxy. Subsequently, those permissions are use to restrict access to protected methods. If a user does not have the right to execute a particular method, an UnauthorizedException is thrown.
QueryLogger
,
Permissions
,
UnauthorizedException
Constructor Summary | |
---|---|
QueryLoggerProxy(QueryLogger queryLogger,
AuthToken auth,
Permissions permissions)
Creates a new QueryLoggerProxy object. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryLoggerProxy(QueryLogger queryLogger, AuthToken auth, Permissions permissions)
queryLogger
- the QueryLogger to protect by proxyauth
- the user's authorization tokenpermissions
- the permissions to use with this proxyMethod Detail |
---|
public int getQueryCount() throws UnauthorizedException
QueryLogger
getQueryCount
in interface QueryLogger
UnauthorizedException
- if not a System Administratorpublic int getQueryCount(User user) throws UnauthorizedException
QueryLogger
getQueryCount
in interface QueryLogger
user
- the user to return the query count for.
UnauthorizedException
- if not a System Administrator or the specified user.public java.util.Iterator getQueries() throws UnauthorizedException
QueryLogger
getQueries
in interface QueryLogger
UnauthorizedException
- if not a System Administratorpublic java.util.Iterator getQueries(User user) throws UnauthorizedException
QueryLogger
getQueries
in interface QueryLogger
user
- the user to return the query count for.
UnauthorizedException
- if not a System Administrator or the specified user.public Query getQuery(long queryID) throws NotFoundException, UnauthorizedException
QueryLogger
getQuery
in interface QueryLogger
queryID
- the id of the query to retrieve
NotFoundException
- if the query associated with the queryID cannot be found.
UnauthorizedException
- if not the user who issued the query or an administrator.public java.util.Map getLoggedQueryInfo(Query query)
QueryLogger
Key (String) | Value |
---|---|
searchDuration | Integer |
numResults | Integer |
searchDate | Date |
categories | KbCategory[] or null if none specified (searching all categories) |
getLoggedQueryInfo
in interface QueryLogger
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |