public class StyleableEmailContentServiceImpl extends BaseEmailContentServiceImpl
Modifier and Type | Field and Description |
---|---|
protected String |
DEFAULT_EMAIL_STYLESHEET_RESOURCE_LOC |
protected String |
globalEmailStyleSheet |
protected RouteHeaderService |
routeHeaderService |
protected EmailStyleHelper |
styleHelper |
protected StyleService |
styleService |
defaultEmailFromAddress, deploymentEnvironment
Constructor and Description |
---|
StyleableEmailContentServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addCDataElement(Document doc,
Element baseElement,
String elementName,
Object elementData) |
protected static void |
addDelegatorElement(Document doc,
Element baseElement,
ActionItem actionItem) |
protected void |
addDocumentHeaderXML(Document document,
DocumentRouteHeaderValue documentHeader,
Node node,
String elementName)
This method handles converting the DocumentRouteHeaderValue into an XML representation.
|
protected static void |
addObjectXML(Document doc,
Object o,
Node node,
String name) |
protected void |
addSummarizedActionItem(Document doc,
ActionItem actionItem,
Person user,
Node node,
DocumentRouteHeaderValue routeHeader)
This method is used to add the given
ActionItem to the given Document in a summarized
form for use in weekly or daily type reminder e-mails. |
protected static void |
addTextElement(Document doc,
Element baseElement,
String elementName,
Object elementData) |
protected static void |
addTimestampElement(Document doc,
Element baseElement,
String elementName,
Date elementData) |
protected static void |
addWorkgroupRequestElement(Document doc,
Element baseElement,
ActionItem actionItem) |
EmailContent |
generateDailyReminder(Person user,
Collection<ActionItem> actionItems) |
protected EmailContent |
generateEmailContent(String styleName,
Document doc) |
EmailContent |
generateFeedback(FeedbackForm form) |
EmailContent |
generateImmediateReminder(Person user,
ActionItem actionItem,
DocumentType documentType)
This method generates an
EmailContent object using the given parameters. |
protected EmailContent |
generateReminderForActionItems(Person user,
Collection<ActionItem> actionItems,
String name,
String style) |
EmailContent |
generateWeeklyReminder(Person user,
Collection<ActionItem> actionItems) |
protected static DocumentBuilder |
getDocumentBuilder(boolean coalesce) |
DocumentRouteHeaderValue |
getRouteHeader(ActionItem actionItem) |
protected Map<String,DocumentRouteHeaderValue> |
getRouteHeaders(Collection<ActionItem> actionItems) |
protected Templates |
getStyle(String styleName)
This method retrieves the style from the system using the given name.
|
void |
setGlobalEmailStyleSheet(String globalEmailStyleSheet) |
protected void |
setStandardAttributes(Element e) |
void |
setStyleService(StyleService styleService) |
protected static String |
transform(Templates style,
Document doc) |
getActionListUrl, getApplicationEmailAddress, getCustomEmailAttribute, getDeploymentEnvironment, getDocumentTypeEmailAddress, getPreferencesUrl, getRouteLogUrl, setDefaultEmailFromAddress, setDeploymentEnvironment
protected final String DEFAULT_EMAIL_STYLESHEET_RESOURCE_LOC
protected StyleService styleService
protected EmailStyleHelper styleHelper
protected String globalEmailStyleSheet
protected RouteHeaderService routeHeaderService
public StyleableEmailContentServiceImpl()
public void setStyleService(StyleService styleService)
public void setGlobalEmailStyleSheet(String globalEmailStyleSheet)
protected static DocumentBuilder getDocumentBuilder(boolean coalesce)
protected static void addObjectXML(Document doc, Object o, Node node, String name) throws Exception
Exception
protected static void addTextElement(Document doc, Element baseElement, String elementName, Object elementData)
protected static void addCDataElement(Document doc, Element baseElement, String elementName, Object elementData)
protected static void addTimestampElement(Document doc, Element baseElement, String elementName, Date elementData)
protected static void addDelegatorElement(Document doc, Element baseElement, ActionItem actionItem)
protected static void addWorkgroupRequestElement(Document doc, Element baseElement, ActionItem actionItem)
protected void addSummarizedActionItem(Document doc, ActionItem actionItem, Person user, Node node, DocumentRouteHeaderValue routeHeader) throws Exception
ActionItem
to the given Document
in a summarized
form for use in weekly or daily type reminder e-mails.doc
- - Document to have the ActionItem added toactionItem
- - the action item being addeduser
- - the current usernode
- - the node object to add the actionItem XML to (defaults to the doc variable if null is passed in)Exception
public DocumentRouteHeaderValue getRouteHeader(ActionItem actionItem)
protected Map<String,DocumentRouteHeaderValue> getRouteHeaders(Collection<ActionItem> actionItems)
protected Templates getStyle(String styleName)
DEFAULT_EMAIL_STYLESHEET_RESOURCE_LOC
is used.styleName
- Templates
using either the given styleName or the default xsl style fileprotected EmailContent generateEmailContent(String styleName, Document doc)
protected EmailContent generateReminderForActionItems(Person user, Collection<ActionItem> actionItems, String name, String style)
protected void setStandardAttributes(Element e)
public EmailContent generateImmediateReminder(Person user, ActionItem actionItem, DocumentType documentType)
EmailContent
object using the given parameters. Part of this operation includes
serializing the given ActionItem
to XML. The following objects and methods are included in the serialization:
Person
Person.getPrincipalName()
DocumentRouteHeaderValue
DocumentRouteHeaderValue#getInitiatorUser()
DocumentRouteHeaderValue.getDocumentType()
Person
user
- - the current useractionItem
- - the action item being addeddocumentType
- - the document type that the custom email style sheet will come fromnode
- - the node object to add the actionItem XML to (defaults to the doc variable if null is passed in)Exception
protected void addDocumentHeaderXML(Document document, DocumentRouteHeaderValue documentHeader, Node node, String elementName) throws Exception
Exception
public EmailContent generateWeeklyReminder(Person user, Collection<ActionItem> actionItems)
public EmailContent generateDailyReminder(Person user, Collection<ActionItem> actionItems)
public EmailContent generateFeedback(FeedbackForm form)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.