Class Subscription
- java.lang.Object
-
- fr.paris.lutece.plugins.subscribe.business.Subscription
-
public class Subscription extends Object
This is the business class for subscriptions. Users can subscribe to resources (identified by their id) with a subscription key for a provider.
The provider is used to prevent collisions between subscriptions lists of different plugins. The subscription key is used to differentiate several subscription lists from a same provider. The subscribed resource id is used to configure subscriptions.
Users are identified by their subscriber id. The subscriber id of a LuteceUser can be retrieved by calling the methodSubscriptionService#getIdSubscriberFromLuteceUser( LuteceUser )
Every string fields of this class be less than 255 characters long
-
-
Constructor Summary
Constructors Constructor Description Subscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetIdSubscribedResource()Returns the id of the subscribed resourceintgetIdSubscription()Returns the technical id of the subscriptionintgetOrder()StringgetSubscriptionKey()Returns the subscription key.StringgetSubscriptionProvider()Returns the provider of the subscriptionStringgetUserId()Get the id of the subscriber.voidsetIdSubscribedResource(String strIdSubscribedResource)Sets the id of the subscribed resourcevoidsetIdSubscription(int nIdSubscription)Sets the technical id of the subscriptionvoidsetOrder(int nOrder)voidsetSubscriptionKey(String strSubscriptionKey)Sets the subscription key.voidsetSubscriptionProvider(String strSubscriptionProvider)Sets the SubscriptionProvidervoidsetUserId(String strUserId)Get the id of the subscriber.
-
-
-
Method Detail
-
getIdSubscription
public int getIdSubscription()
Returns the technical id of the subscription- Returns:
- The technical id of the subscription
-
setIdSubscription
public void setIdSubscription(int nIdSubscription)
Sets the technical id of the subscription- Parameters:
nIdSubscription- The technical id of the subscription
-
getUserId
public String getUserId()
Get the id of the subscriber. Subscribers id can be retrieved by calling the methodSubscriptionService#getIdSubscriberFromLuteceUser( LuteceUser )- Returns:
- The id of the subscriber
-
setUserId
public void setUserId(String strUserId)
Get the id of the subscriber. Subscribers id can be retrieved by calling the methodSubscriptionService#getIdSubscriberFromLuteceUser( LuteceUser )- Parameters:
strUserId- The id of the subscriber
-
getSubscriptionProvider
public String getSubscriptionProvider()
Returns the provider of the subscription- Returns:
- The provider of the subscription
-
setSubscriptionProvider
public void setSubscriptionProvider(String strSubscriptionProvider)
Sets the SubscriptionProvider- Parameters:
strSubscriptionProvider- The SubscriptionProvider
-
getSubscriptionKey
public String getSubscriptionKey()
Returns the subscription key. The subscription key is used to differentiates several subscription lists of a same provider- Returns:
- The subscription key
-
setSubscriptionKey
public void setSubscriptionKey(String strSubscriptionKey)
Sets the subscription key. The subscription key is used to differentiates several subscription lists of a same provider- Parameters:
strSubscriptionKey- The ActionKey
-
getIdSubscribedResource
public String getIdSubscribedResource()
Returns the id of the subscribed resource- Returns:
- The id of the subscribed resource
-
setIdSubscribedResource
public void setIdSubscribedResource(String strIdSubscribedResource)
Sets the id of the subscribed resource- Parameters:
strIdSubscribedResource- The id of the subscribed resource
-
getOrder
public int getOrder()
- Returns:
- the _nOrder
-
setOrder
public void setOrder(int nOrder)
- Parameters:
nOrder- the _nOrder to set
-
-