org.dspace.app.statistics
Class LogLine

java.lang.Object
  extended by org.dspace.app.statistics.LogLine

public class LogLine
extends Object

This class represents a single log file line and the operations that can be performed on it The components that it represents are: Date, Level, User, Action, and additional Params

Author:
Richard Jones

Method Summary
 boolean afterDate(Date date)
          find out if this log file line is after the given date
 boolean beforeDate(Date date)
          find out if this log file line is before the given date
 String getAction()
          get the action being performed
 Date getDate()
          get the date of the log line
 String getLevel()
          get the level of this log line
 String getParams()
          get the parameters associated with the action
 String getUser()
          get the user performing the logged action
 boolean isAction(String action)
          find out if the log line is of the given action.
 boolean isLevel(String level)
          find out if the log line is of the given level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDate

public Date getDate()
get the date of the log line

Returns:
the date of this log line

getLevel

public String getLevel()
get the level of this log line

Returns:
the level of the log line

getUser

public String getUser()
get the user performing the logged action

Returns:
the user performing the logged action

getAction

public String getAction()
get the action being performed

Returns:
the logged action

getParams

public String getParams()
get the parameters associated with the action

Returns:
the parameters associated with the action

beforeDate

public boolean beforeDate(Date date)
find out if this log file line is before the given date

Parameters:
date - the date to be compared to
Returns:
true if the line is before the given date, false if not

afterDate

public boolean afterDate(Date date)
find out if this log file line is after the given date

Parameters:
date - the date to be compared to
Returns:
true if the line is after the given date, false if not

isLevel

public boolean isLevel(String level)
find out if the log line is of the given level. Levels are either INFO, WARN or ERROR

Parameters:
level - the level we want to test for
Returns:
true if the line is of the specified level, false if not

isAction

public boolean isAction(String action)
find out if the log line is of the given action. Actions are not directly constrained by the vocabulary, and any system module may define any action name for its behaviour

Parameters:
action - the action we want to test for
Returns:
true if the line is of the specified action, false if not


Copyright © 2010 DuraSpace. All Rights Reserved.