public abstract class Trigger
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
Trigger.Protocol
Protocol represents the list of protocols which trigger supports
FTP, SSHFTP, LCOPY, HSP, AS2
|
static class |
Trigger.Status
Status represents the status of the trigger
|
static class |
Trigger.TRIGGER_TYPE
------------- Triggers to be added in this location ------------------
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
context
User session context at the time of the trigger
|
protected java.lang.String |
errorMessage
Errors which come while uploading/writing source file
|
protected java.lang.String |
folder |
protected java.lang.String |
host
The host name of the server where trigger executes
|
protected java.lang.String |
sessionId
The id of the session under which trigger executes
|
protected java.lang.String |
sourceFile
The canonical path of the uploaded file
By default this is a zero length to avoid null checks everywhere
|
protected Trigger.Status |
status
The status of the trigger type fileCreatedTrigger and sessionEndTrigger
It is either SUCCESS if trigger type is FileCreatedSuccess or SessionEndSuccess
or FAILURE if trigger type is FileCreatedFailure or SessionEndFailure
|
protected java.lang.Long |
triggerTimestamp
Time in milliseconds when trigger executes
|
| Constructor and Description |
|---|
Trigger() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
java.lang.Object |
clone()
Get the clone of the trigger object
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getActionId()
Return the Id of an action on which the trigger is scheduled
|
java.util.Map |
getContext()
Get user session context at the time of the trigger
|
java.lang.String |
getErrorMessage()
Get errors/exceptions came while uploading/writing source file
|
Trigger.Status |
getExecutionStatus()
Get the execution status of the trigger
It is either SUCCESS if trigger is executed successfully or
NOT_VALIDATED if trigger validation fails or
FAILURE if trigger is not executed
|
java.lang.String |
getFolder() |
java.lang.String |
getHost()
Get the Host Name
|
java.lang.String |
getScheduledType() |
java.lang.String |
getSessionId()
Get the session id under which trigger executes
|
java.lang.String |
getSourceFile()
Get the canonical path of the uploaded file
|
Trigger.Status |
getStatus()
Get the status of the trigger type for e.g- For fileCreatedTrigger it is either SUCCESS or FAILURE
same for the sessionEndTrigger
|
java.lang.String |
getStorageLocation()
Get the path of the persistor file which stores all triggers
|
java.lang.String |
getTriggerId()
Get the unique identifier of the trigger
|
java.lang.Long |
getTriggerTimestamp()
Get the timeStamp when trigger fires
|
java.lang.String |
getType() |
java.lang.String |
getValidationFailedMessage()
Get the validation failed message
|
int |
hashCode() |
void |
setActionId(java.lang.String actionId)
Set the Id of an action on which the trigger is scheduled
|
void |
setContext(java.util.Map context)
Set user session context at the time of the trigger
|
void |
setErrorMessage(java.lang.String errorMessage)
Set errors which came while uploading/writing source file
|
void |
setExecutionStatus(Trigger.Status executionStatus)
Set the execution status of the trigger
It is either SUCCESS if trigger is executed successfully or
NOT_VALIDATED if trigger validation fails or
FAILURE if trigger is not executed
|
void |
setFolder(java.lang.String folder) |
void |
setHost(java.lang.String host)
Set the Host Name
|
void |
setScheduledType(java.lang.String scheduledType) |
void |
setSessionId(java.lang.String sessionId)
Set the session id under which trigger executes
|
void |
setSourceFile(java.lang.String sourceFile)
Set the canonical path of the uploaded file
|
void |
setStatus(Trigger.Status status)
Set the status of the trigger type for e.g- For fileCreatedTrigger set to SUCCESS or FAILURE
same for the sessionEndTrigger
|
void |
setStorageLocation(java.lang.String storageLocation)
Set the path of the persistor file which stores all triggers
|
void |
setTriggerId(java.lang.String triggerId)
The unique identifier of the trigger
|
void |
setTriggerTimestamp(java.lang.Long triggerTimestamp)
Set the timeStamp when trigger fires
|
void |
setType(java.lang.String type) |
void |
setValidationFailedMessage(java.lang.String validationFailedMessage)
Set the proper message when any validation failed and trigger was not able to execute
|
java.util.Map<java.lang.String,java.lang.String> |
toMap()
Convert Trigger object to a Map
|
java.lang.String |
toString()
Convert trigger object to its string representation
|
protected java.lang.String sourceFile
protected Trigger.Status status
protected java.lang.String host
protected java.lang.String sessionId
protected java.lang.String errorMessage
protected java.util.Map context
protected java.lang.Long triggerTimestamp
protected java.lang.String folder
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<java.lang.String,java.lang.String> toMap()
public java.lang.String getTriggerId()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String getType()
public java.lang.Long getTriggerTimestamp()
public java.lang.String getScheduledType()
public void setTriggerId(java.lang.String triggerId)
public void setTriggerTimestamp(java.lang.Long triggerTimestamp)
triggerTimestamp - timeStamp in millisecondspublic void setType(java.lang.String type)
public void setScheduledType(java.lang.String scheduledType)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getStorageLocation()
public void setStorageLocation(java.lang.String storageLocation)
storageLocation - path of the filepublic java.lang.String getActionId()
public void setActionId(java.lang.String actionId)
actionId - Id of an action on which the trigger is scheduledpublic Trigger.Status getExecutionStatus()
public void setExecutionStatus(Trigger.Status executionStatus)
executionStatus - either SUCCESS, FAILURE or NOT_VALIDATEDpublic java.lang.String getValidationFailedMessage()
public void setValidationFailedMessage(java.lang.String validationFailedMessage)
validationFailedMessage - validation failed messagepublic java.lang.String getSourceFile()
public void setSourceFile(java.lang.String sourceFile)
sourceFile - location of the source filepublic Trigger.Status getStatus()
public void setStatus(Trigger.Status status)
status - either SUCCESS or FAILUREpublic java.lang.String getHost()
public void setHost(java.lang.String host)
host - Name of the serverpublic java.lang.String getSessionId()
public void setSessionId(java.lang.String sessionId)
sessionId - session IDpublic java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String errorMessage)
errorMessage - errors or exceptionspublic java.util.Map getContext()
public void setContext(java.util.Map context)
sessionContext - user session contextpublic java.lang.String getFolder()
public void setFolder(java.lang.String folder)