iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.core.resources
Class ISeriesMemberTransfer

java.lang.Object
  extended bycom.ibm.etools.iseries.core.resources.ISeriesMemberTransfer

public class ISeriesMemberTransfer
extends Object


Field Summary
static String Copyright
           
static int EOR
           
 
Constructor Summary
ISeriesMemberTransfer(ISeriesMember member, String localPath)
          Constructor with default encoding UTF-8.
ISeriesMemberTransfer(ISeriesMember member, String localPath, boolean leaveVisual)
          Constructor.
ISeriesMemberTransfer(ISeriesMember member, String localPath, IProgressMonitor monitor)
          Constructor with default encoding UTF-8, and prgress monitor to allow cancelling
ISeriesMemberTransfer(ISeriesMember member, String localPath, String encoding)
          Constructor.
 
Method Summary
 void changeBidiFormat()
          Converts the member from logical to visual or visual to logical as needed.
 void download()
          Get the member from the server
 void download(boolean removeSequenceNumbers)
          Get the member from the server
 String getLocalPath()
          Gets the localPath where the member is to be downloaded.
 ISeriesMember getMember()
          Gets the member.
 boolean isLogicalTransfer()
          indicates whether a logical transfer is being used
 void setEncoding(String encoding)
          Sets the local encoding to use.
 void setLocalPath(String localPath)
          Sets the local path where the member should be downloaded.
 void setMember(ISeriesMember member)
          Sets the member.
static void setRecordFormat(com.ibm.as400.access.SequentialFile seqFile, ISeriesMember member)
          Set the record format for the sequential file before reading / writing.
 void setRecordFormat(Vector recordFormatPoints)
          Set the record format to use during conversion.
 void setRemoveTrailingBlanks(boolean value)
          Sets whether or not trailing blanks should be removed upon download.
 void upload()
          Put the member back to the server
 void upload(boolean insertSequenceNumbersIfRequired)
          Put the member back to the server.
 
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

EOR

public static final int EOR
See Also:
Constant Field Values
Constructor Detail

ISeriesMemberTransfer

public ISeriesMemberTransfer(ISeriesMember member,
                             String localPath,
                             IProgressMonitor monitor)
Constructor with default encoding UTF-8, and prgress monitor to allow cancelling

Parameters:
member - the member.
localPath - the local path to download to.

ISeriesMemberTransfer

public ISeriesMemberTransfer(ISeriesMember member,
                             String localPath)
Constructor with default encoding UTF-8.

Parameters:
member - the member.
localPath - the local path to download to.

ISeriesMemberTransfer

public ISeriesMemberTransfer(ISeriesMember member,
                             String localPath,
                             String encoding)
Constructor.

Parameters:
member - the member.
localPath - the local path to download to.
encoding - the encoding of the local file.

ISeriesMemberTransfer

public ISeriesMemberTransfer(ISeriesMember member,
                             String localPath,
                             boolean leaveVisual)
Constructor.

Parameters:
member - the member.
localPath - the local path to download to.
leaveVisual - true if you want the file to be left in visual format
Method Detail

setMember

public void setMember(ISeriesMember member)
Sets the member.

Parameters:
member - the member.

getMember

public ISeriesMember getMember()
Gets the member.

Returns:
the member.

setLocalPath

public void setLocalPath(String localPath)
Sets the local path where the member should be downloaded.

Parameters:
localPath - the local path.

getLocalPath

public String getLocalPath()
Gets the localPath where the member is to be downloaded.

Returns:
the local path.

setEncoding

public void setEncoding(String encoding)
Sets the local encoding to use.

Parameters:
encoding - the local encoding to use.

download

public void download()
              throws ISeriesEncapsulatedReturnCodeException,
                     ISeriesEncapsulatedException,
                     com.ibm.etools.systems.core.messages.SystemMessageException
Get the member from the server

Throws:
ISeriesEncapsulatedReturnCodeException
ISeriesEncapsulatedException
com.ibm.etools.systems.core.messages.SystemMessageException

download

public void download(boolean removeSequenceNumbers)
              throws ISeriesEncapsulatedReturnCodeException,
                     ISeriesEncapsulatedException,
                     com.ibm.etools.systems.core.messages.SystemMessageException
Get the member from the server

Throws:
ISeriesEncapsulatedReturnCodeException
ISeriesEncapsulatedException
com.ibm.etools.systems.core.messages.SystemMessageException

upload

public void upload()
            throws ISeriesEncapsulatedReturnCodeException,
                   ISeriesEncapsulatedException,
                   com.ibm.etools.systems.core.messages.SystemMessageException
Put the member back to the server

Throws:
ISeriesEncapsulatedReturnCodeException
ISeriesEncapsulatedException
com.ibm.etools.systems.core.messages.SystemMessageException

upload

public void upload(boolean insertSequenceNumbersIfRequired)
            throws ISeriesEncapsulatedReturnCodeException,
                   ISeriesEncapsulatedException,
                   com.ibm.etools.systems.core.messages.SystemMessageException
Put the member back to the server.

Parameters:
insertSequenceNumbersIfRequired - insert sequence numbers if required. Note that if this is true, then we first do a check to determine if the first few records of the member are missing sequence numbers. If so, then we check each line before adding sequence numbers to it. Otherwise, we assume no line needs sequnce numbers. This is for efficiency.
Throws:
ISeriesEncapsulatedReturnCodeException
ISeriesEncapsulatedException
com.ibm.etools.systems.core.messages.SystemMessageException

setRecordFormat

public void setRecordFormat(Vector recordFormatPoints)
Set the record format to use during conversion. This is especially important for BIDI source. Only the points specified will be converted from visual to logical on download and from logical to visual on upload. For example, a source physical file member would use the following to only convert the text area, and not the sequence numbers.

Vector format = new Vector(); format.add(new Point(13, ISeriesMemberTransfer.EOR)); ISeriesMemberTransfer transfer = new ISeriesMemberTransfer(member, location); transfer.setRecordFormat(format); transfer.download(); NOTE:No error checking for overlapping or non ascending order of points will be performed. Also, to indicate to-the-end-of the record, use ISeriesMemberTransfer.EOR

Parameters:
recordFormatPoints - A vector of points to use when converting from visual to logical and logical to visual
Since:
6.0.1

setRecordFormat

public static void setRecordFormat(com.ibm.as400.access.SequentialFile seqFile,
                                   ISeriesMember member)
                            throws Exception
Set the record format for the sequential file before reading / writing.

Throws:
Exception

isLogicalTransfer

public boolean isLogicalTransfer()
indicates whether a logical transfer is being used

Returns:
true if the transfer is for a visual bidi ccsid, and a visual transfer was not requested.
Since:
6.0.1

changeBidiFormat

public void changeBidiFormat()
                      throws ISeriesEncapsulatedException
Converts the member from logical to visual or visual to logical as needed.

Throws:
ISeriesEncapsulatedException - thrown if an unexpected error is received from the file system
Since:
6.0.1

setRemoveTrailingBlanks

public void setRemoveTrailingBlanks(boolean value)
Sets whether or not trailing blanks should be removed upon download.

Parameters:
value - True if the trailing blanks should be stripped, false otherwise
Since:
6.0.1

iSeries Remote Systems
v6.0.1

Copyright © 2005 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.