Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.util
Class SaveFileUtil

java.lang.Object
  extended by com.ibm.etools.iseries.rse.util.SaveFileUtil

public class SaveFileUtil
extends Object

A utility class to obtain save file information.


Field Summary
static int COMMAND_SAVLIB
          Constant representing SAVLIB command, 2.
static int COMMAND_SAVOBJ
          Constant representing SAVOBJ command, 1.
static int COMMAND_UNKNOWN
          Constant representing unknown command, 0.
static String Copyright
           
 
Method Summary
static SaveFileUtil getInstance()
          Gets the singleton instance of the utility.
 int getSaveFileCommand(AS400 as400, String ifsPath)
          Gets the command used to create the save file with the given path.
 int getSaveFileCommand(String localPath)
          Gets the command used to create the save file with the given path.
 String getSaveFileLibrary(AS400 as400, String ifsPath)
          Gets the library which contained the contents of the save file with the given path.
 String getSaveFileLibrary(String localPath)
          Gets the library which contained the contents of the save file with the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

COMMAND_UNKNOWN

public static final int COMMAND_UNKNOWN
Constant representing unknown command, 0.

See Also:
Constant Field Values

COMMAND_SAVOBJ

public static final int COMMAND_SAVOBJ
Constant representing SAVOBJ command, 1.

See Also:
Constant Field Values

COMMAND_SAVLIB

public static final int COMMAND_SAVLIB
Constant representing SAVLIB command, 2.

See Also:
Constant Field Values
Method Detail

getInstance

public static SaveFileUtil getInstance()
Gets the singleton instance of the utility.

Returns:
the singleton instance of the utility.

getSaveFileCommand

public int getSaveFileCommand(String localPath)
                       throws IOException
Gets the command used to create the save file with the given path. Should be used to find the save file command of a save file that exists on the local machine (i.e. not on the iSeries but the workstation).

Parameters:
localPath - the path of the save file.
Returns:
one of COMMAND_SAVOBJ, COMMAND_SAVLIB, or COMMAND_UNKNOWN (unlikely).
Throws:
IOException - if an I/O error occurs.

getSaveFileCommand

public int getSaveFileCommand(AS400 as400,
                              String ifsPath)
                       throws IOException,
                              AS400SecurityException
Gets the command used to create the save file with the given path. Should be used to find the save file command of a save file that exists on the remote machine (i.e. on the iSeries and not on the workstation). For native files, use the IFS file path equivalent.

Parameters:
as400 - the AS/400.
ifsPath - the IFS path of the save file.
Returns:
one of COMMAND_SAVOBJ, COMMAND_SAVLIB, or COMMAND_UNKNOWN (unlikely).
Throws:
IOException - if an I/O error occurs.
AS400SecurityException

getSaveFileLibrary

public String getSaveFileLibrary(String localPath)
                          throws IOException
Gets the library which contained the contents of the save file with the given path. Should be used to find the library of a save file that exists on the local machine (i.e. not on the iSeries but the workstation).

Parameters:
localPath - the path of the save file.
Returns:
the library which contained the save file contents.
Throws:
IOException - if an I/O error occurs.

getSaveFileLibrary

public String getSaveFileLibrary(AS400 as400,
                                 String ifsPath)
                          throws IOException,
                                 AS400SecurityException
Gets the library which contained the contents of the save file with the given path. Should be used to find the library of a save file that exists on the remote machine (i.e. on the iSeries and not on the workstation).

Parameters:
as400 - the AS/400.
ifsPath - the IFS path of the save file.
Returns:
the library which contained the save file contents.
Throws:
IOException - if an I/O error occurs.
AS400SecurityException

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.