Class SubscriptionLocalServiceImpl

Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portal.service.base.SubscriptionLocalServiceBaseImpl
com.liferay.portal.service.impl.SubscriptionLocalServiceImpl
All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.SubscriptionLocalService

@Deprecated public class SubscriptionLocalServiceImpl extends SubscriptionLocalServiceBaseImpl
Deprecated.
As of Judson (7.1.x), replaced by com.liferay.subscription.service.impl.SubscriptionLocalServiceImpl
Provides the local service for accessing, adding, and deleting notification subscriptions to entities. It handles subscriptions to entities found in many different places in the portal, including message boards, blogs, and documents and media.
Author:
Charles May, Zsolt Berentey
  • Constructor Details

    • SubscriptionLocalServiceImpl

      public SubscriptionLocalServiceImpl()
      Deprecated.
  • Method Details

    • addSubscription

      public com.liferay.portal.kernel.model.Subscription addSubscription(long userId, long groupId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Subscribes the user to the entity, notifying him the instant the entity is created, deleted, or modified.

      If there is no asset entry with the class name and class PK a new asset entry is created.

      A social activity for the subscription is created using the asset entry associated with the class name and class PK, or the newly created asset entry.

      Parameters:
      userId - the primary key of the user
      groupId - the primary key of the entity's group
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Returns:
      the subscription
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addSubscription

      public com.liferay.portal.kernel.model.Subscription addSubscription(long userId, long groupId, String className, long classPK, String frequency) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Subscribes the user to the entity, notifying him at the given frequency.

      If there is no asset entry with the class name and class PK a new asset entry is created.

      A social activity for the subscription is created using the asset entry associated with the class name and class PK, or the newly created asset entry.

      Parameters:
      userId - the primary key of the user
      groupId - the primary key of the entity's group
      className - the entity's class name
      classPK - the primary key of the entity's instance
      frequency - the frequency for notifications
      Returns:
      the subscription
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSubscription

      public com.liferay.portal.kernel.model.Subscription deleteSubscription(long subscriptionId) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Deletes the subscription with the primary key. A social activity with the unsubscribe action is created.
      Specified by:
      deleteSubscription in interface com.liferay.portal.kernel.service.SubscriptionLocalService
      Overrides:
      deleteSubscription in class SubscriptionLocalServiceBaseImpl
      Parameters:
      subscriptionId - the primary key of the subscription
      Returns:
      the subscription that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a subscription with the primary key could not be found
    • deleteSubscription

      public void deleteSubscription(long userId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Deletes the user's subscription to the entity. A social activity with the unsubscribe action is created.
      Parameters:
      userId - the primary key of the user
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSubscription

      public com.liferay.portal.kernel.model.Subscription deleteSubscription(com.liferay.portal.kernel.model.Subscription subscription) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Deletes the subscription. A social activity with the unsubscribe action is created.
      Specified by:
      deleteSubscription in interface com.liferay.portal.kernel.service.SubscriptionLocalService
      Overrides:
      deleteSubscription in class SubscriptionLocalServiceBaseImpl
      Parameters:
      subscription - the subscription
      Returns:
      the subscription that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSubscriptions

      public void deleteSubscriptions(long userId) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Deletes all the subscriptions of the user.
      Parameters:
      userId - the primary key of the user
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSubscriptions

      public void deleteSubscriptions(long userId, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteSubscriptions

      public void deleteSubscriptions(long companyId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Deletes all the subscriptions to the entity.
      Parameters:
      companyId - the primary key of the company
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchSubscription

      public com.liferay.portal.kernel.model.Subscription fetchSubscription(long companyId, long userId, String className, long classPK)
      Deprecated.
    • getSubscription

      public com.liferay.portal.kernel.model.Subscription getSubscription(long companyId, long userId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Returns the subscription of the user to the entity.
      Parameters:
      companyId - the primary key of the company
      userId - the primary key of the user
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Returns:
      the subscription of the user to the entity
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSubscriptions

      public List<com.liferay.portal.kernel.model.Subscription> getSubscriptions(long companyId, long userId, String className, long[] classPKs)
      Deprecated.
      Returns all the subscriptions of the user to the entities.
      Parameters:
      companyId - the primary key of the company
      userId - the primary key of the user
      className - the entity's class name
      classPKs - the primary key of the entities
      Returns:
      the subscriptions of the user to the entities
    • getSubscriptions

      public List<com.liferay.portal.kernel.model.Subscription> getSubscriptions(long companyId, String className, long classPK)
      Deprecated.
      Returns all the subscriptions to the entity.
      Parameters:
      companyId - the primary key of the company
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Returns:
      the subscriptions to the entity
    • getUserSubscriptions

      public List<com.liferay.portal.kernel.model.Subscription> getUserSubscriptions(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Subscription> orderByComparator)
      Deprecated.
      Returns an ordered range of all the subscriptions of the user.
      Parameters:
      userId - the primary key of the user
      start - the lower bound of the range of results
      end - the upper bound of the range of results (not inclusive)
      orderByComparator - the comparator to order the subscriptions
      Returns:
      the range of subscriptions of the user
    • getUserSubscriptions

      public List<com.liferay.portal.kernel.model.Subscription> getUserSubscriptions(long userId, String className)
      Deprecated.
      Returns all the subscriptions of the user to the entities with the class name.
      Parameters:
      userId - the primary key of the user
      className - the entity's class name
      Returns:
      the subscriptions of the user to the entities with the class name
    • getUserSubscriptionsCount

      public int getUserSubscriptionsCount(long userId)
      Deprecated.
      Returns the number of subscriptions of the user.
      Parameters:
      userId - the primary key of the user
      Returns:
      the number of subscriptions of the user
    • isSubscribed

      public boolean isSubscribed(long companyId, long userId, String className, long classPK)
      Deprecated.
      Returns true if the user is subscribed to the entity.
      Parameters:
      companyId - the primary key of the company
      userId - the primary key of the user
      className - the entity's class name
      classPK - the primary key of the entity's instance
      Returns:
      true if the user is subscribed to the entity; false otherwise
    • isSubscribed

      public boolean isSubscribed(long companyId, long userId, String className, long[] classPKs)
      Deprecated.
      Returns true if the user is subscribed to any of the entities.
      Parameters:
      companyId - the primary key of the company
      userId - the primary key of the user
      className - the entity's class name
      classPKs - the primary key of the entities
      Returns:
      true if the user is subscribed to any of the entities; false otherwise