Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

APIs, SDKs, and Services

APIs, SDKs, and Services

Constructing an Identity Query Using the IdentityService4J API

Constructing an Identity Query Using the IdentityService4J API

This sample snippet shows how to construct an IdentityQuery, which is used in
findIdentities()
,
assertPrincipalInQueryResult()
,
assertPrincipalInQueryResultWithResponse()
, and
countIdentities()
operations.
The
com.activevos.examples.identityservice.FindIdentitiesDemo
class file has the complete example.
// imports similar to previous examples try { // Create service and get service port 'idServicePort' similar to previous examples. // ... // ... // Create identity query with includes and excludes: // 1) include groups : loanreps, user: loancsr TIdentityQueryValues includeQueryValues = new TIdentityQueryValues(); includeQueryValues.getGroup().add("loanreps"); // group includeQueryValues.getUser().add("loancsr"); // user // 2) exclude groups : loanmgrs TIdentityQueryValues excludeQueryValues = new TIdentityQueryValues(); excludeQueryValues.getGroup().add("loanmgrs"); // group // Create query with includes and excludes TIdentityQuery query = new TIdentityQuery(); query.setInclude(includeQueryValues); query.setExclude(excludeQueryValues); // Invoke findIdentites() operation. TIdentityResultSet resultSet = idServicePort.findIdentities(query); System.out.println("Query match count : " + resultSet.getTotalRowCount()); // get list of Identities from resultset List identities = resultSet.getIdentities().getIdentity(); System.out.println("Found identities count: " + identities.size()); for (TIdentity identity : identities) { // print details, similar to previous example } } catch(Exception e) { e.printStackTrace(); }

0 COMMENTS

We’d like to hear from you!