Skip to main content
Version: 8.2411.x.x RR

nevisIDM DataFunctions

It is possible to register a special set of data functions for the manipulation of nevisIDM data structures. The class NevisIDMDataFunctions has to be registered in the setup section:

<dataFunction class="ch.nevis.idm.dataporter.NevisIDMDataFunctions"/>

idmApplication:create

Application idmApplication:create(String name)

Creates an Application object based on a name.

#{idmApplication:create('nevisIdm')}

idmAuthorization:create

Authorization idmAuthorization:create(Role role, Collection authorizedUnits, Collection authorizedApplications, Collection authorizedClients)

Creates an Authorization object based on a role. The data room of this authorization can be controlled using the collections authorizedUnits, authorizedApplications and authorizedClients. All of these collections are nullable.

 #{imdAuthorization:create(cfg.role, cfg.units, cfg.apps. cfg.clients)}

idmAuthorization:createEx

Authorization idmAuthorization:createEx(Role role, Collection authorizedUnits, Collection authorizedApplications, Collection authorizedClients,
boolean unitGlobal, boolean appGlobal, boolean clientGlobal)

Creates an Authorization object based on a role. The data room of this authorization can be controlled using the collections authorizedUnits, authorizedApplications and authorizedClients. All of these collections are nullable.

In addition, it can be specified whether the authorization should be applied globally.

#{imdAuthorization:create(cfg.role, null, null. cfg.clients, true, true, false)}

idmClient:create

Client idmClient:create(String extId)

Creates a Client object based on an external ID.

#{idmClient:create('100')}

idmDictEntry:add

DictEntry idmDictEntry:add(DictEntry dictEntry, String language, String value)

Adds a translation for a language to a given dictionary entry. The modified entry is returned.

#{idmDictEntry:add(cfg.dictEntry, 'DE', 'Ein Text')}

idmDictEntry:create

DictEntry idmDictEntry:create()

Creates a new DictEntry object.

#{idmDictEntry:create()}

idmDictEntry:remove

 DictEntry idmDictEntry:remove(DictEntry dictEntry, String language)

Removes the translation for a language from the dictionary entry.

#{idmDictEntry:remove(cfg.dictEntry, 'DE')}

idmRole:create

Role idmRole:create(String applicationName, String roleName)

Creates a Role object based on a application and role name.

#{idmRole:create('nevisIdm', 'SelfAdmin')}

idmRole:hasApplicationName

public static boolean hasApplicationName(Collection<Role> roles, String applicationName)

Checks whether a list of roles contains a role with the given application name.

#{idmRole:hasApplicationName(in.profile.values.roles, 'nevisIDM')}

idmRole:hasRoleName

public static boolean hasRoleName(Collection<Role> roles, String roleName)

Checks whether a list of roles contains a role with the given name.

#{idmRole:hasRoleName(in.profile.values.roles, 'SelfAdmin')}

idmRole:hasRoleExtId

public static boolean hasRoleExtId(Collection<Role> roles, String roleExtId)

Checks whether a list of roles contains a role with the given ext ID.

#{idmRole:hasRoleExtId(in.profile.values.roles, '1020')}

idmRole:remove

List<Role> idmRole:create(List<Role> roles, String extId)

Removes a role from a list of roles and returns the resulting list.

#{idmRole:remove(in.profile.values.roles, '1200')}

idmRole:removeByNameAndApplication

List<Role> idmRole:create(List<Role> roles, String roleName, String applicationName)

Removes a role from a list of roles and returns the resulting list.

#{idmRole:removeByNameAndApplication(in.profile.values.roles. 'user', 'app')}

idmUnit::create

Unit idmUnit:create(String clientExtId, String extId)

Creates a Unit object based on a client and unit external ID.

#{idmUnit:create('100', '1010')}