public class UserMaintenance extends ERPInterfaceAS400 implements IUserMaintenance
ERPInterfaceAS400.Pcml, ERPInterfaceAS400.Received
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ivInitId
The supplied id of the user initiating the maintenance.
|
protected char |
ivMode
The current mode being processed.
|
protected User |
ivUser
The supplied user being maintained or the WIP retrieved user.
|
protected java.lang.String |
ivUserId
A WIP user id.
|
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 |
---|
UserMaintenance()
Constructs a new ERP user maintenance interface.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
callProgram()
Calls the ERP program for execution.
|
boolean |
createUser(User user,
java.lang.String initid)
Creates a new user record in the ERP system.
|
boolean |
deleteUser(User user,
java.lang.String initid)
Deletes a user record in the ERP system.
|
protected Customer |
findCustomer(java.lang.String id)
Returns the customer record for the given id.
|
User |
getUser(java.lang.String userId)
Retrieves a user record from the ERP system.
|
User |
getUser(java.lang.String userId,
java.lang.String queueId)
Retrieves a user record from the ERP system.
|
protected boolean |
parseQueueEntry(java.lang.String fmtid,
byte[] qbytes)
Parses a data queue entry that was received on the inbound receiving
data queue.
|
protected User |
parseUser(ERPInterfaceAS400.Received rec)
Parses user data from the receive data queue and returns a user object.
|
protected void |
sendDataQueue()
Places information on the outbound sending data queue.
|
boolean |
updateUser(User user,
java.lang.String initid)
Updates a user record in the ERP system.
|
equals, getContext, getEncryptAESLength, getErrorType, getMixedCase, getQueueKey, getRecordFormat, getRecordFormatFieldDecimals, getRecvQueue, getSendQueue, getStoreCompany, getStoreWarehouse, getWarningType, isEncryptAES, isYes, process, readDataQueue, 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 User ivUser
protected java.lang.String ivInitId
protected char ivMode
protected java.lang.String ivUserId
public UserMaintenance()
public boolean createUser(User user, java.lang.String initid)
createUser
in IUserMaintenance
.createUser
in interface IUserMaintenance
user
- (User) The user object to create.initid
- (String) The user id initiating the create.true
if the user was successfully added,
otherwise false
.public boolean updateUser(User user, java.lang.String initid)
updateUser
in IUserMaintenance
.updateUser
in interface IUserMaintenance
user
- (User) The user object containing the new information.initid
- (String) The user Id initiating the update.true
if the user was successfully updated,
otherwise false
.public boolean deleteUser(User user, java.lang.String initid)
deleteUser
in IUserMaintenance
.deleteUser
in interface IUserMaintenance
user
- (User) The user object for the user to delete.initid
- (String) The user Id initiating the update.true
if the user was successfully deleted,
otherwise false
.public User getUser(java.lang.String userId)
getUser
in IUserMaintenance
.getUser
in interface IUserMaintenance
userId
- (String) The id for the user to retrieve.public User getUser(java.lang.String userId, java.lang.String queueId)
getUser
in IUserMaintenance
.getUser
in interface IUserMaintenance
userId
- (String) The id for the user to retrieve.queueId
- (String) The value to use when creating the queue key,
if a value other than the current session id is desired.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 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 Customer findCustomer(java.lang.String id)
id
- (String) The customer id for the desired record.null
.protected User parseUser(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.