Package com.redwood.scheduler.api.model
Interface FileEventDefinition
-
- All Superinterfaces:
Detail
,EventSourceDefinition
,Readable
,SchedulerEntity
,SchedulerEntityComp
public interface FileEventDefinition extends EventSourceDefinition, Readable
Definition for a file event. File event definitions specify when the parent event definition should raise an event, based on a set of criteria. (The event that is raised will have a FileEvent attached that provides more information about the file that caused the event.)
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "FileEventDefinition" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<FileEventDefinition>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
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 String
getDirectory()
Get the value for Directory.Long
getMinimalAge()
Get the value for MinimalAge.Long
getMinimalSize()
Get the value for MinimalSize.String
getMoveDirectory()
Get the value for MoveDirectory.String
getPattern()
Get the value for Pattern.Long
getPollInterval()
Get the value for PollInterval.ProcessServer
getProcessServer()
Get the ProcessServer.String
getRaiseComment()
Get the value for RaiseComment.boolean
isCheckLock()
Get the value for CheckLock.boolean
isOverwriteFile()
Get the value for OverwriteFile.void
setCheckLock(boolean newCheckLock)
Set the value for CheckLock.void
setDirectory(String newDirectory)
Set the value for Directory.void
setMinimalAge(Long newMinimalAge)
Set the value for MinimalAge.void
setMinimalSize(Long newMinimalSize)
Set the value for MinimalSize.void
setMoveDirectory(String newMoveDirectory)
Set the value for MoveDirectory.void
setOverwriteFile(boolean newOverwriteFile)
Set the value for OverwriteFile.void
setPattern(String newPattern)
Set the value for Pattern.void
setPollInterval(Long newPollInterval)
Set the value for PollInterval.void
setProcessServer(ProcessServer newProcessServer)
Set the value for ProcessServer.void
setRaiseComment(String newRaiseComment)
Set the value for RaiseComment.-
Methods inherited from interface com.redwood.scheduler.api.model.EventSourceDefinition
getComment, getDescription, getEventDefinition, getName, getSearchName, isEnabled, setComment, setDescription, setEnabled, setName
-
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 "FileEventDefinition" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<FileEventDefinition> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getDirectory
String getDirectory()
Get the value for Directory. (Directory containing files to match.) 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.
-
getPattern
String getPattern()
Get the value for Pattern. (Pattern for files to match.) 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.
-
getMoveDirectory
String getMoveDirectory()
Get the value for MoveDirectory. (Directory or Filename specification that the detected file for this FileEvent will be renamed to. If the specification does not contain substitution variables, it must indicate an existing directory. If it does contain substitution variables, the resulting path must indicate a directory and a non-null file part that does not exist yet, or just a non-null file part that does not exist yet. In the last case the file will remain in the same directory, but with a new filename. The following substitutions can take place:${BaseDirectory}
will be replaced by the base directory of the detected file.${BaseName}
will be replaced by the base filename of the detected file.${CurrentDateTime}
will be replaced by the date/time the file was detected, in a string formatYYYYMMDDHHMMSS
.${CurrentTimeStamp}
will be replaced by the timestamp the file was detected, in a numeric format containing the milliseconds since 1970.${DateTime}
deprecated in favor of${CurrentDateTime}
.${Dot}
will be replaced by a dot if the detected file had an extension, and nothing otherwise.${Extension}
will be replaced by the extension of the detected file.${FileName}
will be replaced by the name of the detected file (including extension).${FileDateTime}
will be replaced by the modification date/time that the detected file has, in a string formatYYYYMMDDHHMMSS
.${FileTimeStamp}
will be replaced by the modification timestamp that the detected file has, in a numeric format containing the milliseconds since 1970.${Name}
will be replaced by the base filename plus extension of the detected file.${TimeStamp}
deprecated in favor of${CurrentTimeStamp}
.${UniqueId}
will be replaced by the unique id of the file event.
- 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 for new files, specified in 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.
-
isCheckLock
boolean isCheckLock()
Get the value for CheckLock. (Check whether the file in use before raising the event. This is a very expensive operation on UNIX systems, so use of this option on such systems is discouraged. It is recommended that you use the minimum file size and file age or file stability criteria instead.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isOverwriteFile
boolean isOverwriteFile()
Get the value for OverwriteFile. (Allow deletion if the file already exists in the move directory?)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaiseComment
String getRaiseComment()
Get the value for RaiseComment. (Comment that will be set as RaiserComment on a newly raised file event. The following substitutions can take place:${CurrentDateTime}
will be replaced by the date/time (agent) at which the file was detected, in a string formatYYYYMMDDHHMMSS
.${CurrentTimeStamp}
will be replaced by the timestamp (agent) at which the file was detected, in a numeric format containing the milliseconds since 1970.${FileDateTime}
will be replaced by the modification date/time (agent) that the detected file has, in a string formatYYYYMMDDHHMMSS
.${FileTimeStamp}
will be replaced by the modification timestamp (agent) that the detected file has, in a numeric format containing the milliseconds since 1970.${filename}
will be replaced by the full path of the detected file.${finalPath}
will be replaced by the new path of the detected file (after the move).${server}
will be replaced by the detected file.${ServerDateTime}
will be replaced by the modification date/time (central server) that the detected file has, in a string formatYYYYMMDDHHMMSS
.${ServerTimeStamp}
will be replaced by the modification timestamp (central server) that the detected file has, in a numeric format containing the milliseconds since 1970.
null
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.
-
getMinimalSize
Long getMinimalSize()
Get the value for MinimalSize. (Minimum size of the file in bytes before the event is raised.) 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.
-
getMinimalAge
Long getMinimalAge()
Get the value for MinimalAge. (Minimum age of the file in seconds before the event is raised. A negative value is also allowed, in which case the system will check that the file timestamp does not change for the number of seconds indicated.) 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.
-
setDirectory
void setDirectory(String newDirectory)
Set the value for Directory. (Directory containing files to match.) This value is mandatory.- Parameters:
newDirectory
- the new value for Directory. 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.
-
setPattern
void setPattern(String newPattern)
Set the value for Pattern. (Pattern for files to match.) This value is mandatory.- Parameters:
newPattern
- the new value for Pattern. 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.
-
setMoveDirectory
void setMoveDirectory(String newMoveDirectory)
Set the value for MoveDirectory. (Directory or Filename specification that the detected file for this FileEvent will be renamed to. If the specification does not contain substitution variables, it must indicate an existing directory. If it does contain substitution variables, the resulting path must indicate a directory and a non-null file part that does not exist yet, or just a non-null file part that does not exist yet. In the last case the file will remain in the same directory, but with a new filename. The following substitutions can take place:${BaseDirectory}
will be replaced by the base directory of the detected file.${BaseName}
will be replaced by the base filename of the detected file.${CurrentDateTime}
will be replaced by the date/time the file was detected, in a string formatYYYYMMDDHHMMSS
.${CurrentTimeStamp}
will be replaced by the timestamp the file was detected, in a numeric format containing the milliseconds since 1970.${DateTime}
deprecated in favor of${CurrentDateTime}
.${Dot}
will be replaced by a dot if the detected file had an extension, and nothing otherwise.${Extension}
will be replaced by the extension of the detected file.${FileName}
will be replaced by the name of the detected file (including extension).${FileDateTime}
will be replaced by the modification date/time that the detected file has, in a string formatYYYYMMDDHHMMSS
.${FileTimeStamp}
will be replaced by the modification timestamp that the detected file has, in a numeric format containing the milliseconds since 1970.${Name}
will be replaced by the base filename plus extension of the detected file.${TimeStamp}
deprecated in favor of${CurrentTimeStamp}
.${UniqueId}
will be replaced by the unique id of the file event.
- Parameters:
newMoveDirectory
- the new value for MoveDirectory.- 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 for new files, specified in 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.
-
setCheckLock
void setCheckLock(boolean newCheckLock)
Set the value for CheckLock. (Check whether the file in use before raising the event. This is a very expensive operation on UNIX systems, so use of this option on such systems is discouraged. It is recommended that you use the minimum file size and file age or file stability criteria instead.)- Parameters:
newCheckLock
- the new value for CheckLock.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setOverwriteFile
void setOverwriteFile(boolean newOverwriteFile)
Set the value for OverwriteFile. (Allow deletion if the file already exists in the move directory?)- Parameters:
newOverwriteFile
- the new value for OverwriteFile.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRaiseComment
void setRaiseComment(String newRaiseComment)
Set the value for RaiseComment. (Comment that will be set as RaiserComment on a newly raised file event. The following substitutions can take place:${CurrentDateTime}
will be replaced by the date/time (agent) at which the file was detected, in a string formatYYYYMMDDHHMMSS
.${CurrentTimeStamp}
will be replaced by the timestamp (agent) at which the file was detected, in a numeric format containing the milliseconds since 1970.${FileDateTime}
will be replaced by the modification date/time (agent) that the detected file has, in a string formatYYYYMMDDHHMMSS
.${FileTimeStamp}
will be replaced by the modification timestamp (agent) that the detected file has, in a numeric format containing the milliseconds since 1970.${filename}
will be replaced by the full path of the detected file.${finalPath}
will be replaced by the new path of the detected file (after the move).${server}
will be replaced by the detected file.${ServerDateTime}
will be replaced by the modification date/time (central server) that the detected file has, in a string formatYYYYMMDDHHMMSS
.${ServerTimeStamp}
will be replaced by the modification timestamp (central server) that the detected file has, in a numeric format containing the milliseconds since 1970.
- Parameters:
newRaiseComment
- the new value for RaiseComment. 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.
-
setMinimalSize
void setMinimalSize(Long newMinimalSize)
Set the value for MinimalSize. (Minimum size of the file in bytes before the event is raised.) This value is mandatory.- Parameters:
newMinimalSize
- the new value for MinimalSize. 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.
-
setMinimalAge
void setMinimalAge(Long newMinimalAge)
Set the value for MinimalAge. (Minimum age of the file in seconds before the event is raised. A negative value is also allowed, in which case the system will check that the file timestamp does not change for the number of seconds indicated.) This value is mandatory.- Parameters:
newMinimalAge
- the new value for MinimalAge. 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.
-
getProcessServer
ProcessServer getProcessServer()
Get the ProcessServer.- Returns:
- ProcessServer
- 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.
-
setProcessServer
void setProcessServer(ProcessServer newProcessServer)
Set the value for ProcessServer. This value is mandatory.- Parameters:
newProcessServer
- is the object to set ProcessServer to. Which process server should watch for a particular file event. If this isnull
, then the object cannot be persisted.
-
-