public class SendNewsletterFunction extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.FunctionProvider, Contextualizable
| Modifier and Type | Field and Description |
|---|---|
private CategoryProviderExtensionPoint |
_categoryProviderEP |
private Context |
_context |
private RenderingContextHandler |
_renderingContextHandler |
private SiteConfigurationExtensionPoint |
_siteConfiguration |
private SourceResolver |
_sourceResolver |
private SubscribersDAO |
_subscribersDAO |
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 String |
_getBodyAsHtml(DefaultWebContent content)
Get the newsletter HTML body
|
protected String |
_getBodyAsText(DefaultWebContent content)
Get the newsletter text body
|
protected Category |
_getCategory(String categoryID)
Get a category
|
protected CategoryProvider |
_getProvider(String categoryID)
Get the category provider
|
protected Request |
_getRequest()
Retrieve the request from which this component is called.
|
protected String |
_getSubject(DefaultWebContent content)
Get the newsletter mail subject
|
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) |
getContentaddWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserprivate SourceResolver _sourceResolver
private SubscribersDAO _subscribersDAO
private CategoryProviderExtensionPoint _categoryProviderEP
private SiteConfigurationExtensionPoint _siteConfiguration
private RenderingContextHandler _renderingContextHandler
public SendNewsletterFunction()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractWorkflowComponentServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
execute in interface com.opensymphony.workflow.FunctionProvidercom.opensymphony.workflow.WorkflowExceptionprotected 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 String _getSubject(DefaultWebContent content)
content - The contentprotected String _getBodyAsHtml(DefaultWebContent content) throws IOException
content - The contentIOException - if an I/O error occurredprotected Request _getRequest()
protected String _getBodyAsText(DefaultWebContent content) throws IOException
content - The contentIOException - if an I/O error occurredprotected Category _getCategory(String categoryID)
categoryID - The category idprotected CategoryProvider _getProvider(String categoryID)
categoryID - The category id