fr.paris.lutece.plugins.subscribe.business
Class Subscription

java.lang.Object
  extended by 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 method SubscriptionService#getIdSubscriberFromLuteceUser( LuteceUser )
Every string fields of this class be less than 255 characters long


Constructor Summary
Subscription()
           
 
Method Summary
 String getIdSubscribedResource()
          Returns the id of the subscribed resource
 int getIdSubscription()
          Returns the technical id of the subscription
 String getSubscriptionKey()
          Returns the subscription key.
 String getSubscriptionProvider()
          Returns the provider of the subscription
 String getUserId()
          Get the id of the subscriber.
 void setIdSubscribedResource(String strIdSubscribedResource)
          Sets the id of the subscribed resource
 void setIdSubscription(int nIdSubscription)
          Sets the technical id of the subscription
 void setSubscriptionKey(String strSubscriptionKey)
          Sets the subscription key.
 void setSubscriptionProvider(String strSubscriptionProvider)
          Sets the SubscriptionProvider
 void setUserId(String strUserId)
          Get the id of the subscriber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subscription

public Subscription()
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 method SubscriptionService#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 method SubscriptionService#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


Copyright © 2013 Mairie de Paris. All Rights Reserved.