Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.resources
Class SaveFileTransfer

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.resources.SaveFileTransfer
Direct Known Subclasses:
BinaryObjectSaveFileTransfer

public class SaveFileTransfer
extends Object

Helper class which downloads and uploads an IBM i save file. *


Field Summary
protected  IBMiConnection connection
           
static String copyright
           
protected static String IFS_SUBSYSTEM_CONFIGURATION_ID
           
 
Constructor Summary
SaveFileTransfer(IBMiConnection connection)
          Constructor
 
Method Summary
 IResource downloadSavf(String fullyQualifiedLocalFileName, IQSYSSaveFile saveFileObject, boolean createFolder, IProgressMonitor monitor)
          Download a save file from IBM i to a workspace file.
protected  IResource getTempFileFor(String fullyQualifiedLocalFileName)
          Create temporary file for given full qualified workspace file name.
protected  IResource getTempFileFor(String pathName, IQSYSResource hostObject)
          Create temporary file for given host object.
protected  String getTempRemotePath(IQSYSResource hostObject)
          Get remote path for given host object.
 void uploadSavf(String fullyQualifiedLocalFileName, String saveFileLibrary, String saveFileName)
          Upload a local save file to an IBM i save file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright

IFS_SUBSYSTEM_CONFIGURATION_ID

protected static final String IFS_SUBSYSTEM_CONFIGURATION_ID
See Also:
Constant Field Values

connection

protected IBMiConnection connection
Constructor Detail

SaveFileTransfer

public SaveFileTransfer(IBMiConnection connection)
Constructor

Method Detail

uploadSavf

public void uploadSavf(String fullyQualifiedLocalFileName,
                       String saveFileLibrary,
                       String saveFileName)
                throws SystemMessageException
Upload a local save file to an IBM i save file.

Parameters:
fullyQualifiedLocalFileName: - full qualified file name for local save file
saveFileLibrary: - target library name
saveFileName: - target save file name
Throws:
SystemMessageException - if there is any SystemMessage captured during upload

downloadSavf

public IResource downloadSavf(String fullyQualifiedLocalFileName,
                              IQSYSSaveFile saveFileObject,
                              boolean createFolder,
                              IProgressMonitor monitor)
                       throws SystemMessageException
Download a save file from IBM i to a workspace file. If the targetFile exists, its contents are silently replaced. No collision checking. If the targetFile does not exist, it is created. If the targetFile's parent does not exist, an exception is thrown if createFolder is false.

Throws:
SystemMessageException

getTempFileFor

protected IResource getTempFileFor(String pathName,
                                   IQSYSResource hostObject)
Create temporary file for given host object.

Parameters:
srcFS -
srcFile -
Returns:

getTempFileFor

protected IResource getTempFileFor(String fullyQualifiedLocalFileName)
Create temporary file for given full qualified workspace file name.

Parameters:
fullyQualifiedLocalFileName: - full qualified workspace file name.
Returns:

getTempRemotePath

protected String getTempRemotePath(IQSYSResource hostObject)
Get remote path for given host object. Child class should override to return a meaningful path of specific host object type.

Parameters:
hostObject: - host object.
Returns:
remote path for temporary saving.

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.