Package com.redwood.scheduler.api.model
Interface MailConnector
-
- All Superinterfaces:
ApplicationObject,BusinessKeyObject,MailConnectorComp,NamedRootObject,NamedRootObjectComp,PartitionableObject,PartitionableObjectComp,Readable,Root,SchedulerEntity,SchedulerEntityComp,UniqueNamedApplicationObject
public interface MailConnector extends MailConnectorComp, UniqueNamedApplicationObject, Readable
E-Mail connection settings.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "MailConnector" objects.static StringSEC_PRIV_BUSINESSAUTOMATIONAPIThis privilege can be granted at an instance level.static StringSEC_PRIV_CONTROLThis privilege can be granted at a group level.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWThis privilege can be granted at a group level.static StringSEC_RANK_ADMINISTRATORThis rank is made of the following privileges: view , controlstatic StringSEC_RANK_ALLThis rank is made of the following privileges: create , view , control , edit , delete , businessAutomationAPIstatic StringSEC_RANK_BUSINESSAUTOMATIONUSERThis rank is made of the following privileges: view , businessAutomationAPIstatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , view , control , deletestatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , view , control , editstatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringSEC_RANK_VIEWThis rank is made of the following privileges: viewstatic QueryObjectType<MailConnector>TYPEType that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequiredPermissioncheckBusinessAutomationAPIPrivilege()Check whether or not the businessAutomationAPI action can be performed on this object.StringcheckConnection()Check the connection string for validity.RequiredPermissioncheckControlPrivilege()Check whether or not the control action can be performed on this object.RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckViewPrivilege()Check whether or not the view action can be performed on this object.MailConnectionSettingcreateMailConnectionSetting()Create a newMailConnectionSettinglinked to this object.StringdecodeArmor(String armor)Decrypts the armor to get data back.String[]encodeArmor(String data)Encrypts any string input as armor.StringgetErrorFolder()Get the value for ErrorFolder.StringgetInboxFolder()Get the value for InboxFolder.JobDefinitiongetJobDefinition()Get the JobDefinition.RWIterable<MailConnectionSetting>getMailConnectionSettings()Get anRWIterableover an ordered collection ofMailConnectionSettings.StringgetMonitorRootPath()Get the root path label to use for the Mail Connector in the monitor tree.StringgetPassword()Get the value for Password.LonggetPollInterval()Get the value for PollInterval.StringgetProcessedFolder()Get the value for ProcessedFolder.MailConnectionProtocolgetProtocol()Get the value for Protocol.StringgetServer()Get the value for Server.StringgetServerSecret()Get the value for ServerSecret.ProcessServerStatusgetStatus()Get the value for Status.StringgetUsername()Get the value for Username.booleanisStartOnStartup()Get the value for StartOnStartup.voidsetErrorFolder(String newErrorFolder)Set the value for ErrorFolder.voidsetInboxFolder(String newInboxFolder)Set the value for InboxFolder.voidsetJobDefinition(JobDefinition newJobDefinition)Set the value for JobDefinition.voidsetPassword(String newPassword)Set the value for Password.voidsetPollInterval(Long newPollInterval)Set the value for PollInterval.voidsetProcessedFolder(String newProcessedFolder)Set the value for ProcessedFolder.voidsetProtocol(MailConnectionProtocol newProtocol)Set the value for Protocol.voidsetServer(String newServer)Set the value for Server.voidsetServerSecret(String newServerSecret)Set the value for ServerSecret.voidsetStartOnStartup(boolean newStartOnStartup)Set the value for StartOnStartup.voidsetUsername(String newUsername)Set the value for Username.voidstart()Start the mail connector.voidstop()Stop the mail connector normally.voidstop(ProcessServerStatus status)Stop the mail connector with Status.-
Methods inherited from interface com.redwood.scheduler.api.model.ApplicationObject
getParentApplication, setParentApplication
-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.NamedRootObject
createObjectReference, getComment, getDescription, getLinkedObjectReferenceByLinkedObject, getLinkedObjectReferenceByName, getLinkedObjectReferences, getName, getSearchName, getSourceObjectReferences, isHidden, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableObject
createObjectTag, getEditablePartitions, getObjectTagByObjectTagDefinition, getObjectTags, getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()for "MailConnector" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<MailConnector> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_CONTROL
static final String SEC_PRIV_CONTROL
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_BUSINESSAUTOMATIONAPI
static final String SEC_PRIV_BUSINESSAUTOMATIONAPI
This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_ADMINISTRATOR
static final String SEC_RANK_ADMINISTRATOR
This rank is made of the following privileges: view , control- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , control , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , control , delete- See Also:
- Constant Field Values
-
SEC_RANK_BUSINESSAUTOMATIONUSER
static final String SEC_RANK_BUSINESSAUTOMATIONUSER
This rank is made of the following privileges: view , businessAutomationAPI- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , control , edit , delete , businessAutomationAPI- See Also:
- Constant Field Values
-
-
Method Detail
-
getServer
String getServer()
Get the value for Server. (E-mail server) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getUsername
String getUsername()
Get the value for Username. (Username for the mail connection.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getPassword
String getPassword()
Get the value for Password. (The password for the connection)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getProtocol
MailConnectionProtocol getProtocol()
Get the value for Protocol. (Connection protocol) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getInboxFolder
String getInboxFolder()
Get the value for InboxFolder. (Inbox folder in the mailbox) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getErrorFolder
String getErrorFolder()
Get the value for ErrorFolder. (Error folder in the mailbox) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getProcessedFolder
String getProcessedFolder()
Get the value for ProcessedFolder. (Processed folder in the mailbox) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getPollInterval
Long getPollInterval()
Get the value for PollInterval. (Polling interval (in seconds) that servers as the upper bound for how often the check is performed. The value should be more as 5 seconds.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getStatus
ProcessServerStatus getStatus()
Get the value for Status. (The status of the BAE Connector.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
isStartOnStartup
boolean isStartOnStartup()
Get the value for StartOnStartup. (Start this mail connector at system startup.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getServerSecret
String getServerSecret()
Get the value for ServerSecret. (Server phrase used for generation of server key.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setServer
void setServer(String newServer)
Set the value for Server. (E-mail server) This value is mandatory.- Parameters:
newServer- the new value for Server. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setUsername
void setUsername(String newUsername)
Set the value for Username. (Username for the mail connection.) This value is mandatory.- Parameters:
newUsername- the new value for Username. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setPassword
void setPassword(String newPassword)
Set the value for Password. (The password for the connection) This value is optional.- Parameters:
newPassword- the new value for Password.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setProtocol
void setProtocol(MailConnectionProtocol newProtocol)
Set the value for Protocol. (Connection protocol) This value is mandatory.- Parameters:
newProtocol- the new value for Protocol. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setInboxFolder
void setInboxFolder(String newInboxFolder)
Set the value for InboxFolder. (Inbox folder in the mailbox) This value is mandatory.- Parameters:
newInboxFolder- the new value for InboxFolder. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setErrorFolder
void setErrorFolder(String newErrorFolder)
Set the value for ErrorFolder. (Error folder in the mailbox) This value is mandatory.- Parameters:
newErrorFolder- the new value for ErrorFolder. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setProcessedFolder
void setProcessedFolder(String newProcessedFolder)
Set the value for ProcessedFolder. (Processed folder in the mailbox) This value is mandatory.- Parameters:
newProcessedFolder- the new value for ProcessedFolder. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setPollInterval
void setPollInterval(Long newPollInterval)
Set the value for PollInterval. (Polling interval (in seconds) that servers as the upper bound for how often the check is performed. The value should be more as 5 seconds.) This value is mandatory.- Parameters:
newPollInterval- the new value for PollInterval. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setStartOnStartup
void setStartOnStartup(boolean newStartOnStartup)
Set the value for StartOnStartup. (Start this mail connector at system startup.)- Parameters:
newStartOnStartup- the new value for StartOnStartup.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setServerSecret
void setServerSecret(String newServerSecret)
Set the value for ServerSecret. (Server phrase used for generation of server key.) This value is optional.- Parameters:
newServerSecret- the new value for ServerSecret.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
checkConnection
String checkConnection()
Check the connection string for validity.- Returns:
- Return an error if the connection failed, otherwise return null.
-
start
void start()
Start the mail connector.
-
stop
void stop()
Stop the mail connector normally.
-
getMonitorRootPath
String getMonitorRootPath()
Get the root path label to use for the Mail Connector in the monitor tree. Depends on the configuration/Monitoring/MonitorRootPath registry key: (a) KeyValue = PartitionColonNonGlobal (default) -> if partition is GLOBAL return MailConnectorName else return Partition:MailConnectorName. (b) KeyValue = PartitionColonAlways -> Always return Partition:MailConnectorName. (c) KeyValue = PartitionPathAlways -> Always return Partition/MailConnectorName.- Returns:
- The String to use as the root path in the monitor tree
-
stop
void stop(ProcessServerStatus status)
Stop the mail connector with Status.- Parameters:
status- Status in which process server should stop.
-
encodeArmor
String[] encodeArmor(String data) throws com.redwood.scheduler.api.exception.MailInvalidArmorException
Encrypts any string input as armor.- Parameters:
data- Data that needs to be encrypted.- Returns:
- An array with lines for resulted armor
- Throws:
com.redwood.scheduler.api.exception.MailInvalidArmorException- Failed by encoding/decoding armor
-
decodeArmor
String decodeArmor(String armor) throws com.redwood.scheduler.api.exception.MailInvalidArmorException
Decrypts the armor to get data back.- Parameters:
armor- Armor that needs to be decrypted- Returns:
- A string with the decrypted data.
- Throws:
com.redwood.scheduler.api.exception.MailInvalidArmorException- Failed by encoding/decoding armor
-
getJobDefinition
JobDefinition getJobDefinition()
Get the JobDefinition.- Returns:
- JobDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
-
setJobDefinition
void setJobDefinition(JobDefinition newJobDefinition)
Set the value for JobDefinition. This value is mandatory.- Parameters:
newJobDefinition- is the object to set JobDefinition to. The process definition to trigger on getting a mail. If this isnull, then the object cannot be persisted.
-
getMailConnectionSettings
RWIterable<MailConnectionSetting> getMailConnectionSettings()
Get anRWIterableover an ordered collection ofMailConnectionSettings. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. Mail connection settings for a Mail connector.- Specified by:
getMailConnectionSettingsin interfaceMailConnectorComp- Returns:
- An
RWIterableover an ordered collection ofMailConnectionSettingobjects .
-
createMailConnectionSetting
MailConnectionSetting createMailConnectionSetting()
Create a newMailConnectionSettinglinked to this object.- Returns:
- a new
MailConnectionSetting.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkControlPrivilege
RequiredPermission checkControlPrivilege()
Check whether or not the control action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkBusinessAutomationAPIPrivilege
RequiredPermission checkBusinessAutomationAPIPrivilege()
Check whether or not the businessAutomationAPI action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-