pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.aggregator
Class UserAgentPerVisitAggregator

java.lang.Object
  extended by org.torweg.pulse.component.statistics.aggregator.AbstractBaseAggregator
      extended by org.torweg.pulse.component.statistics.aggregator.AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
          extended by org.torweg.pulse.component.statistics.aggregator.UserAgentPerVisitAggregator

public final class UserAgentPerVisitAggregator
extends AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>

Aggregates information about the UserAgent.

Version:
$Revision: 1541 $
Author:
Daniel Dietz

Constructor Summary
UserAgentPerVisitAggregator()
           
 
Method Summary
protected  UserAgentPerVisitAggregation getAbstractRegexVersionedCounterAggregation(UserAgent userAgent, Visit visit, Duration fullDay, org.hibernate.Session s)
          Tries to load a matching UserAgentPerVisitAggregation for the given UserAgent, the given Visit and the given Duration.
protected  java.lang.String getCheckValue(Visit visit)
          Returns the "user-agent-string" from the given Visit.
protected  java.util.List<UserAgent> getKnownAbstractRegexVersioneds(org.hibernate.Session s)
          Returns all the known UserAgents.
protected  UserAgentPerVisitAggregation getNewAbstractRegexVersionedCounterAggregation(UserAgent userAgent, Visit visit, Duration fullDay)
          Returns a new UserAgentPerVisitAggregation for the given UserAgent, the given Visit and the given Duration.
protected  UserAgent getUnknownAbstractRegexVersioned(org.hibernate.Session s)
          Returns the UserAgent which represents the "unknown".
 
Methods inherited from class org.torweg.pulse.component.statistics.aggregator.AbstractRegexVersionedPerVisitAggregator
aggregate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAgentPerVisitAggregator

public UserAgentPerVisitAggregator()
Method Detail

getKnownAbstractRegexVersioneds

protected java.util.List<UserAgent> getKnownAbstractRegexVersioneds(org.hibernate.Session s)
Returns all the known UserAgents.

Specified by:
getKnownAbstractRegexVersioneds in class AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
Parameters:
s - the current HibernateTM-Session
Returns:
List&lt;UserAgent&gt;
See Also:
#getKnownAbstractVersioneds()

getCheckValue

protected java.lang.String getCheckValue(Visit visit)
Returns the "user-agent-string" from the given Visit.

Specified by:
getCheckValue in class AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
Parameters:
visit - the Visit
Returns:
the "user-agent-string" to be checked

getUnknownAbstractRegexVersioned

protected UserAgent getUnknownAbstractRegexVersioned(org.hibernate.Session s)
Returns the UserAgent which represents the "unknown".

Specified by:
getUnknownAbstractRegexVersioned in class AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
Parameters:
s - the current HibernateTM-Session
Returns:
the UserAgent which represents the "unknown"
See Also:
#getUnknownAbstractVersioned()

getAbstractRegexVersionedCounterAggregation

protected UserAgentPerVisitAggregation getAbstractRegexVersionedCounterAggregation(UserAgent userAgent, Visit visit, Duration fullDay,
                                                                                   org.hibernate.Session s)
Tries to load a matching UserAgentPerVisitAggregation for the given UserAgent, the given Visit and the given Duration.

Specified by:
getAbstractRegexVersionedCounterAggregation in class AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
Parameters:
userAgent - the UserAgent
visit - the Visit
fullDay - the Duration
s - the current HibernateTM-Session
Returns:
a matching UserAgentPerVisitAggregation if available, null otherwise
See Also:
#getAbstractVersionCounterAggregation()

getNewAbstractRegexVersionedCounterAggregation

protected UserAgentPerVisitAggregation getNewAbstractRegexVersionedCounterAggregation(UserAgent userAgent, Visit visit, Duration fullDay)
Returns a new UserAgentPerVisitAggregation for the given UserAgent, the given Visit and the given Duration.

Specified by:
getNewAbstractRegexVersionedCounterAggregation in class AbstractRegexVersionedPerVisitAggregator<UserAgent,UserAgentPerVisitAggregation>
Parameters:
userAgent - the UserAgent
visit - the Visit
fullDay - the Duration
Returns:
a new UserAgentPerVisitAggregation
See Also:
# getNewAbstractRegexVersionedCounterAggregation(org.torweg.pulse.component.statistics .model.AbstractVersioned, org.torweg.pulse.component.statistics.model.Visit, org.torweg.pulse.util.time.Duration)