Class SendNewsletterFunction
- java.lang.Object
-
- org.ametys.plugins.workflow.AbstractWorkflowComponent
-
- org.ametys.cms.workflow.AbstractContentWorkflowComponent
-
- org.ametys.plugins.newsletter.workflow.SendNewsletterFunction
-
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider
,Contextualizable
,LogEnabled
,Serviceable
public class SendNewsletterFunction extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.FunctionProvider, Contextualizable
OSWorkflow function for creating a content.
-
-
Field Summary
Fields Modifier and Type Field Description private CategoryProviderExtensionPoint
_categoryProviderEP
private Context
_context
private NewsletterDAO
_newsletterDAO
private SubscribersDAO
_subscribersDAO
-
Fields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY
-
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
-
-
Constructor Summary
Constructors Constructor Description SendNewsletterFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CategoryProvider
_getProvider(String categoryID)
Get the category providerprotected Request
_getRequest()
Retrieve the request from which this component is called.protected List<Subscriber>
_getSubscribersOfChildCategories(String categoryID, String siteName)
Get the subscribers of child categoriesprotected List<Subscriber>
_getSubscribersOfParentCategories(String categoryID, String siteName)
Get the subscribers of parent categoriesvoid
contextualize(Context context)
void
execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)
void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContent
-
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
-
-
-
-
Field Detail
-
_subscribersDAO
private SubscribersDAO _subscribersDAO
-
_categoryProviderEP
private CategoryProviderExtensionPoint _categoryProviderEP
-
_newsletterDAO
private NewsletterDAO _newsletterDAO
-
-
Constructor Detail
-
SendNewsletterFunction
public SendNewsletterFunction()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractContentWorkflowComponent
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
- Specified by:
execute
in interfacecom.opensymphony.workflow.FunctionProvider
- Throws:
com.opensymphony.workflow.WorkflowException
-
_getSubscribersOfParentCategories
protected List<Subscriber> _getSubscribersOfParentCategories(String categoryID, String siteName)
Get the subscribers of parent categories- Parameters:
categoryID
- The category idsiteName
- The site name- Returns:
- the subscribers of parent categories
-
_getSubscribersOfChildCategories
protected List<Subscriber> _getSubscribersOfChildCategories(String categoryID, String siteName)
Get the subscribers of child categories- Parameters:
categoryID
- The category idsiteName
- The site name- Returns:
- The subscribers of child categories
-
_getRequest
protected Request _getRequest()
Retrieve the request from which this component is called.- Returns:
- the request
-
_getProvider
protected CategoryProvider _getProvider(String categoryID)
Get the category provider- Parameters:
categoryID
- The category id- Returns:
- The category
-
-