atg.userprofiling.email
Class SimpleContentProcessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.userprofiling.email.MessageContentProcessor
              extended by atg.userprofiling.email.SimpleContentProcessor
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class SimpleContentProcessor
extends MessageContentProcessor

A MessageContentProcessor which doesn't do any processing on the passed in content, but simply uses it as is to set the Message content. The MIME type of the content in the Message is specified via the service's contentType property.

See Also:
Message

Nested Class Summary
 
Nested classes/interfaces inherited from class atg.userprofiling.email.MessageContentProcessor
MessageContentProcessor.UrlAndMimeType
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
SimpleContentProcessor()
           
 
Method Summary
 java.lang.String getContentType()
          Returns the MIME type that should be assigned to the message content.
 void setContentType(java.lang.String pContentType)
          Sets the MIME type that should be assigned to the message content.
 void setMessageContent(javax.mail.Message pMessage, java.lang.String pContent, java.io.File[] pAttachments, boolean pInlineAttachments)
          Stuffs the given content into the Message, using the contentType property to specify the content's MIME type.
 void setMessageContent(javax.mail.Message pMessage, java.lang.String pContent, java.lang.String pContentType, java.io.File[] pAttachments, boolean pInlineAttachments)
          Processes the email message content and stuffs the resulting content into the Message.
 
Methods inherited from class atg.userprofiling.email.MessageContentProcessor
pruneAlternatives, setMessageContent, setMessageContent, setMessageContents, supportsMultipleContents
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

SimpleContentProcessor

public SimpleContentProcessor()
Method Detail

getContentType

public java.lang.String getContentType()
Returns the MIME type that should be assigned to the message content. The default is "text/plain."


setContentType

public void setContentType(java.lang.String pContentType)
Sets the MIME type that should be assigned to the message content. The default is "text/plain."


setMessageContent

public void setMessageContent(javax.mail.Message pMessage,
                              java.lang.String pContent,
                              java.io.File[] pAttachments,
                              boolean pInlineAttachments)
                       throws TemplateEmailException
Stuffs the given content into the Message, using the contentType property to specify the content's MIME type.

Parameters:
pAttachments - the files to attach to the message, in addition to setting the regular content
pInlineAttachments - if true, the files will be inlined into the message, rather than attached
Throws:
TemplateEmailException - if the content could not be processed or set in the Message

setMessageContent

public void setMessageContent(javax.mail.Message pMessage,
                              java.lang.String pContent,
                              java.lang.String pContentType,
                              java.io.File[] pAttachments,
                              boolean pInlineAttachments)
                       throws TemplateEmailException
Processes the email message content and stuffs the resulting content into the Message.

Specified by:
setMessageContent in class MessageContentProcessor
Parameters:
pAttachments - the files to attach to the message, in addition to setting the regular content
pInlineAttachments - if true, the files will be inlined into the message, rather than attached
Throws:
TemplateEmailException - if the content could not be processed or set in the Message