org.exoplatform.platform.gadget.services.ForumStatistics
Class ForumsWeeklyStatisticServiceImp

java.lang.Object
  extended by org.exoplatform.platform.gadget.services.ForumStatistics.ForumsWeeklyStatisticServiceImp
All Implemented Interfaces:
ForumsWeeklyStatisticService, org.picocontainer.Startable

public class ForumsWeeklyStatisticServiceImp
extends Object
implements ForumsWeeklyStatisticService, org.picocontainer.Startable

Forum Weekly Statistis service

Version:
1.0
Author:
Do Thanh Tung

Field Summary
static String STATISTIC_WEEK_HOME
           
 
Fields inherited from interface org.exoplatform.platform.gadget.services.ForumStatistics.ForumsWeeklyStatisticService
EXO_LAST_STATISTIC_ENTRY, EXO_POSTS_COUNT_OF_WEEK, EXO_START_DATE, EXO_START_POSTS_COUNT_OF_WEEK
 
Constructor Summary
ForumsWeeklyStatisticServiceImp(org.exoplatform.container.xml.InitParams params, org.exoplatform.forum.common.jcr.KSDataLocation locator, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
          Constructor.
 
Method Summary
 List<ForumsWeeklyStatistic> getAllForumsWeeklyStatistic()
          Get all Forums Weekly Statistic
 ForumsWeeklyStatistic getLastForumsWeeklyStatistic()
          Get lastest Forums Weekly Statistic
 long getPostCountForumStatistic()
          Get total Post Count of Forums
 String getRepository()
           
 String getWorkspace()
           
 void saveForumsWeeklyStatistic(ForumsWeeklyStatistic forumsWeeklyStatistic)
          Store Forums Weekly statistic in JCR data
 void start()
          Start the service and create a new node that contains all Forums Weekly Statistic if not found.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATISTIC_WEEK_HOME

public static final String STATISTIC_WEEK_HOME
See Also:
Constant Field Values
Constructor Detail

ForumsWeeklyStatisticServiceImp

public ForumsWeeklyStatisticServiceImp(org.exoplatform.container.xml.InitParams params,
                                       org.exoplatform.forum.common.jcr.KSDataLocation locator,
                                       org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
                                throws Exception
Constructor.

Parameters:
params - init parameters that were config in configuration file
locator - Object contain JCR information of Forums
nodeHierarchyCreator -
Throws:
Exception
Method Detail

getRepository

public String getRepository()

getWorkspace

public String getWorkspace()

start

public void start()
Start the service and create a new node that contains all Forums Weekly Statistic if not found.

Specified by:
start in interface org.picocontainer.Startable
See Also:
Startable.start()

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable

getLastForumsWeeklyStatistic

public ForumsWeeklyStatistic getLastForumsWeeklyStatistic()
                                                   throws Exception
Get lastest Forums Weekly Statistic

Specified by:
getLastForumsWeeklyStatistic in interface ForumsWeeklyStatisticService
Returns:
lastest Forums Weekly Statistic
Throws:
Exception

getAllForumsWeeklyStatistic

public List<ForumsWeeklyStatistic> getAllForumsWeeklyStatistic()
                                                        throws Exception
Get all Forums Weekly Statistic

Specified by:
getAllForumsWeeklyStatistic in interface ForumsWeeklyStatisticService
Returns:
all Forums Weekly Statistic
Throws:
Exception

saveForumsWeeklyStatistic

public void saveForumsWeeklyStatistic(ForumsWeeklyStatistic forumsWeeklyStatistic)
                               throws Exception
Store Forums Weekly statistic in JCR data

Specified by:
saveForumsWeeklyStatistic in interface ForumsWeeklyStatisticService
Throws:
Exception

getPostCountForumStatistic

public long getPostCountForumStatistic()
                                throws Exception
Get total Post Count of Forums

Specified by:
getPostCountForumStatistic in interface ForumsWeeklyStatisticService
Returns:
total Post Count of Forums
Throws:
Exception


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.