update Action
Use the update action to update existing users in
the customer’s database. An update can include changing attributes,
changing passwords, or renaming. If you do not define the update action, the
adapter cannot update users in the customer’s database.
Context
The actionContext map contains the following entries:
Key
|
Value Type
|
Value Description
|
conn
|
java.sql.Connection
|
JDBC connection to the customer’s database
|
adapter
|
com.wavset.adapter.ScriptedJdbcResourceAdapter
|
Adapter instance
|
action
|
java.lang.String
|
The updateUser string
|
id
|
java.lang.String
|
Existing user’s account ID
|
attributes
|
java.util.Map
|
Map of attributes to set for the new user.
-
The key identifies which attribute to set
-
The value is a decrypted value to which the attribute should
be set.
If there is no map entry for an attribute, do not change
the attribute.
|
newId
|
java.lang.String
|
If present, the script is expected to change the existing user’s
account ID (identified by the value of id attribute) to
the new account ID specified by the newId attribute value.
|
password
|
java.lang.String
|
If present, this value is the decrypted value of the user’s new
password.
|
errors
|
java.util.List
|
Initially, this value is an empty list.
The script may add java.lang.String objects to this
list if any errors are found during processing.
|
trace
|
com.waveset.adapter.Trace
|
Object used to trace execution.
Scripts can use the methods of this class to make themselves “debuggable”
in a customer environment.
|
Error Handling
Any throw from within the script is considered a failure.
If the script encounters any errors, the script may add the appropriate
strings to the errors key. The presence of any items in
the errors List is considered an update failure.