org.blojsom.plugin.referer
Class BlogRefererGroup

java.lang.Object
  extended byorg.blojsom.plugin.referer.BlogRefererGroup

public class BlogRefererGroup
extends java.lang.Object

BlogRefererGroup

This plugin manages either a flavor based hitcounter or a group of referers

Version:
$Id: BlogRefererGroup.java,v 1.4 2006/01/04 16:53:12 czarneckid Exp $
Author:
Mark Lussier

Constructor Summary
BlogRefererGroup(boolean ishitcount)
          BlogRefererGroup constructor
 
Method Summary
 void addHitCount(java.util.Date date)
          Add a hit count for a given date
 void addHitCount(java.util.Date date, int count)
          Add a hit count for the given date
 void addReferer(java.lang.String flavor, java.lang.String url, java.util.Date date)
          Add a referer to this referer group
 void addReferer(java.lang.String flavor, java.lang.String url, java.util.Date date, int total)
          Add a referral to this group
 java.lang.Object get(java.lang.Object key)
          Get a referer from the group for a given key (URL)
 java.util.Date getLastReferralDate()
          Get the date of the last referel for a hitcounter
 int getReferralCount()
          Get the total referer count
 boolean isHitCounter()
          Check whether or not this blog referer group collects hits
 java.util.Set keySet()
          Return the keys for the referer groups
 int size()
          Return the number of referral groups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogRefererGroup

public BlogRefererGroup(boolean ishitcount)
BlogRefererGroup constructor

Parameters:
ishitcount - Whether or not this is a hit counter group
Method Detail

addReferer

public void addReferer(java.lang.String flavor,
                       java.lang.String url,
                       java.util.Date date)
Add a referer to this referer group

Parameters:
flavor - Flavor
url - URL
date - Date of the referral

addHitCount

public void addHitCount(java.util.Date date)
Add a hit count for a given date

Parameters:
date - Date of referral

addHitCount

public void addHitCount(java.util.Date date,
                        int count)
Add a hit count for the given date

Parameters:
date - Date
count - New hit count

addReferer

public void addReferer(java.lang.String flavor,
                       java.lang.String url,
                       java.util.Date date,
                       int total)
Add a referral to this group

Parameters:
flavor - Flavor
url - URL
date - Date
total - Total number of hits

size

public int size()
Return the number of referral groups

Returns:
Number of blog referer groups

get

public java.lang.Object get(java.lang.Object key)
Get a referer from the group for a given key (URL)

Parameters:
key - Referer key
Returns:
BlogReferer for the given key (URL)

keySet

public java.util.Set keySet()
Return the keys for the referer groups

Returns:
Keys for the referer groups

getReferralCount

public int getReferralCount()
Get the total referer count

Returns:
Total referer count

isHitCounter

public boolean isHitCounter()
Check whether or not this blog referer group collects hits

Returns:

getLastReferralDate

public java.util.Date getLastReferralDate()
Get the date of the last referel for a hitcounter

Returns:
Last hit date