org.wso2.carbon.registry.core
Class LogEntryCollection

java.lang.Object
  extended by org.wso2.carbon.registry.core.LogEntryCollection

public class LogEntryCollection
extends Object

The main purpose of this class is to handle pagination for log entries. From the registry API it will returns LogEntryCollection , and from the LogEntryCollection user can get all the logs or he can ask for log for a given range


Constructor Summary
LogEntryCollection()
           
 
Method Summary
 DataAccessManager getDataAccessManager()
          Get the data access manager associated with the log entry.
 int getLogCount()
          Get the count of the log entries.
 LogEntry[] getLogEntries()
          Returns an array of log entries filtered by the provided information.
 LogEntry[] getLogEntries(int start, int pageLen)
          Returns an array of log entries filtered by the provided information and in the provided range.
 void setAction(int action)
          Method to set the action to filter with.
 void setDataAccessManager(DataAccessManager dataAccessManager)
          Set the data access manager associated with the log entry.
 void setFrom(Date from)
          Method to set the from date to filter with.
 void setLogCount(int logCount)
          Method to set the count of the log entries.
 void setRecentFirst(boolean recentFirst)
          Set whether the returned entries should be ordered so the recent one is appeared first.
 void setResourcePath(String resourcePath)
          Method to set the resource path to filter with.
 void setTo(Date to)
          Method to set the to date to filter with.
 void setUserName(String userName)
          Method to set the user name to filter with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogEntryCollection

public LogEntryCollection()
Method Detail

getLogCount

public int getLogCount()
Get the count of the log entries.

Returns:
the count of the log entries

setLogCount

public void setLogCount(int logCount)
Method to set the count of the log entries.

Parameters:
logCount - the count of the log entries

getLogEntries

public LogEntry[] getLogEntries()
                         throws RegistryException
Returns an array of log entries filtered by the provided information.

Returns:
an array of log entries.
Throws:
RegistryException - throws if the operation fail.

getLogEntries

public LogEntry[] getLogEntries(int start,
                                int pageLen)
                         throws RegistryException
Returns an array of log entries filtered by the provided information and in the provided range.

Parameters:
start - the start of the range.
pageLen - number of items to return.
Returns:
an array of log entries.
Throws:
RegistryException - throws if the operation fail.

getDataAccessManager

public DataAccessManager getDataAccessManager()
Get the data access manager associated with the log entry.

Returns:
the data access manager.

setDataAccessManager

public void setDataAccessManager(DataAccessManager dataAccessManager)
Set the data access manager associated with the log entry.

Parameters:
dataAccessManager - the data access manager.

setResourcePath

public void setResourcePath(String resourcePath)
Method to set the resource path to filter with.

Parameters:
resourcePath - the resource path.

setAction

public void setAction(int action)
Method to set the action to filter with.

Parameters:
action - the action.

setUserName

public void setUserName(String userName)
Method to set the user name to filter with.

Parameters:
userName - the user name.

setFrom

public void setFrom(Date from)
Method to set the from date to filter with.

Parameters:
from - the from date.

setTo

public void setTo(Date to)
Method to set the to date to filter with.

Parameters:
to - the 'to' date.

setRecentFirst

public void setRecentFirst(boolean recentFirst)
Set whether the returned entries should be ordered so the recent one is appeared first.

Parameters:
recentFirst - whether the returned entries should be ordered or not.


Copyright © 2014 WSO2 Inc. All Rights Reserved.