Available services in script

In this page is described available services in scripts with some small information about it. All these services has some default methods, these methods are described in next section.

There is list of basic services/managers that can be used in IdM scripts. Beware this list doesn't contain all usable services. For all service please search all classes that implements/extends interface ScriptEnabled or check services via GUI.

Service name Service code in script Module Description
AccAccountService accAccountService acc Account service working with IdM accounts
IdmIdentityService identityService core Identity service is most common service that working with identities
IdmIdentityContractService identityContractService core Identity contract service working with all identity contracts
IdmIdentityRoleService identityRoleService core Identity role service provides assigned roles
IdmPasswordService passwordService core Password service provides password for each identity
IdmRoleService roleService core Role service working with roles :)
IdmTreeNodeService treeNodeService core Tree node service working with specific organization unit in IdM
IdmTreeTypeService treeTypeService core Tree type service working with organizational types
FormService formService core Form service is for get extended attribute (EAV) for all type of entities
AttachmentManager attachmentManager core Attachement manager working with all attachments that exists in IdM
IdmRoleCatalogueService roleCatalogueService core Role catalogue service, service for working with catalogue
LookupService lookupService core Lookup service is hybrid service, that allow get entity by unique identifier. Advantage for this service is not specified entity type - one service can obtain all identities.

The most common method for almost all services. This method has one required parameter type of UUID.

This method can obtain all entities specified for the service. Find method can also filtering by filter :). Filter is first parameter of this method. The second parameter is Pageable. This parameters is used for pagination, pagionation can be null. There is example for filtering identites with first name = John:

IdmIdentityFilter filter = new IdmIdentityFilter();
filter.setFirstName("John");

Page<IdmIdentityDto> identitiesPage = identityService.find(filter, null);
List<IdmIdentityDto> identitiesList = identityService.find(filter, null).getContent();

Find method basically return collection with type Page. Page is basically iterator. If you want all identities in List object you can just call getContent().

Method for save given entity (first parameter). Use this method in script is little bit risky. For example save identity in transformation script can throw next provisioning for same entity and this behavior can throw stack overflow exception.

Almost same as *save* method. The method deletes given entity (first parameter).

  • by kotynekv