java.lang.Object
fr.paris.lutece.plugins.extend.modules.follow.service.FollowService
All Implemented Interfaces:
IFollowService

public class FollowService extends Object implements IFollowService
followService
  • Field Details

  • Constructor Details

    • FollowService

      public FollowService()
  • Method Details

    • create

      @Transactional("extendfollow.transactionManager") public void create(Follow follow)
      Insert.
      Specified by:
      create in interface IFollowService
      Parameters:
      follow - the follow
    • update

      @Transactional("extendfollow.transactionManager") public void update(Follow follow)
      Store.
      Specified by:
      update in interface IFollowService
      Parameters:
      follow - the follow
    • doFollow

      @Transactional("extendfollow.transactionManager") public void doFollow(String strIdExtendableResource, String strExtendableResourceType, int nVoteValue, javax.servlet.http.HttpServletRequest request)
      Increment vote.
      Specified by:
      doFollow in interface IFollowService
      Parameters:
      strIdExtendableResource - the str id extendable resource
      strExtendableResourceType - the str extendable resource type
      nVoteValue - the n vote value
      request - the request
    • doCancelFollow

      @Transactional("extendfollow.transactionManager") public void doCancelFollow(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType, javax.servlet.http.HttpServletRequest request)
      Do cancel the vote of a user
      Specified by:
      doCancelFollow in interface IFollowService
      Parameters:
      user - The user
      strIdExtendableResource - The id of the extendable resource
      strExtendableResourceType - The extendable resource type
      request - the request
    • remove

      @Transactional("extendfollow.transactionManager") public void remove(int nIdFollow)
      Delete.
      Specified by:
      remove in interface IFollowService
      Parameters:
      nIdFollow - the nId follow
    • removeByResource

      @Transactional("extendfollow.transactionManager") public void removeByResource(String strIdExtendableResource, String strExtendableResourceType)
      Delete by resource
      Specified by:
      removeByResource in interface IFollowService
      Parameters:
      strIdExtendableResource - the str id extendable resource
      strExtendableResourceType - the str extendable resource type
    • findByPrimaryKey

      public Follow findByPrimaryKey(int nIdFollow)
      Load.
      Specified by:
      findByPrimaryKey in interface IFollowService
      Parameters:
      nIdFollow - the n id follow
      Returns:
      the follow
    • findByResource

      public Follow findByResource(String strIdExtendableResource, String strExtendableResourceType)
      Select by resource.
      Specified by:
      findByResource in interface IFollowService
      Parameters:
      strIdExtendableResource - the str id extendable resource
      strExtendableResourceType - the str extendable resource type
      Returns:
      the follow
    • findByFilter

      public List<Follow> findByFilter(FollowFilter filter)
      Find by filter
      Specified by:
      findByFilter in interface IFollowService
      Parameters:
      filter - the filter
      Returns:
      list Follow by filter
    • isAuthorized

      public boolean isAuthorized(javax.servlet.http.HttpServletRequest request, FollowExtenderConfig config)
      Returns true if user is authorized to follow
      Specified by:
      isAuthorized in interface IFollowService
      Returns: