Class 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 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
      • getOrder

        public int getOrder()
        Returns:
        the _nOrder
      • setOrder

        public void setOrder​(int nOrder)
        Parameters:
        nOrder - the _nOrder to set