|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.standalone.AbstractStandalone
adams.flow.standalone.SMTPConnection
public class SMTPConnection
SMTP server setup for overriding default parameters.
Valid options are:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: SMTPConnection
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-server <java.lang.String> (property: server) The SMTP server (name/IP address) to use. default: smtp.gmail.com
-port <int> (property: port) The SMTP port to use. default: 587 minimum: 1 maximum: 65536
-use-tls (property: useTLS) If enabled, TLS (transport layer security) is used.
-timeout <int> (property: timeout) The timeout in msecs. default: 30000 minimum: 0
-requires-auth (property: requiresAuthentication) Enable this if SMTP server requires authentication using user/pw.
-user <java.lang.String> (property: user) The SMTP user to use. default: theadamsflow
-password <adams.core.base.BasePassword> (property: password) The password of the SMTP user.
-prompt-for-password (property: promptForPassword) If enabled and authentication is required, the user gets prompted for enter a password if none has been provided in the setup.
-stop-if-canceled (property: stopFlowIfCanceled) If enabled, the flow gets stopped in case the user cancels the dialog.
-custom-stop-message <java.lang.String> (property: customStopMessage) The custom stop message to use in case a user cancelation stops the flow (default is the full name of the actor) default:
| Field Summary | |
|---|---|
protected BasePassword |
m_ActualPassword
the actual SMTP password to use. |
protected String |
m_CustomStopMessage
the custom stop message to use if flow gets stopped due to cancelation. |
protected BasePassword |
m_Password
the SMTP password to use. |
protected int |
m_Port
the SMTP port. |
protected boolean |
m_PromptForPassword
whether to prompt the user for a password if none provided. |
protected boolean |
m_RequiresAuthentication
whether the SMTP server requires authentication. |
protected String |
m_Server
the SMTP server. |
protected boolean |
m_StopFlowIfCanceled
whether to stop the flow if canceled. |
protected int |
m_Timeout
the timeout in msecs. |
protected String |
m_User
the SMTP user to use. |
protected boolean |
m_UseTLS
whether to use TLS. |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_ScopeHandler, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Fields inherited from interface adams.flow.core.Actor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ |
| Constructor Summary | |
|---|---|
SMTPConnection()
|
|
| Method Summary | |
|---|---|
String |
customStopMessageTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
boolean |
doInteract()
Performs the interaction with the user. |
String |
getCustomStopMessage()
Returns the custom message to use when stopping the flow. |
BasePassword |
getPassword()
Returns the SMTP password to use. |
int |
getPort()
Returns the SMTP port in use. |
boolean |
getPromptForPassword()
Returns whether to prompt for a password if none currently provided. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
boolean |
getRequiresAuthentication()
Returns whether SMTP server requires authentication. |
String |
getServer()
Returns the SMTP server in use. |
boolean |
getStopFlowIfCanceled()
Returns whether to stop the flow if dialog canceled. |
int |
getTimeout()
Returns the timeout in msecs. |
String |
getUser()
Returns the SMTP user name to use. |
boolean |
getUseTLS()
Returns whether TLS is used. |
String |
globalInfo()
Returns a string describing the object. |
void |
initializeSmtpSession(AbstractSendEmail sendEmail)
Initializes the SMTP session with the specified parameters. |
String |
passwordTipText()
Returns the tip text for this property. |
String |
portTipText()
Returns the tip text for this property. |
String |
promptForPasswordTipText()
Returns the tip text for this property. |
String |
requiresAuthenticationTipText()
Returns the tip text for this property. |
String |
serverTipText()
Returns the tip text for this property. |
void |
setCustomStopMessage(String value)
Sets the custom message to use when stopping the flow. |
void |
setPassword(BasePassword value)
Sets the SMTP password to use. |
void |
setPort(int value)
Sets the SMTP port to use. |
void |
setPromptForPassword(boolean value)
Sets whether to prompt for a password if none currently provided. |
void |
setRequiresAuthentication(boolean value)
Sets whether SMTP server requires authentication. |
void |
setServer(String value)
Sets the SMTP server to use. |
void |
setStopFlowIfCanceled(boolean value)
Sets whether to stop the flow if dialog canceled. |
void |
setTimeout(int value)
Sets the timeout in msecs. |
void |
setUser(String value)
Sets the SMTP user to use. |
void |
setUseTLS(boolean value)
Sets whether to use TLS. |
String |
stopFlowIfCanceledTipText()
Returns the tip text for this property. |
String |
timeoutTipText()
Returns the tip text for this property. |
String |
userTipText()
Returns the tip text for this property. |
String |
useTLSTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface adams.flow.core.Actor |
|---|
cleanUp, compareTo, debug, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, sizeOf, stopExecution, stopExecution, variableChanged, wrapUp |
| Methods inherited from interface adams.core.AdditionalInformationHandler |
|---|
getAdditionalInformation |
| Methods inherited from interface adams.core.option.OptionHandler |
|---|
cleanUpOptions, getOptionManager |
| Field Detail |
|---|
protected String m_Server
protected int m_Port
protected boolean m_UseTLS
protected int m_Timeout
protected boolean m_RequiresAuthentication
protected String m_User
protected BasePassword m_Password
protected BasePassword m_ActualPassword
protected boolean m_PromptForPassword
protected boolean m_StopFlowIfCanceled
protected String m_CustomStopMessage
| Constructor Detail |
|---|
public SMTPConnection()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in interface ActorgetQuickInfo in class AbstractActorpublic void setServer(String value)
value - the host name/ippublic String getServer()
public String serverTipText()
public void setPort(int value)
value - the portpublic int getPort()
public String portTipText()
public void setUseTLS(boolean value)
value - if true TLS is usedpublic boolean getUseTLS()
public String useTLSTipText()
public void setTimeout(int value)
value - the timeoutpublic int getTimeout()
public String timeoutTipText()
public void setRequiresAuthentication(boolean value)
value - if true user/pw is usedpublic boolean getRequiresAuthentication()
public String requiresAuthenticationTipText()
public void setUser(String value)
value - the user namepublic String getUser()
public String userTipText()
public void setPassword(BasePassword value)
value - the passwordpublic BasePassword getPassword()
public String passwordTipText()
public void setPromptForPassword(boolean value)
setPromptForPassword in interface OptionalPasswordPromptvalue - true if to prompt for a passwordpublic boolean getPromptForPassword()
getPromptForPassword in interface OptionalPasswordPromptpublic String promptForPasswordTipText()
promptForPasswordTipText in interface OptionalPasswordPromptpublic void setStopFlowIfCanceled(boolean value)
setStopFlowIfCanceled in interface InteractiveActorvalue - if true flow gets stopped if dialog canceledpublic boolean getStopFlowIfCanceled()
getStopFlowIfCanceled in interface InteractiveActorpublic String stopFlowIfCanceledTipText()
stopFlowIfCanceledTipText in interface InteractiveActorpublic void setCustomStopMessage(String value)
setCustomStopMessage in interface InteractiveActorthe - stop messagepublic String getCustomStopMessage()
getCustomStopMessage in interface InteractiveActorpublic String customStopMessageTipText()
customStopMessageTipText in interface InteractiveActorpublic boolean doInteract()
doInteract in interface InteractiveActor
public void initializeSmtpSession(AbstractSendEmail sendEmail)
throws Exception
sendEmail - the object to initialize
Exception - if initialization failsprotected String doExecute()
doExecute in class AbstractActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||