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
Abstract action for subscription
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CategoryProviderExtensionPointThe category providers managerprotected PageHelperPage helperprotected AmetysObjectResolverThe Ametys object resolverprotected SiteConfigurationExtensionPointThe site configurationprotected SubscribersDAOThe subscribers DAOFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Subscriber_createSubscritpion(String email, String siteName, String categoryID) Get the categoryprotected Category_getCategory(String categoryID) Get the categoryprotected boolean_validCaptcha(Request request, SitemapElement sitemapElement) Determines if the captcha is validprotected boolean_validEmail(String email) Determines if the email address is validvoidservice(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_subscribersDao
The subscribers DAO -
_categoryProviderEP
The category providers manager -
_siteConfiguration
The site configuration -
_resolver
The Ametys object resolver -
_pageHelper
Page helper
-
-
Constructor Details
-
AbstractSubscribeAction
public AbstractSubscribeAction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
_validEmail
Determines if the email address is valid- Parameters:
email- The email address- Returns:
- true if the email is valid
-
_validCaptcha
Determines if the captcha is valid- Parameters:
request- The requestsitemapElement- the page holding the service- Returns:
- true if the captcha is valid
-
_getCategory
Get the category- Parameters:
categoryID- The category id- Returns:
- the category
-
_createSubscritpion
Get the category- Parameters:
email- the subscriber emailsiteName- the site namecategoryID- The category id- Returns:
- the category
-