Package com.liferay.portal.service.impl
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.
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
-
Field Summary
Fields inherited from class com.liferay.portal.service.base.SubscriptionLocalServiceBaseImpl
counterLocalService, subscriptionLocalService, subscriptionPersistence -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.kernel.model.SubscriptionaddSubscription(long userId, long groupId, String className, long classPK) Deprecated.Subscribes the user to the entity, notifying him the instant the entity is created, deleted, or modified.com.liferay.portal.kernel.model.SubscriptionaddSubscription(long userId, long groupId, String className, long classPK, String frequency) Deprecated.Subscribes the user to the entity, notifying him at the given frequency.com.liferay.portal.kernel.model.SubscriptiondeleteSubscription(long subscriptionId) Deprecated.Deletes the subscription with the primary key.voiddeleteSubscription(long userId, String className, long classPK) Deprecated.Deletes the user's subscription to the entity.com.liferay.portal.kernel.model.SubscriptiondeleteSubscription(com.liferay.portal.kernel.model.Subscription subscription) Deprecated.Deletes the subscription.voiddeleteSubscriptions(long userId) Deprecated.Deletes all the subscriptions of the user.voiddeleteSubscriptions(long userId, long groupId) Deprecated.voiddeleteSubscriptions(long companyId, String className, long classPK) Deprecated.Deletes all the subscriptions to the entity.com.liferay.portal.kernel.model.SubscriptionfetchSubscription(long companyId, long userId, String className, long classPK) Deprecated.com.liferay.portal.kernel.model.SubscriptiongetSubscription(long companyId, long userId, String className, long classPK) Deprecated.Returns the subscription of the user to the entity.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.List<com.liferay.portal.kernel.model.Subscription>getSubscriptions(long companyId, String className, long classPK) Deprecated.Returns all the subscriptions to the entity.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.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.intgetUserSubscriptionsCount(long userId) Deprecated.Returns the number of subscriptions of the user.booleanisSubscribed(long companyId, long userId, String className, long classPK) Deprecated.Returnstrueif the user is subscribed to the entity.booleanisSubscribed(long companyId, long userId, String className, long[] classPKs) Deprecated.Returnstrueif the user is subscribed to any of the entities.Methods inherited from class com.liferay.portal.service.base.SubscriptionLocalServiceBaseImpl
addSubscription, afterPropertiesSet, createPersistedModel, createSubscription, deletePersistedModel, destroy, dslQuery, dslQueryCount, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchSubscription, getActionableDynamicQuery, getBasePersistence, getCounterLocalService, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, getSubscription, getSubscriptionLocalService, getSubscriptionPersistence, getSubscriptions, getSubscriptionsCount, initActionableDynamicQuery, runSQL, setCounterLocalService, setSubscriptionLocalService, setSubscriptionPersistence, updateSubscriptionMethods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
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 usergroupId- the primary key of the entity's groupclassName- the entity's class nameclassPK- 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 usergroupId- the primary key of the entity's groupclassName- the entity's class nameclassPK- the primary key of the entity's instancefrequency- 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:
deleteSubscriptionin interfacecom.liferay.portal.kernel.service.SubscriptionLocalService- Overrides:
deleteSubscriptionin classSubscriptionLocalServiceBaseImpl- 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 userclassName- the entity's class nameclassPK- 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:
deleteSubscriptionin interfacecom.liferay.portal.kernel.service.SubscriptionLocalService- Overrides:
deleteSubscriptionin classSubscriptionLocalServiceBaseImpl- 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 companyclassName- the entity's class nameclassPK- 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 companyuserId- the primary key of the userclassName- the entity's class nameclassPK- 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 companyuserId- the primary key of the userclassName- the entity's class nameclassPKs- 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 companyclassName- the entity's class nameclassPK- 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 userstart- the lower bound of the range of resultsend- 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 userclassName- 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
Deprecated.Returnstrueif the user is subscribed to the entity.- Parameters:
companyId- the primary key of the companyuserId- the primary key of the userclassName- the entity's class nameclassPK- the primary key of the entity's instance- Returns:
trueif the user is subscribed to the entity;falseotherwise
-
isSubscribed
Deprecated.Returnstrueif the user is subscribed to any of the entities.- Parameters:
companyId- the primary key of the companyuserId- the primary key of the userclassName- the entity's class nameclassPKs- the primary key of the entities- Returns:
trueif the user is subscribed to any of the entities;falseotherwise
-
com.liferay.subscription.service.impl.SubscriptionLocalServiceImpl