public class Control extends ERPInterfaceAS400 implements IControl
ERPInterfaceAS400.Pcml, ERPInterfaceAS400.Received
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<BackendControl> |
ivControls
A supplied or WIP collection of backend controls.
|
protected char |
ivMode
The current mode being processed.
|
private static long |
serialVersionUID
The class' serialization version id.
|
AS400TEXT3, ivAS400, ivConfig
ivHashCode, ivHashFlds, ivObjAttrs
ERROR_CONNECT, ERROR_NONE, ERROR_PROGRAM, WARN_DUPLICATE, WARN_NONE
Constructor and Description |
---|
Control()
Constructs a new ERP control file information interface.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
callProgram()
Calls the ERP program for execution.
|
java.util.ArrayList<BackendControl> |
getControls()
Retrieves a collection of backend control objects from the ERP system.
|
BackendJobDescription |
getJobDescription()
Retrieves a backend job description object from the ERP system.
|
protected BackendControl |
parseControl(ERPInterfaceAS400.Received rec)
Parses backend control data from the receive data queue and returns a
backend control object.
|
protected boolean |
parseQueueEntry(java.lang.String fmtid,
byte[] qbytes)
Parses a data queue entry that was received on the inbound receiving
data queue.
|
protected void |
readDataQueue()
Reads information placed on the inbound receiving data queue by the
called ERP program.
|
protected void |
sendDataQueue()
Places information on the outbound sending data queue.
|
boolean |
updateControls(java.util.ArrayList<BackendControl> controls)
Updates a collection of backend control objects on the ERP system.
|
equals, getContext, getEncryptAESLength, getErrorType, getMixedCase, getQueueKey, getRecordFormat, getRecordFormatFieldDecimals, getRecvQueue, getSendQueue, getStoreCompany, getStoreWarehouse, getWarningType, isEncryptAES, isYes, process, setContext, setErrorType, setQueueKey, setWarningType
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getContext, getErrorType, getWarningType, setContext, setErrorType, setWarningType
private static final long serialVersionUID
protected java.util.ArrayList<BackendControl> ivControls
protected char ivMode
public Control()
public java.util.ArrayList<BackendControl> getControls()
getControls
in IControl
.getControls
in interface IControl
public BackendJobDescription getJobDescription()
getJobDescription
in IControl
.getJobDescription
in interface IControl
public boolean updateControls(java.util.ArrayList<BackendControl> controls)
updateControls
in IControl
.updateControls
in interface IControl
controls
- (ArrayList) The control objects to update.true
if updates are successful, otherwise
false
.protected boolean callProgram() throws java.lang.Exception
process
after
any data to be placed on the send queue has been successfully placed and
sent.
Overrides callProgram
in ERPInterfaceAS400
.callProgram
in class ERPInterfaceAS400
true
if the call was successful, otherwise
false
.java.lang.Exception
- - if an error occurs with the running of
the ERP program.protected void readDataQueue() throws java.lang.Exception
process
after a successful
call to the ERP program. Iterates through the received queue entries for
the current queue key, determines each queue entry's record format id,
and then invokes the parseQueueEntry
method.
Overrides readDataQueue
in ERPInterfaceAS400
.readDataQueue
in class ERPInterfaceAS400
java.lang.Exception
- - if an error occurs with reading data on
the queue.protected boolean parseQueueEntry(java.lang.String fmtid, byte[] qbytes) throws java.lang.Exception
readDataQueue
for each queue entry that
is read for the current queue key.
Overrides parseQueueEntry
in ERPInterfaceAS400
.parseQueueEntry
in class ERPInterfaceAS400
fmtid
- (String) The record format id of the queue entry.qbytes
- (byte[]) The data queue entry's raw data.true
to read the next entry from the receive
data queue or false
to stop reading.java.lang.Exception
- - if an error occurs with reading data on
the queue.protected void sendDataQueue() throws java.lang.Exception
process
as the first step after a connection to the ERP system
has been successfully established.
Overrides sendDataQueue
in ERPInterfaceAS400
.sendDataQueue
in class ERPInterfaceAS400
java.lang.Exception
- - if an error occurs with placing data on
the queue and sending the queue.protected BackendControl parseControl(ERPInterfaceAS400.Received rec) throws java.lang.Exception
rec
- (Received) The receive data queue data.java.lang.Exception
- - if an error occurs during the parsing of
the queue's data.