Package com.uc4.api.objects
Class AttributesWin
- java.lang.Object
-
- com.uc4.api.objects.AttributesWin
-
- All Implemented Interfaces:
IHostAttributes
public class AttributesWin extends java.lang.Object implements IHostAttributes
Host attributes for Windows Jobs.
-
-
Constructor Summary
Constructors Constructor Description AttributesWin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfieldCount()Returns the number of fields in the host attributes.java.lang.StringgetCommand()Returns the program to be executed.java.lang.StringgetWorkingDirectory()Returns the working directory in which the Job should run.booleanisGeneratedByScript()Returnstrueif the Job report is generated by script.booleanisJobObjectDefault()Returnstrueif Job Object is set to default.booleanisJobObjectNo()Returnstrueif Job Object is set to no.booleanisJobObjectYes()Returnstrueif Job Object is set to yes.booleanisLogOnAsBatch()Returnstrueif the Job is executed in batch mode.booleanisReportDatabase()Returns whether the Job report transfered to the database.booleanisReportErrorOnly()Returnstrueif the Job report will be stored only in case of Job interruption.booleanisReportFile()Returnstrueif the Job report is stored in the file system on the target system.booleanisShowAtDesktop()Returnstrueif the Job is executed and visible to a logged-on user.booleanisTypeBAT()Returnstrueif type BAT is selected.booleanisTypeCOM()Returnstrueif type COM is selected.booleanisTypeInterpreter()Returnstrueif type Interpreter is selected.booleanisViewMaximized()Returnstrueif the view is set to maximized.booleanisViewMinimized()Returnstrueif the view is set to minimized.booleanisViewStandard()Returnstrueif the view is set to standard.voidload(com.uc4.util.XMLDocument doc, org.w3c.dom.Element hostAttr, ConnectionAttributes info)Loads the host attributes.java.lang.Stringname()Returns the host attributes name.voidsetCommand(java.lang.String command)Sets the program to be executed.voidsetGeneratedByScript(boolean isGeneratedByScript)Sets whether the script should generate the Job report instead of STDOUT/STERR.voidsetJobObjectDefault()Whether or not the Windows Job Object is used depends on the configuration settings made in the INI file of the Agent.voidsetJobObjectNo()The Job does not use the Windows Job Object.voidsetJobObjectYes()The Job uses the Windows Job Object.voidsetLogOnAsBatch(boolean logOnAsBatch)If set the Job is executed in batch mode and is not visible to a logged-on user.voidsetReportDatabase(boolean reportDatabase)Sets whether the Job report should be transfered to the database.voidsetReportErrorOnly(boolean reportErrorOnly)Sets whether the Job report should be stored only in case of Job interruption.voidsetReportFile(boolean reportFile)Sets whether the Job report should be stored in the file system on the target system.voidsetShowAtDesktop(boolean showAtDesktop)If set the Job is executed and visible to a logged-on user.voidsetTypeBAT()The script statements and DATA lines stored in the script are executed as MS-DOS batch file.voidsetTypeCOM()The program stored in the field "Command" is executed.voidsetTypeInterpreter()The processing stored in the script is transferred to an Interpreter as a file.voidsetViewMaximized()Sets the display to maximized.voidsetViewMinimized()Sets the display to minimized.voidsetViewStandard()Set the display to normal view.voidsetWorkingDirectory(java.lang.String workingDirectory)Sets the working directory in which the Job should run.voidstore(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes info)Writes the host attributes back to theXMLDocument.
-
-
-
Method Detail
-
fieldCount
public int fieldCount()
Description copied from interface:IHostAttributesReturns the number of fields in the host attributes.- Specified by:
fieldCountin interfaceIHostAttributes- Returns:
- number of fields
-
load
public void load(com.uc4.util.XMLDocument doc, org.w3c.dom.Element hostAttr, ConnectionAttributes info)Description copied from interface:IHostAttributesLoads the host attributes.- Specified by:
loadin interfaceIHostAttributes- Parameters:
doc- XML Document containing the JobhostAttr- Element which contains host attributesinfo- Session details
-
name
public java.lang.String name()
Description copied from interface:IHostAttributesReturns the host attributes name.- Specified by:
namein interfaceIHostAttributes- Returns:
- name
-
store
public void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes info)Description copied from interface:IHostAttributesWrites the host attributes back to theXMLDocument.- Specified by:
storein interfaceIHostAttributes- Parameters:
doc- DocumentobjectElement- ObjectElementinfo- Session details
-
isShowAtDesktop
public boolean isShowAtDesktop()
Returnstrueif the Job is executed and visible to a logged-on user.- Returns:
- Show job on the desktop
-
setShowAtDesktop
public void setShowAtDesktop(boolean showAtDesktop)
If set the Job is executed and visible to a logged-on user. This way the Job may be displayed in Windows during its processing in an MS DOS window.- Parameters:
showAtDesktop- Show job on the desktop
-
isLogOnAsBatch
public boolean isLogOnAsBatch()
Returnstrueif the Job is executed in batch mode.- Returns:
- Logon as batch user
-
setLogOnAsBatch
public void setLogOnAsBatch(boolean logOnAsBatch)
If set the Job is executed in batch mode and is not visible to a logged-on user.- Parameters:
logOnAsBatch- Logon as batch user
-
getCommand
public java.lang.String getCommand()
Returns the program to be executed.- Returns:
- Command
-
setCommand
public void setCommand(java.lang.String command)
Sets the program to be executed. The complete path may be specified if needed. Type "COM" is required. A maximum number of 255 characters is allowed forcommand.- Parameters:
command- Command
-
getWorkingDirectory
public java.lang.String getWorkingDirectory()
Returns the working directory in which the Job should run.- Returns:
- Working directory
-
setWorkingDirectory
public void setWorkingDirectory(java.lang.String workingDirectory)
Sets the working directory in which the Job should run. A maximum number of 255 characters is allowed forworkingDirectory.- Parameters:
workingDirectory- Working directory
-
isJobObjectNo
public boolean isJobObjectNo()
Returnstrueif Job Object is set to no.- Returns:
- No
-
setJobObjectNo
public void setJobObjectNo()
The Job does not use the Windows Job Object.
-
isJobObjectYes
public boolean isJobObjectYes()
Returnstrueif Job Object is set to yes.- Returns:
- Yes
-
setJobObjectYes
public void setJobObjectYes()
The Job uses the Windows Job Object.
-
isJobObjectDefault
public boolean isJobObjectDefault()
Returnstrueif Job Object is set to default.- Returns:
- Default
-
setJobObjectDefault
public void setJobObjectDefault()
Whether or not the Windows Job Object is used depends on the configuration settings made in the INI file of the Agent.
-
isViewMaximized
public boolean isViewMaximized()
Returnstrueif the view is set to maximized.- Returns:
- Maximized
-
setViewMaximized
public void setViewMaximized()
Sets the display to maximized. The display is enlarged to full screen.
-
isViewMinimized
public boolean isViewMinimized()
Returnstrueif the view is set to minimized.- Returns:
- Minimized
-
setViewMinimized
public void setViewMinimized()
Sets the display to minimized.
-
isViewStandard
public boolean isViewStandard()
Returnstrueif the view is set to standard.- Returns:
- Standard
-
setViewStandard
public void setViewStandard()
Set the display to normal view.
-
isTypeInterpreter
public boolean isTypeInterpreter()
Returnstrueif type Interpreter is selected.- Returns:
- Interpreter
-
setTypeInterpreter
public void setTypeInterpreter()
The processing stored in the script is transferred to an Interpreter as a file. For this, the INI file in the [GLOBAL] section must contain the following entries:ECPEXE=Interpreter
andECPEXT=File Extension.
-
isTypeCOM
public boolean isTypeCOM()
Returnstrueif type COM is selected.- Returns:
- Use Command field
-
setTypeCOM
public void setTypeCOM()
The program stored in the field "Command" is executed. The complete path and command line may be specified if needed.
-
isTypeBAT
public boolean isTypeBAT()
Returnstrueif type BAT is selected.- Returns:
- Use Batch file
-
setTypeBAT
public void setTypeBAT()
The script statements and DATA lines stored in the script are executed as MS-DOS batch file.
-
isGeneratedByScript
public boolean isGeneratedByScript()
Returnstrueif the Job report is generated by script.- Returns:
- Is generated by script
-
setGeneratedByScript
public void setGeneratedByScript(boolean isGeneratedByScript)
Sets whether the script should generate the Job report instead of STDOUT/STERR.- Parameters:
isGeneratedByScript- Is generated by script
-
isReportDatabase
public boolean isReportDatabase()
Returns whether the Job report transfered to the database.- Returns:
trueif the Job report is transfered to the databasefalseotherwise
-
setReportDatabase
public void setReportDatabase(boolean reportDatabase)
Sets whether the Job report should be transfered to the database.- Parameters:
reportDatabase-trueif the job report should be transfered to the databasefalseotherwise
-
isReportErrorOnly
public boolean isReportErrorOnly()
Returnstrueif the Job report will be stored only in case of Job interruption. This function is only available when "Database" and/or "File" have been selected.- Returns:
trueif the job report is stored only in case of Job interruption
-
setReportErrorOnly
public void setReportErrorOnly(boolean reportErrorOnly)
Sets whether the Job report should be stored only in case of Job interruption. This function is only available when "Database" and/or "File" have been selected.- Parameters:
reportErrorOnly-trueif the job report should be stored only in case of Job interruption
-
isReportFile
public boolean isReportFile()
Returnstrueif the Job report is stored in the file system on the target system.- Returns:
trueif the job report is stored in the file system.
-
setReportFile
public void setReportFile(boolean reportFile)
Sets whether the Job report should be stored in the file system on the target system.- Parameters:
reportFile-trueif the job report should be stored in the file system
-
-