Class FileOperation
- java.lang.Object
-
- com.zerog.ia.auto.project.ProjectObject
-
- com.zerog.ia.auto.project.InstallableObject
-
- com.zerog.ia.auto.project.actions.Action
-
- com.zerog.ia.auto.project.actions.FileOperation
-
- All Implemented Interfaces:
OSHostable
,Referenceable
- Direct Known Subclasses:
CopyFile
,CopyFolder
,DeleteFile
,DeleteFolder
,MoveFile
,MoveFolder
public abstract class FileOperation extends Action implements OSHostable
A super class for all file based operations.
-
-
Constructor Summary
Constructors Constructor Description FileOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDestination()
The path of the file destination.java.lang.String
getDestinationRename()
The destination rename.java.lang.String
getExistingFilePath()
The path of the existing file to copy.FileOverwriteBehavior
getFileOverwriteBehavior()
The behavior when the file already exists in the target machine.FolderOptions
getFolderOptions()
The folder options.FileAction
getInstalledFile()
The installed file to copy.boolean
getOverrideUnixPermissions()
Whether the file unix permissions should be overwrited or not.boolean
getRename()
Whether rename the file.boolean
getShouldUninstall()
Whether the file should be uninstalled.java.lang.String
getUnixPermissions()
The unix file permissions to set to this file.boolean
getUseInstalledFile()
Returns whether an installed file or an existing file should be used by this action.void
setDestination(java.lang.String destination)
The path of the file destination.void
setDestinationRename(java.lang.String destinationRename)
The destination rename.void
setExistingFilePath(java.lang.String path)
The path of the existing file to copy.void
setFileOverwriteBehavior(FileOverwriteBehavior fileOverwriteBehavior)
The behavior when the file already exists in the target machine.void
setFolderOptions(FolderOptions options)
The folder options.void
setInstalledFile(FileAction installedFile)
Sets the installed file to copy.void
setOverrideUnixPermissions(boolean override)
Whether the file unix permissions should be overwrited or not.void
setRename(boolean rename)
Whether rename the file.void
setShouldUninstall(boolean uninstall)
Whether the file should be uninstalled.void
setUnixPermissions(java.lang.String permissions)
The unix file permissions to set to this file.void
setUseInstalledFile(boolean useInstalledFile)
Defines whether an installed file or an existing file should be used by this action.-
Methods inherited from class com.zerog.ia.auto.project.InstallableObject
getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules, getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel, setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece
-
Methods inherited from class com.zerog.ia.auto.project.ProjectObject
equals, getReferenceID, hashCode, setReferenceID
-
-
-
-
Method Detail
-
setInstalledFile
public void setInstalledFile(FileAction installedFile)
Sets the installed file to copy.- Parameters:
installedFile
- The file to copy.- See Also:
setUseInstalledFile(boolean)
-
getInstalledFile
public FileAction getInstalledFile()
The installed file to copy.- Returns:
- The file to copy.
-
getDestination
public java.lang.String getDestination()
The path of the file destination.- Returns:
- File destination
-
setDestination
public void setDestination(java.lang.String destination)
The path of the file destination.- Parameters:
destination
- File destination
-
getUseInstalledFile
public boolean getUseInstalledFile()
Returns whether an installed file or an existing file should be used by this action.- Returns:
- Use an installed file.
-
setUseInstalledFile
public void setUseInstalledFile(boolean useInstalledFile)
Defines whether an installed file or an existing file should be used by this action. When setting this option to true, the installed file should be set using the setInstallFile() method
-
getExistingFilePath
public java.lang.String getExistingFilePath()
The path of the existing file to copy.- Returns:
- Existing file path.
-
setExistingFilePath
public void setExistingFilePath(java.lang.String path)
The path of the existing file to copy.- Parameters:
path
- Existing file path.
-
getShouldUninstall
public boolean getShouldUninstall()
Whether the file should be uninstalled.- Returns:
- Uninstall file
-
setShouldUninstall
public void setShouldUninstall(boolean uninstall)
Whether the file should be uninstalled.- Parameters:
uninstall
- Uninstall file
-
getFolderOptions
public FolderOptions getFolderOptions()
The folder options.- Returns:
- Folder options
-
setFolderOptions
public void setFolderOptions(FolderOptions options)
The folder options.- Parameters:
options
- Folder options.
-
getDestinationRename
public java.lang.String getDestinationRename()
The destination rename.- Returns:
- Destination rename
-
setDestinationRename
public void setDestinationRename(java.lang.String destinationRename)
The destination rename.- Parameters:
destinationRename
- Destination rename
-
getRename
public boolean getRename()
Whether rename the file.- Returns:
- Rename the file
-
setRename
public void setRename(boolean rename)
Whether rename the file.- Parameters:
rename
- Rename the file.
-
getOverrideUnixPermissions
public boolean getOverrideUnixPermissions()
Whether the file unix permissions should be overwrited or not.
-
setOverrideUnixPermissions
public void setOverrideUnixPermissions(boolean override)
Whether the file unix permissions should be overwrited or not.
-
getUnixPermissions
public java.lang.String getUnixPermissions()
The unix file permissions to set to this file.
-
setUnixPermissions
public void setUnixPermissions(java.lang.String permissions)
The unix file permissions to set to this file.
-
setFileOverwriteBehavior
public void setFileOverwriteBehavior(FileOverwriteBehavior fileOverwriteBehavior)
The behavior when the file already exists in the target machine.
-
getFileOverwriteBehavior
public FileOverwriteBehavior getFileOverwriteBehavior()
The behavior when the file already exists in the target machine.
-
-