Package com.uc4.api.objects
Class FileSystem
- java.lang.Object
-
- com.uc4.api.objects.FileSystem
-
public class FileSystem extends java.lang.ObjectThis class represents the "FileSystem" tab of an file event object.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFILE_NONE"None" file typestatic java.lang.StringFILE_SIZEFile size.static java.lang.StringFILESYSTEM_SPACE_FREEFree space of volumes (OS/390) or of a drive (Windows).static java.lang.StringOPERATOR_EQUAL=.static java.lang.StringOPERATOR_GREATER>.static java.lang.StringOPERATOR_GREATER_EQUAL>=.static java.lang.StringOPERATOR_LOWER<.static java.lang.StringOPERATOR_LOWER_EQUAL<=.static java.lang.StringOPERATOR_NOT_EQUAL<>.static java.lang.StringPATH_FILE_COUNTNumber of files.static java.lang.StringPATH_SPACE_UNUSEDFree drive space.static java.lang.StringPATH_SPACE_USEDUsed drive space.static java.lang.StringSKIP_NAME_CHECKSkip UC4ObjectName check.static java.lang.String[]VALID_TYPESAll the valid file types
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileSystem(com.uc4.util.XMLDocument doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangedWithin(int seconds)Adds an additional condition for the event: The file modification that must have changed within the specified amount of seconds.java.lang.StringgetFileType()Returns the file type.UC4HostNamegetHost()Returns the name of the Agent for this FileEvent.java.lang.StringgetHostType()Returns the Host type valueUC4ObjectNamegetLogin()Returns the name of the login object assigned "FileSystem" tab of an file event object.java.lang.StringgetOperator()Returns the operator.java.lang.StringgetPath()intgetTimerControlMinutes()Returns the interval in minutes.TimegetTimerControlStartTime()Gets the start time of the event.java.lang.StringgetUnit()longgetValue()intgetWithinSeconds()booleanhasAdditionalChangedCondition()booleanhasAdditionalStableCondition()booleanisConsiderAll()booleanisExecuteAfterScheduledTime()booleanisExecutionTypeRepeated()booleanisExecutionTypeSingle()booleanisExecutionTypeUntilFirstHit()booleanisFirstExecutionAfterExpire()booleanisFirstExecutionImmediately()booleanisInclSubDir()booleanisStartupEvent()booleanisTimerControlAuto()booleanisTimerControlInterval()booleanisTimerControlStartTime()voidremoveAdditionalConditions()Removes additional FILE_STABLE/FILE_CHANGED conditions.voidsetConsiderAll(boolean considerAll)Sets a flag that which is used to determine if all files should be considered in the check or not.voidsetExecuteAfterScheduledTime(boolean executeAfterScheduledTime)Defines if the event should start after the scheduled time.voidsetExecutionTypeRepeated()Sets the execution type to repeated.voidsetExecutionTypeSingle()Sets the execution type to single.voidsetExecutionTypeUntilFirstHit()Sets the execution type to "Until first hit".voidsetFileType(java.lang.String fileType)Sets the file type.voidsetFirstExecutionAfterExpire()Sets the first execution after time is expired .voidsetFirstExecutionImmediately()Sets the first execution immediately.voidsetHost(UC4HostName host, java.lang.String hostType)Sets the Agent for this Event.voidsetInclSubDir(boolean inclSubDir)Enables or disables the search in sub directories.voidsetLogin(UC4ObjectName loginObject)Sets the name of the login object this field just effect on HostType WIN, UNIX Os/390 (MVS).voidsetOperator(java.lang.String operator)Sets the operator.voidsetPath(java.lang.String path)Sets the path.voidsetStartupEvent(boolean startupEvent)voidsetTimerControlAuto()Sets the TimeControl to Auto.voidsetTimerControlInterval(int interval)Sets the polling interval in minutes.voidsetTimerControlStartTime(Time start)Sets the start time of the event.voidsetUnit(java.lang.String unit)Sets the unit of the value.voidsetValue(long value)Sets the current value.voidstableWithin(int seconds)Adds an additional condition for the event: The file must be stable within the specified number of seconds.protected voidstore(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request)
-
-
-
Field Detail
-
PATH_SPACE_UNUSED
public static final java.lang.String PATH_SPACE_UNUSED
Free drive space.- See Also:
- Constant Field Values
-
PATH_FILE_COUNT
public static final java.lang.String PATH_FILE_COUNT
Number of files.- See Also:
- Constant Field Values
-
FILE_SIZE
public static final java.lang.String FILE_SIZE
File size.- See Also:
- Constant Field Values
-
FILESYSTEM_SPACE_FREE
public static final java.lang.String FILESYSTEM_SPACE_FREE
Free space of volumes (OS/390) or of a drive (Windows).- See Also:
- Constant Field Values
-
PATH_SPACE_USED
public static final java.lang.String PATH_SPACE_USED
Used drive space.- See Also:
- Constant Field Values
-
FILE_NONE
public static final java.lang.String FILE_NONE
"None" file type- See Also:
- Constant Field Values
-
VALID_TYPES
public static final java.lang.String[] VALID_TYPES
All the valid file types
-
OPERATOR_GREATER
public static final java.lang.String OPERATOR_GREATER
>.- See Also:
- Constant Field Values
-
OPERATOR_LOWER
public static final java.lang.String OPERATOR_LOWER
<.- See Also:
- Constant Field Values
-
OPERATOR_EQUAL
public static final java.lang.String OPERATOR_EQUAL
=.- See Also:
- Constant Field Values
-
OPERATOR_GREATER_EQUAL
public static final java.lang.String OPERATOR_GREATER_EQUAL
>=.- See Also:
- Constant Field Values
-
OPERATOR_LOWER_EQUAL
public static final java.lang.String OPERATOR_LOWER_EQUAL
<=.- See Also:
- Constant Field Values
-
OPERATOR_NOT_EQUAL
public static final java.lang.String OPERATOR_NOT_EQUAL
<>.- See Also:
- Constant Field Values
-
SKIP_NAME_CHECK
public static final java.lang.String SKIP_NAME_CHECK
Skip UC4ObjectName check.- See Also:
- Constant Field Values
-
-
Method Detail
-
setLogin
public void setLogin(UC4ObjectName loginObject)
Sets the name of the login object this field just effect on HostType WIN, UNIX Os/390 (MVS).- Parameters:
loginObject- login object
-
stableWithin
public void stableWithin(int seconds)
Adds an additional condition for the event: The file must be stable within the specified number of seconds.- Parameters:
seconds- Number of seconds
-
getWithinSeconds
public int getWithinSeconds()
- Returns:
- Returns the number of seconds for an additional stable/changed critera
-
changedWithin
public void changedWithin(int seconds)
Adds an additional condition for the event: The file modification that must have changed within the specified amount of seconds.- Parameters:
seconds- Number of seconds
-
hasAdditionalStableCondition
public boolean hasAdditionalStableCondition()
- Returns:
trueif the additional FILE_STABLE condition has been set.
-
hasAdditionalChangedCondition
public boolean hasAdditionalChangedCondition()
- Returns:
trueif the additional FILE_CHANGED condition has been set.
-
removeAdditionalConditions
public void removeAdditionalConditions()
Removes additional FILE_STABLE/FILE_CHANGED conditions. This is the same as selecting an empty entry in the Dropdownbox in the GUI.
-
store
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request)
-
isConsiderAll
public boolean isConsiderAll()
- Returns:
- true if all files should be considered, false otherwise
-
setConsiderAll
public void setConsiderAll(boolean considerAll)
Sets a flag that which is used to determine if all files should be considered in the check or not.- Parameters:
considerAll- true if all files should be considered, false otherwise
-
getUnit
public java.lang.String getUnit()
- Returns:
- Unit
-
setUnit
public void setUnit(java.lang.String unit)
Sets the unit of the value. The parameterunitcan contain the following values:- bytes
- KB
- MB
- GB
- TB
- HostSpecific
- Parameters:
unit- Unit
-
isStartupEvent
public boolean isStartupEvent()
- Returns:
- Startup Event setting if the Host type is "MVS".
-
setStartupEvent
public void setStartupEvent(boolean startupEvent)
- Parameters:
startupEvent- Startup Event setting if the Host type is "MVS".
-
isInclSubDir
public boolean isInclSubDir()
- Returns:
- true if sub directories should be included
-
setInclSubDir
public void setInclSubDir(boolean inclSubDir)
Enables or disables the search in sub directories.- Parameters:
inclSubDir- true if sub directories should be considered
-
getValue
public long getValue()
- Returns:
- The current value
-
setValue
public void setValue(long value)
Sets the current value.- Parameters:
value- positive Number
-
getOperator
public java.lang.String getOperator()
Returns the operator. This is one of the constants defined in this class which start with OPERATOR.- Returns:
- Operator
-
setOperator
public void setOperator(java.lang.String operator)
Sets the operator. The parameteroperatormust be one of the OPERATOR* constants defined in this class.- Parameters:
operator- Operator
-
getFileType
public java.lang.String getFileType()
Returns the file type. The returned value is equal to one of the public constants defined in this class- FILE_NONE
- PATH_SPACE_UNUSED
- PATH_FILE_COUNT
- FILESYSTEM_SPACE_FREE
- PATH_SPACE_USED
- FILE_SIZE
- Returns:
- File type
-
setFileType
public void setFileType(java.lang.String fileType)
Sets the file type. The parameterfileTypemust be one of the constants defined in this class:- FILE_NONE
- PATH_SPACE_UNUSED
- PATH_FILE_COUNT
- PATH_SPACE_USED
- FILESYSTEM_SPACE_FREE
- PATH_SPACE_USED
- FILE_SIZE
- Parameters:
fileType- File type
-
getPath
public java.lang.String getPath()
- Returns:
- Returns the Path
-
setPath
public void setPath(java.lang.String path)
Sets the path.- Parameters:
path- Path
-
setHost
public void setHost(UC4HostName host, java.lang.String hostType)
Sets the Agent for this Event.- Parameters:
host- HosthostType- Type of the host (for example WINDOWS)
-
getHost
public UC4HostName getHost()
Returns the name of the Agent for this FileEvent.- Returns:
- host
-
getLogin
public UC4ObjectName getLogin()
Returns the name of the login object assigned "FileSystem" tab of an file event object.- Returns:
- login object
-
isExecuteAfterScheduledTime
public boolean isExecuteAfterScheduledTime()
- Returns:
- True if the event should be started after the scheduled time
-
setExecuteAfterScheduledTime
public void setExecuteAfterScheduledTime(boolean executeAfterScheduledTime)
Defines if the event should start after the scheduled time.- Parameters:
executeAfterScheduledTime- True if the event should be started after the scheduled time
-
isFirstExecutionAfterExpire
public boolean isFirstExecutionAfterExpire()
- Returns:
- True if the first execution should be done after time is expired
-
isFirstExecutionImmediately
public boolean isFirstExecutionImmediately()
- Returns:
- True if the first execution should be done immediately
-
setFirstExecutionImmediately
public void setFirstExecutionImmediately()
Sets the first execution immediately.
-
setFirstExecutionAfterExpire
public void setFirstExecutionAfterExpire()
Sets the first execution after time is expired .
-
setExecutionTypeRepeated
public void setExecutionTypeRepeated()
Sets the execution type to repeated.
-
isExecutionTypeRepeated
public boolean isExecutionTypeRepeated()
- Returns:
- True if the execution type is repeated
-
setExecutionTypeSingle
public void setExecutionTypeSingle()
Sets the execution type to single.
-
isExecutionTypeSingle
public boolean isExecutionTypeSingle()
- Returns:
- True if the execution type is set to single
-
setExecutionTypeUntilFirstHit
public void setExecutionTypeUntilFirstHit()
Sets the execution type to "Until first hit".
-
isExecutionTypeUntilFirstHit
public boolean isExecutionTypeUntilFirstHit()
- Returns:
- True if the execution type is set to "Until first hit"
-
isTimerControlInterval
public boolean isTimerControlInterval()
- Returns:
- True if the Event is executed in a defined interval
-
setTimerControlInterval
public void setTimerControlInterval(int interval)
Sets the polling interval in minutes.- Parameters:
interval- Interval in minutes
-
setTimerControlAuto
public void setTimerControlAuto()
Sets the TimeControl to Auto.
-
isTimerControlAuto
public boolean isTimerControlAuto()
- Returns:
- true if Timer is Auto
-
getTimerControlMinutes
public int getTimerControlMinutes()
Returns the interval in minutes.- Returns:
- Timer Interval in minutes
-
isTimerControlStartTime
public boolean isTimerControlStartTime()
- Returns:
- True if the Event is set to be executed at a defined time
-
getTimerControlStartTime
public Time getTimerControlStartTime()
Gets the start time of the event.- Returns:
- Start time
-
setTimerControlStartTime
public void setTimerControlStartTime(Time start)
Sets the start time of the event.- Parameters:
start- Start time
-
getHostType
public java.lang.String getHostType()
Returns the Host type value- Returns:
- hostType
-
-