com.atlassian.confluence.links
Class DefaultReferralManager

java.lang.Object
  extended by com.atlassian.confluence.links.DefaultReferralManager
All Implemented Interfaces:
ReferralManager

public class DefaultReferralManager
extends Object
implements ReferralManager


Constructor Summary
DefaultReferralManager()
           
 
Method Summary
 int deleteReferrersWithPrefix(String urlPrefix)
          potential for mass deletes in this operation.
 List<ReferralLink> getHotReferrers(ContentEntityObject content, int maxCount)
           
 void referToContent(com.atlassian.bonnie.Handle handle, String referrer, int hitCount)
          Extracts the "referring URL" from the request and
(a) adds it as a ReferralLink to the content if it doesn't exist
(b) increments the view count of that link if it already exists

Note: URL will not be added if it is longer than 255 char, is null or getUrlIndex != 0

 void saveReferralLink(ReferralLink link)
           
 void saveTrackback(com.atlassian.trackback.Trackback tb, long entityId)
           
 void setAnyTypeDao(AnyTypeDao anyTypeDao)
           
 void setContentEntityManager(ContentEntityManager contentEntityManager)
           
 void setReferralDao(ReferralDao referralDao)
           
 void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)
           
 void setSettingsManager(SettingsManager settingsManager)
           
 void setTrackbackDao(TrackbackDao trackbackDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReferralManager

public DefaultReferralManager()
Method Detail

getHotReferrers

public List<ReferralLink> getHotReferrers(ContentEntityObject content,
                                          int maxCount)
Specified by:
getHotReferrers in interface ReferralManager

saveReferralLink

public void saveReferralLink(ReferralLink link)
Specified by:
saveReferralLink in interface ReferralManager

saveTrackback

public void saveTrackback(com.atlassian.trackback.Trackback tb,
                          long entityId)
Specified by:
saveTrackback in interface ReferralManager

referToContent

public void referToContent(com.atlassian.bonnie.Handle handle,
                           String referrer,
                           int hitCount)
Extracts the "referring URL" from the request and
(a) adds it as a ReferralLink to the content if it doesn't exist
(b) increments the view count of that link if it already exists

Note: URL will not be added if it is longer than 255 char, is null or getUrlIndex != 0

Specified by:
referToContent in interface ReferralManager

deleteReferrersWithPrefix

public int deleteReferrersWithPrefix(String urlPrefix)
potential for mass deletes in this operation. more efficient to use direct jdbc than to do it through hibernate

Specified by:
deleteReferrersWithPrefix in interface ReferralManager

setReferralDao

public void setReferralDao(ReferralDao referralDao)

setTrackbackDao

public void setTrackbackDao(TrackbackDao trackbackDao)

setSettingsManager

public void setSettingsManager(SettingsManager settingsManager)

setSessionFactory

public void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)

setContentEntityManager

public void setContentEntityManager(ContentEntityManager contentEntityManager)

setAnyTypeDao

public void setAnyTypeDao(AnyTypeDao anyTypeDao)


Copyright © 2003–2015 Atlassian. All rights reserved.