fr.paris.lutece.plugins.extend.modules.actionhit.service
Class ActionHitService

java.lang.Object
  extended by fr.paris.lutece.portal.service.cache.AbstractCacheableService
      extended by fr.paris.lutece.plugins.extend.modules.actionhit.service.ActionHitService
All Implemented Interfaces:
fr.paris.lutece.portal.service.cache.CacheableService, fr.paris.lutece.portal.service.util.LuteceService, Cloneable, net.sf.ehcache.event.CacheEventListener, org.springframework.beans.factory.InitializingBean

public class ActionHitService
extends fr.paris.lutece.portal.service.cache.AbstractCacheableService
implements org.springframework.beans.factory.InitializingBean

ActionbarService


Field Summary
static String BEAN_NAME
          Bean name
 
Constructor Summary
ActionHitService()
           
 
Method Summary
 void afterPropertiesSet()
          
 void createActionHit(ActionHit actionHit)
          Creates an action hit
 ActionHit findActionHit(String strActionName, String strIdExtendableResource, String strExtendableResourceType)
          find an action hit
 List<ActionHit> findActionHitsByAction(String strActionName, String strExtendableResourceType)
          Get the list of action hits associated to a given action and a given resource type
 List<ActionHit> findActionHitsByResource(String strResourceType, String strIdExtendableResource)
          Get the list of action hits associated with a given resource.
 List<ActionHit> findAllActionHits()
          Get the list of action hits
 String getName()
          
 void removeActionHit(ActionHit actionHit)
          Remove an action hit from its id
 void removeActionHit(String strActionName, String strIdExtendableResource, String strExtendableResourceType)
          Remove an action hit from its id
 void removeByResource(String strExtendableResourceType, String strIdExtendableResource)
          Remove action hits associated with a given resource
 void updateActionHit(ActionHit actionHit)
          Update an action hit
 
Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getCacheSize, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getTimeToLive, initCache, initCache, isCacheEnable, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache, removeKey, resetCache
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_NAME

public static final String BEAN_NAME
Bean name

See Also:
Constant Field Values
Constructor Detail

ActionHitService

public ActionHitService()
Method Detail

createActionHit

public void createActionHit(ActionHit actionHit)
Creates an action hit

Parameters:
actionHit - The action hit to create

findActionHit

public ActionHit findActionHit(String strActionName,
                               String strIdExtendableResource,
                               String strExtendableResourceType)
find an action hit

Parameters:
strActionName - The name of the action to get the number of hit of
strIdExtendableResource - The id of the extendable resource to get the number of hits of
strExtendableResourceType - The extendable resource type of the resource to get the number of hits of
Returns:
The action hit, or null if no action hit has this id

findActionHitsByResource

public List<ActionHit> findActionHitsByResource(String strResourceType,
                                                String strIdExtendableResource)
Get the list of action hits associated with a given resource.

Parameters:
strResourceType - The resource type of hits
strIdExtendableResource - The id of the extendable resource to get hits of
Returns:
The list of action hits

findActionHitsByAction

public List<ActionHit> findActionHitsByAction(String strActionName,
                                              String strExtendableResourceType)
Get the list of action hits associated to a given action and a given resource type

Parameters:
strActionName - The name of the action to get the hits of
strExtendableResourceType - The resource type
Returns:
The list of action hits, or an empty list if no actions was found

findAllActionHits

public List<ActionHit> findAllActionHits()
Get the list of action hits

Returns:
The list of action hits

updateActionHit

public void updateActionHit(ActionHit actionHit)
Update an action hit

Parameters:
actionHit - The action hit to update

removeActionHit

public void removeActionHit(String strActionName,
                            String strIdExtendableResource,
                            String strExtendableResourceType)
Remove an action hit from its id

Parameters:
strActionName - The name of the action to remove
strIdExtendableResource - The id of the extendable resource to remove
strExtendableResourceType - The extendable resource type of the resource to remove

removeActionHit

public void removeActionHit(ActionHit actionHit)
Remove an action hit from its id

Parameters:
actionHit - The action hit to remove

removeByResource

public void removeByResource(String strExtendableResourceType,
                             String strIdExtendableResource)
Remove action hits associated with a given resource

Parameters:
strExtendableResourceType - The type of the resource to remove hits of
strIdExtendableResource - The id of the resource to remove hits of

getName

public String getName()

Specified by:
getName in interface fr.paris.lutece.portal.service.util.LuteceService

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013 Mairie de Paris. All Rights Reserved.