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 String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "MailConnector" objects.static String
SEC_PRIV_BUSINESSAUTOMATIONAPI
This privilege can be granted at an instance level.static String
SEC_PRIV_CONTROL
This privilege can be granted at a group level.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ADMINISTRATOR
This rank is made of the following privileges: view , controlstatic String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , control , edit , delete , businessAutomationAPIstatic String
SEC_RANK_BUSINESSAUTOMATIONUSER
This rank is made of the following privileges: view , businessAutomationAPIstatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , control , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , control , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<MailConnector>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
COPYRIGHT_MESSAGE_BKO, ID_BKO
-
Fields inherited from interface com.redwood.scheduler.api.model.Readable
COPYRIGHT_MESSAGE_E, ID_E
-
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 RequiredPermission
checkBusinessAutomationAPIPrivilege()
Check whether or not the businessAutomationAPI action can be performed on this object.String
checkConnection()
Check the connection string for validity.RequiredPermission
checkControlPrivilege()
Check whether or not the control action can be performed on this object.RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.MailConnectionSetting
createMailConnectionSetting()
Create a newMailConnectionSetting
linked to this object.String
decodeArmor(String armor)
Decrypts the armor to get data back.String[]
encodeArmor(String data)
Encrypts any string input as armor.String
getErrorFolder()
Get the value for ErrorFolder.String
getInboxFolder()
Get the value for InboxFolder.JobDefinition
getJobDefinition()
Get the JobDefinition.RWIterable<MailConnectionSetting>
getMailConnectionSettings()
Get anRWIterable
over an ordered collection ofMailConnectionSettings
.String
getMonitorRootPath()
Get the root path label to use for the Mail Connector in the monitor tree.String
getPassword()
Get the value for Password.Long
getPollInterval()
Get the value for PollInterval.String
getProcessedFolder()
Get the value for ProcessedFolder.MailConnectionProtocol
getProtocol()
Get the value for Protocol.String
getServer()
Get the value for Server.String
getServerSecret()
Get the value for ServerSecret.ProcessServerStatus
getStatus()
Get the value for Status.String
getUsername()
Get the value for Username.boolean
isStartOnStartup()
Get the value for StartOnStartup.void
setErrorFolder(String newErrorFolder)
Set the value for ErrorFolder.void
setInboxFolder(String newInboxFolder)
Set the value for InboxFolder.void
setJobDefinition(JobDefinition newJobDefinition)
Set the value for JobDefinition.void
setPassword(String newPassword)
Set the value for Password.void
setPollInterval(Long newPollInterval)
Set the value for PollInterval.void
setProcessedFolder(String newProcessedFolder)
Set the value for ProcessedFolder.void
setProtocol(MailConnectionProtocol newProtocol)
Set the value for Protocol.void
setServer(String newServer)
Set the value for Server.void
setServerSecret(String newServerSecret)
Set the value for ServerSecret.void
setStartOnStartup(boolean newStartOnStartup)
Set the value for StartOnStartup.void
setUsername(String newUsername)
Set the value for Username.void
start()
Start the mail connector.void
stop()
Stop the mail connector normally.void
stop(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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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 MailInvalidArmorException
Encrypts any string input as armor.- Parameters:
data
- Data that needs to be encrypted.- Returns:
- An array with lines for resulted armor
- Throws:
MailInvalidArmorException
- Failed by encoding/decoding armor
-
decodeArmor
String decodeArmor(String armor) throws MailInvalidArmorException
Decrypts the armor to get data back.- Parameters:
armor
- Armor that needs to be decrypted- Returns:
- A string with the decrypted data.
- Throws:
MailInvalidArmorException
- Failed by encoding/decoding armor
-
getJobDefinition
JobDefinition getJobDefinition()
Get the JobDefinition.- Returns:
- JobDefinition
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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 anRWIterable
over 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:
getMailConnectionSettings
in interfaceMailConnectorComp
- Returns:
- An
RWIterable
over an ordered collection ofMailConnectionSetting
objects .
-
createMailConnectionSetting
MailConnectionSetting createMailConnectionSetting()
Create a newMailConnectionSetting
linked 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-