fr.paris.lutece.plugins.subscribe.service
Interface ISubscriptionProviderService


public interface ISubscriptionProviderService

Interface of services that provide subscriptions to resources


Method Summary
 String getProviderName()
          Get the name of the subscription provider.
 String getSubscriptionHtmlDescription(fr.paris.lutece.portal.service.security.LuteceUser user, String strSubscriptionKey, String strIdSubscribedResource, Locale locale)
          Get the description of a subscription by its action key and the resource id associated with it
 String getUrlModifySubscription(fr.paris.lutece.portal.service.security.LuteceUser user, String strSubscriptionKey, String strIdSubscribedResource)
          Get the URL to modify the subscription
 boolean isSubscriptionRemovable(fr.paris.lutece.portal.service.security.LuteceUser user, String strSubscriptionKey, String strIdSubscribedResource)
          Check if a subscription can be automatically removed.
 void notifySubscriptionRemoval(Subscription subscription)
          Notify the provider that a subscription associated with it has been removed
 

Method Detail

getProviderName

String getProviderName()
Get the name of the subscription provider.

Returns:
The name of the subscription provider

getSubscriptionHtmlDescription

String getSubscriptionHtmlDescription(fr.paris.lutece.portal.service.security.LuteceUser user,
                                      String strSubscriptionKey,
                                      String strIdSubscribedResource,
                                      Locale locale)
Get the description of a subscription by its action key and the resource id associated with it

Parameters:
user - The user
strSubscriptionKey - The key of the subscription
strIdSubscribedResource - The id of the subscribed resource
locale - The locale to display the generated HTML in
Returns:
An HTML string that describes the subscription

isSubscriptionRemovable

boolean isSubscriptionRemovable(fr.paris.lutece.portal.service.security.LuteceUser user,
                                String strSubscriptionKey,
                                String strIdSubscribedResource)
Check if a subscription can be automatically removed. If the subscription is removed, the method notifySubscriptionRemoval(Subscription) of the provider of the subscription will be called

Parameters:
user - The user
strSubscriptionKey - The subscription key
strIdSubscribedResource - The id of the subscribed resource
Returns:
True if the subscription can be removed, false otherwise

getUrlModifySubscription

String getUrlModifySubscription(fr.paris.lutece.portal.service.security.LuteceUser user,
                                String strSubscriptionKey,
                                String strIdSubscribedResource)
Get the URL to modify the subscription

Parameters:
user - The user
strSubscriptionKey - The key of the subscription
strIdSubscribedResource - The id of the subscribed resource
Returns:
The URL to modify the subscription, or null if the subscription can not be modified

notifySubscriptionRemoval

void notifySubscriptionRemoval(Subscription subscription)
Notify the provider that a subscription associated with it has been removed

Parameters:
subscription - The removed subscription


Copyright © 2013 Mairie de Paris. All Rights Reserved.