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.StringgetDestination()The path of the file destination.java.lang.StringgetDestinationRename()The destination rename.java.lang.StringgetExistingFilePath()The path of the existing file to copy.FileOverwriteBehaviorgetFileOverwriteBehavior()The behavior when the file already exists in the target machine.FolderOptionsgetFolderOptions()The folder options.FileActiongetInstalledFile()The installed file to copy.booleangetOverrideUnixPermissions()Whether the file unix permissions should be overwrited or not.booleangetRename()Whether rename the file.booleangetShouldUninstall()Whether the file should be uninstalled.java.lang.StringgetUnixPermissions()The unix file permissions to set to this file.booleangetUseInstalledFile()Returns whether an installed file or an existing file should be used by this action.voidsetDestination(java.lang.String destination)The path of the file destination.voidsetDestinationRename(java.lang.String destinationRename)The destination rename.voidsetExistingFilePath(java.lang.String path)The path of the existing file to copy.voidsetFileOverwriteBehavior(FileOverwriteBehavior fileOverwriteBehavior)The behavior when the file already exists in the target machine.voidsetFolderOptions(FolderOptions options)The folder options.voidsetInstalledFile(FileAction installedFile)Sets the installed file to copy.voidsetOverrideUnixPermissions(boolean override)Whether the file unix permissions should be overwrited or not.voidsetRename(boolean rename)Whether rename the file.voidsetShouldUninstall(boolean uninstall)Whether the file should be uninstalled.voidsetUnixPermissions(java.lang.String permissions)The unix file permissions to set to this file.voidsetUseInstalledFile(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.
-
-