Class PageSubscriptionXSLTHelper
- java.lang.Object
-
- org.ametys.plugins.pagesubscription.helpers.PageSubscriptionXSLTHelper
-
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
public class PageSubscriptionXSLTHelper extends Object implements Component, Contextualizable, Serviceable
Helper component to be used from XSL stylesheets.
-
-
Field Summary
Fields Modifier and Type Field Description private static Context
_context
private static AmetysObjectResolver
_resolver
private static PageSubscriptionDAO
_subscriptionDAO
-
Constructor Summary
Constructors Constructor Description PageSubscriptionXSLTHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
static boolean
isPageSubscriber(String email)
Determines is the given email is registered as subscriber on current pagestatic boolean
isPageSubscriber(String pageId, String email)
Determines is the given email is registered as subscriber on the given pagevoid
service(ServiceManager smanager)
-
-
-
Field Detail
-
_subscriptionDAO
private static PageSubscriptionDAO _subscriptionDAO
-
_resolver
private static AmetysObjectResolver _resolver
-
-
Constructor Detail
-
PageSubscriptionXSLTHelper
public PageSubscriptionXSLTHelper()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isPageSubscriber
public static boolean isPageSubscriber(String email) throws IllegalArgumentException
Determines is the given email is registered as subscriber on current page- Parameters:
email
- The email- Returns:
- true if the given email is registered as subscriber on current page
- Throws:
IllegalArgumentException
- if the current page does not support subscription
-
isPageSubscriber
public static boolean isPageSubscriber(String pageId, String email) throws IllegalArgumentException
Determines is the given email is registered as subscriber on the given page- Parameters:
pageId
- the id of pageemail
- The email- Returns:
- true if the given email is registered as subscriber on current page
- Throws:
IllegalArgumentException
- if the current page does not support subscription
-
-