Class AbstractSubscribeAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.plugins.newsletter.subscribe.AbstractSubscribeAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,ThreadSafe
,Action
- Direct Known Subclasses:
SubscribeAction
,SubscribeAndManageAction
public abstract class AbstractSubscribeAction extends ServiceableAction implements ThreadSafe
Abstract action for subscription
-
-
Field Summary
Fields Modifier and Type Field Description protected CategoryProviderExtensionPoint
_categoryProviderEP
The category providers managerprotected PageHelper
_pageHelper
Page helperprotected AmetysObjectResolver
_resolver
The Ametys object resolverprotected SiteConfigurationExtensionPoint
_siteConfiguration
The site configurationprotected SubscribersDAO
_subscribersDao
The subscribers DAO-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description AbstractSubscribeAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Subscriber
_createSubscritpion(String email, String siteName, String categoryID)
Get the categoryprotected Category
_getCategory(String categoryID)
Get the categoryprotected boolean
_validCaptcha(Request request, Page page)
Determines if the captcha is validprotected boolean
_validEmail(String email)
Determines if the email address is validvoid
service(ServiceManager smanager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_subscribersDao
protected SubscribersDAO _subscribersDao
The subscribers DAO
-
_categoryProviderEP
protected CategoryProviderExtensionPoint _categoryProviderEP
The category providers manager
-
_siteConfiguration
protected SiteConfigurationExtensionPoint _siteConfiguration
The site configuration
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver
-
_pageHelper
protected PageHelper _pageHelper
Page helper
-
-
Constructor Detail
-
AbstractSubscribeAction
public AbstractSubscribeAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
_validEmail
protected boolean _validEmail(String email)
Determines if the email address is valid- Parameters:
email
- The email address- Returns:
- true if the email is valid
-
_validCaptcha
protected boolean _validCaptcha(Request request, Page page)
Determines if the captcha is valid- Parameters:
request
- The requestpage
- the page holding the service- Returns:
- true if the captcha is valid
-
_getCategory
protected Category _getCategory(String categoryID)
Get the category- Parameters:
categoryID
- The category id- Returns:
- the category
-
_createSubscritpion
protected Subscriber _createSubscritpion(String email, String siteName, String categoryID)
Get the category- Parameters:
email
- the subscriber emailsiteName
- the site namecategoryID
- The category id- Returns:
- the category
-
-