The getActiveSyncIterator action returns an object to the adapter used to perform Active Sync iteration.
If you want the resource to support Active Sync, you must define this action.
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 getActiveSyncIterator string |
options |
java.util.Map |
The map may contain an entry with the lastProcessed key. This entry value is a map of the attributes of the last user successfully processed by Active Sync. See the SimpleTable example (SimpleTable-activeSyncIter-bsh.xml script) for an example of how to use the lastProcessed entry to compose a query that filters out uninteresting users from the iterator. |
activeSyncLogger |
com.waveset.adapter.logging.IActiveSyncLogger |
Object used to write log entries to the resource’s Active Sync log file or files. |
result |
java.util.Map |
(See the following result description) |
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. |
The adapter expects the result map to be populated with the following entry:
Key |
Value Type |
Value Description |
---|---|---|
iterator |
com.waveset.adapter.script.ScriptedIterator |
The script must set this value to a generated instance of the ScriptedIterator interface. public interface ScriptedIterator { public boolean hasNext(); public void next(java.util.Map nextObj); public void close();} See the next table for information about the nextObj map. The object must be capable of iterating over all the users in the customer’s database. The samples demonstrate how to accomplish this in BeanShell and Javascript. |
The adapter expects the nextObj map passed to the next method to be populated by the iterator with attributes for each iterated user.
Key |
Value Type |
Value Description |
---|---|---|
attrMap |
java.util.Map |
If the script is capable of directly retrieving the user attributes, then the script can set this entry with a map of the user attributes. The attribute names are defined in the Resource User Attribute column of the resource’s schema map. |
isDisabled |
java.lang.Boolean or java.lang.String |
If set by the script to a Boolean.TRUE or a true string, then the user is considered disabled. |
Any throw from within the script is considered a failure.
If the script encounters any errors, the script may also add appropriate strings to the errors key. The presence of any items in the errors List is considered a failure.