|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.BaseLocalServiceImpl
com.liferay.portal.service.base.SubscriptionLocalServiceBaseImpl
com.liferay.portal.service.impl.SubscriptionLocalServiceImpl
public class 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.
| Field Summary |
|---|
| Fields inherited from class com.liferay.portal.service.base.SubscriptionLocalServiceBaseImpl |
|---|
assetEntryFinder, assetEntryLocalService, assetEntryPersistence, classNameLocalService, classNamePersistence, counterLocalService, mbThreadFinder, mbThreadLocalService, mbThreadPersistence, persistedModelLocalServiceRegistry, subscriptionLocalService, subscriptionPersistence, userFinder, userLocalService, userPersistence |
| Constructor Summary | |
|---|---|
SubscriptionLocalServiceImpl()
|
|
| Method Summary | |
|---|---|
Subscription |
addSubscription(long userId,
long groupId,
String className,
long classPK)
Subscribes the user to the entity, notifying him the instant the entity is created, deleted, or modified. |
Subscription |
addSubscription(long userId,
long groupId,
String className,
long classPK,
String frequency)
Subscribes the user to the entity, notifying him at the given frequency. |
Subscription |
deleteSubscription(long subscriptionId)
Deletes the subscription with the primary key. |
void |
deleteSubscription(long userId,
String className,
long classPK)
Deletes the user's subscription to the entity. |
Subscription |
deleteSubscription(Subscription subscription)
Deletes the subscription. |
void |
deleteSubscriptions(long userId)
Deletes all the subscriptions of the user. |
void |
deleteSubscriptions(long userId,
long groupId)
|
void |
deleteSubscriptions(long companyId,
String className,
long classPK)
Deletes all the subscriptions to the entity. |
Subscription |
fetchSubscription(long companyId,
long userId,
String className,
long classPK)
|
Subscription |
getSubscription(long companyId,
long userId,
String className,
long classPK)
Returns the subscription of the user to the entity. |
List<Subscription> |
getSubscriptions(long companyId,
long userId,
String className,
long[] classPKs)
Returns all the subscriptions of the user to the entities. |
List<Subscription> |
getSubscriptions(long companyId,
String className,
long classPK)
Returns all the subscriptions to the entity. |
List<Subscription> |
getUserSubscriptions(long userId,
int start,
int end,
OrderByComparator<Subscription> orderByComparator)
Returns an ordered range of all the subscriptions of the user. |
List<Subscription> |
getUserSubscriptions(long userId,
String className)
Returns all the subscriptions of the user to the entities with the class name. |
int |
getUserSubscriptionsCount(long userId)
Returns the number of subscriptions of the user. |
boolean |
isSubscribed(long companyId,
long userId,
String className,
long classPK)
Returns true if the user is subscribed to the entity. |
boolean |
isSubscribed(long companyId,
long userId,
String className,
long[] classPKs)
Returns true if the user is subscribed to any of the
entities. |
| Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl |
|---|
getClassLoader, getLocalizationMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubscriptionLocalServiceImpl()
| Method Detail |
|---|
public Subscription addSubscription(long userId,
long groupId,
String className,
long classPK)
throws PortalException
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.
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
PortalException
public Subscription addSubscription(long userId,
long groupId,
String className,
long classPK,
String frequency)
throws PortalException
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.
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
PortalException
public Subscription deleteSubscription(long subscriptionId)
throws PortalException
deleteSubscription in interface SubscriptionLocalServicedeleteSubscription in class SubscriptionLocalServiceBaseImplsubscriptionId - the primary key of the subscription
PortalException - if a subscription with the primary key could not be found
public void deleteSubscription(long userId,
String className,
long classPK)
throws PortalException
userId - the primary key of the userclassName - the entity's class nameclassPK - the primary key of the entity's instance
PortalException
public Subscription deleteSubscription(Subscription subscription)
throws PortalException
deleteSubscription in interface SubscriptionLocalServicedeleteSubscription in class SubscriptionLocalServiceBaseImplsubscription - the subscription
PortalException
public void deleteSubscriptions(long userId)
throws PortalException
userId - the primary key of the user
PortalException
public void deleteSubscriptions(long userId,
long groupId)
throws PortalException
PortalException
public void deleteSubscriptions(long companyId,
String className,
long classPK)
throws PortalException
companyId - the primary key of the companyclassName - the entity's class nameclassPK - the primary key of the entity's instance
PortalException
public Subscription fetchSubscription(long companyId,
long userId,
String className,
long classPK)
public Subscription getSubscription(long companyId,
long userId,
String className,
long classPK)
throws PortalException
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
PortalException
public List<Subscription> getSubscriptions(long companyId,
long userId,
String className,
long[] classPKs)
companyId - the primary key of the companyuserId - the primary key of the userclassName - the entity's class nameclassPKs - the primary key of the entities
public List<Subscription> getSubscriptions(long companyId,
String className,
long classPK)
companyId - the primary key of the companyclassName - the entity's class nameclassPK - the primary key of the entity's instance
public List<Subscription> getUserSubscriptions(long userId,
int start,
int end,
OrderByComparator<Subscription> orderByComparator)
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
public List<Subscription> getUserSubscriptions(long userId,
String className)
userId - the primary key of the userclassName - the entity's class name
public int getUserSubscriptionsCount(long userId)
userId - the primary key of the user
public boolean isSubscribed(long companyId,
long userId,
String className,
long classPK)
true if the user is subscribed to the entity.
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
true if the user is subscribed to the entity;
false otherwise
public boolean isSubscribed(long companyId,
long userId,
String className,
long[] classPKs)
true if the user is subscribed to any of the
entities.
companyId - the primary key of the companyuserId - the primary key of the userclassName - the entity's class nameclassPKs - the primary key of the entities
true if the user is subscribed to any of the
entities; false otherwise
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||