org.novadeck.jxla.data
Class SiteHistory

java.lang.Object
  |
  +--org.novadeck.jxla.data.SiteHistory
All Implemented Interfaces:
java.io.Serializable

public class SiteHistory
extends java.lang.Object
implements java.io.Serializable

This class is used to store information about site logs, in file using serialization. Contains all information about the current month, and summary information for old months

See Also:
Serialized Form

Constructor Summary
SiteHistory(java.lang.String name_site, java.util.Date last_record, java.util.Date first_record)
          simple construcor
 
Method Summary
 void addMonthSummary(MonthData m)
          add a month to be stored summarized
 boolean allReadyParse(java.util.Date d)
           
 java.util.Date getFirstRecordDate()
          Return first date of logs for this site
 MonthData getLastMonth()
          retrieve current month information.
 java.util.Date getLastRecordDate()
          Retrieve date of last line request parsed, during parsing, only log line with a date higher than this will used
 java.lang.String getName()
          retrieve site internal name
 java.lang.StringBuffer getSummary()
          Get xml summary as a string buffer
 void setLastMonth(MonthData m)
          set the month that has been finished ( current month ) to store all data for further use
 void updateLastRecordDate(java.util.Date d)
          set le last log date found for the current site
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteHistory

public SiteHistory(java.lang.String name_site,
                   java.util.Date last_record,
                   java.util.Date first_record)
simple construcor
Parameters:
name_site - internal host name
last_record - date of the last request made to this website
first_record - date of the first request mad to this website
Method Detail

addMonthSummary

public void addMonthSummary(MonthData m)
add a month to be stored summarized
Parameters:
m - month data

setLastMonth

public void setLastMonth(MonthData m)
set the month that has been finished ( current month ) to store all data for further use
Parameters:
m - last month found in log for the current site

getLastMonth

public MonthData getLastMonth()
retrieve current month information.
Returns:
current month information for the current site

updateLastRecordDate

public void updateLastRecordDate(java.util.Date d)
set le last log date found for the current site
Parameters:
d - higher date found in logs for the current site

getLastRecordDate

public java.util.Date getLastRecordDate()
Retrieve date of last line request parsed, during parsing, only log line with a date higher than this will used
Returns:
higher date of psat records found

getFirstRecordDate

public java.util.Date getFirstRecordDate()
Return first date of logs for this site
Returns:
date beginning logs for this site

getName

public java.lang.String getName()
retrieve site internal name
Returns:
site name

allReadyParse

public boolean allReadyParse(java.util.Date d)
Parameters:
d - date of request
Returns:
 

getSummary

public java.lang.StringBuffer getSummary()
Get xml summary as a string buffer
Returns:
Stringbuffer containing xml elements