public class SendNewsletterFunction extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.FunctionProvider, Contextualizable
Modifier and Type | Field and Description |
---|---|
private CategoryProviderExtensionPoint |
_categoryProviderEP |
private Context |
_context |
private NewsletterDAO |
_newsletterDAO |
private SubscribersDAO |
_subscribersDAO |
_contentHelper, CONTENT_KEY
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
Constructor and Description |
---|
SendNewsletterFunction() |
Modifier and Type | Method and Description |
---|---|
protected CategoryProvider |
_getProvider(String categoryID)
Get the category provider
|
protected Request |
_getRequest()
Retrieve the request from which this component is called.
|
protected List<Subscriber> |
_getSubscribersOfChildCategories(String categoryID,
String siteName)
Get the subscribers of child categories
|
protected List<Subscriber> |
_getSubscribersOfParentCategories(String categoryID,
String siteName)
Get the subscribers of parent categories
|
void |
contextualize(Context context) |
void |
execute(Map transientVars,
Map args,
com.opensymphony.module.propertyset.PropertySet ps) |
void |
service(ServiceManager manager) |
getContent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
private SubscribersDAO _subscribersDAO
private CategoryProviderExtensionPoint _categoryProviderEP
private NewsletterDAO _newsletterDAO
public SendNewsletterFunction()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractContentWorkflowComponent
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
execute
in interface com.opensymphony.workflow.FunctionProvider
com.opensymphony.workflow.WorkflowException
protected List<Subscriber> _getSubscribersOfParentCategories(String categoryID, String siteName)
categoryID
- The category idsiteName
- The site nameprotected List<Subscriber> _getSubscribersOfChildCategories(String categoryID, String siteName)
categoryID
- The category idsiteName
- The site nameprotected Request _getRequest()
protected CategoryProvider _getProvider(String categoryID)
categoryID
- The category id