public class UsermActionPack extends Object
com.cultofbits.integrationm.service.properties
file
with the userm
key;
for example:
action.names=...,<userm-ap-name> action.<userm-ap-name>=userm action.<userm-ap-name>.userm.base-url=<url for UserM service> (Optional. Defaults to "http://localhost:40780" )
Recomended userm-ap-name: userm
In case <userm-ap-name> is userm, in the IntegrationM scripts, you can refer to it only by `userm.createUser(...)` otherwise you have to refer to it using `actionpacks.<userm-ap-name>.createUser(...)`
Constructor and Description |
---|
UsermActionPack(String url,
com.cultofbits.integrationm.service.internal.security.UserCookiesGenerator userCookiesGenerator) |
Modifier and Type | Method and Description |
---|---|
ReusableResponse<Role> |
addPermissionsToRole(String product,
String role,
List<String> permissions)
Adds multiple permissions to a specified role for a specific product.
|
ReusableResponse<Role> |
addPermissionsToRole(String product,
String role,
List<String> permissions,
String runAsUser)
Adds multiple permissions to a specified role for a specific product.
|
ReusableResponse<Group> |
addRolesToGroup(String group,
String product,
List<String> roles)
Adds multiple roles of a specific product to the specified group.
|
ReusableResponse<Group> |
addRolesToGroup(String group,
String product,
List<String> roles,
String runAsUser)
Adds multiple roles of a specific product to the specified group.
|
ReusableResponse<User> |
addUserToGroups(String username,
List<String> groups)
Adds a user to multiple specified groups.
|
ReusableResponse<User> |
addUserToGroups(String username,
List<String> groups,
String runAsUser)
Adds a user to multiple specified groups.
|
ReusableResponse<Group> |
createGroup(Map<String,String> groupData)
Creates a new Group with the provided information.
|
ReusableResponse<Group> |
createGroup(Map<String,String> groupData,
Map<String,List<String>> roles)
Creates a new Group with the provided information.
|
ReusableResponse<Group> |
createGroup(Map<String,String> groupData,
Map<String,List<String>> roles,
String runAsUser)
Creates a new Group with the provided information.
|
ReusableResponse<Group> |
createGroup(Map<String,String> groupData,
String runAsUser)
Creates a new Group with the provided information.
|
ReusableResponse<Permission> |
createPermission(Map<String,String> permissionData)
Creates a new Permission with the provided information.
|
ReusableResponse<Permission> |
createPermission(Map<String,String> permissionData,
String runAsUser)
Creates a new Permission with the provided information.
|
ReusableResponse<Role> |
createRole(Map<String,String> roleData)
Creates a new Role with the provided information.
|
ReusableResponse<Role> |
createRole(Map<String,String> roleData,
List<String> permissions)
Creates a new Role with the provided information.
|
ReusableResponse<Role> |
createRole(Map<String,String> roleData,
List<String> permissions,
String runAsUser)
Creates a new Role with the provided information.
|
ReusableResponse<Role> |
createRole(Map<String,String> roleData,
String runAsUser)
Creates a new Role with the provided information.
|
ReusableResponse<User> |
createUser(Map<String,String> userData)
Creates a user based on the provided user information.
|
ReusableResponse<User> |
createUser(Map<String,String> userData,
List<String> groups)
Creates a new User with the provided information.
|
ReusableResponse<User> |
createUser(Map<String,String> userData,
List<String> groups,
String runAsUser)
Creates a new User with the provided information.
|
ReusableResponse<User> |
createUser(Map<String,String> userData,
String runAsUser)
Creates a new User with the provided information.
|
ReusableResponse<EmptyBody> |
deleteGroup(String name)
Deletes a group with the specified name.
|
ReusableResponse<EmptyBody> |
deleteGroup(String name,
String runAsUser)
Deletes a group with the specified name.
|
ReusableResponse<EmptyBody> |
deletePermission(String product,
String name)
Deletes a permission with the specified product and name.
|
ReusableResponse<EmptyBody> |
deletePermission(String product,
String name,
String runAsUser)
Deletes a permission with the specified product and name.
|
ReusableResponse<EmptyBody> |
deleteRole(String product,
String name)
Deletes a role with the specified product and name.
|
ReusableResponse<EmptyBody> |
deleteRole(String product,
String name,
String runAsUser)
Deletes a role with the specified product and name.
|
ReusableResponse<EmptyBody> |
deleteUser(String username)
Deletes a user with the specified username.
|
ReusableResponse<EmptyBody> |
deleteUser(String username,
String runAsUser)
Deletes a user with the specified ID.
|
ReusableResponse<EmptyBody> |
disableUser(String username)
Disables a user with the specified username.
|
ReusableResponse<EmptyBody> |
disableUser(String username,
String runAsUser)
Disables a user with the specified username.
|
ReusableResponse<EmptyBody> |
enableUser(String username)
Enables a user with the specified username.
|
ReusableResponse<EmptyBody> |
enableUser(String username,
String runAsUser)
Enables a user with the specified username.
|
ReusableResponse<Group> |
getGroup(Integer groupId)
Retrieves information about a group with the specified ID.
|
ReusableResponse<Group> |
getGroup(Integer groupId,
String runAsUser)
Retrieves information about a group with the specified ID.
|
ReusableResponse<Group> |
getGroup(String name)
Retrieves information about a group with the specified group name.
|
ReusableResponse<Group> |
getGroup(String name,
String runAsUser)
Retrieves information about a group with the specified group name.
|
ReusableResponse<Permission> |
getPermission(Integer permissionId)
Retrieves information about a permission with the specified ID.
|
ReusableResponse<Permission> |
getPermission(Integer permissionId,
String runAsUser)
Retrieves information about a permission with the specified ID.
|
ReusableResponse<Permission> |
getPermission(String product,
String name)
Retrieves information about a permission with the specified name for a specific product.
|
ReusableResponse<Permission> |
getPermission(String product,
String name,
String runAsUser)
Retrieves information about a permission with the specified name for a specific product.
|
ReusableResponse<Role> |
getRole(Integer roleId)
Retrieves information about a role with the specified ID.
|
ReusableResponse<Role> |
getRole(Integer roleId,
String runAsUser)
Retrieves information about a role with the specified ID.
|
ReusableResponse<Role> |
getRole(String product,
String name)
Retrieves information about a role with the specified name for a specific product.
|
ReusableResponse<Role> |
getRole(String product,
String name,
String runAsUser)
Retrieves information about a role with the specified name for a specific product.
|
ReusableResponse<User> |
getUser(Integer userId)
Retrieves information about a user with the specified ID.
|
ReusableResponse<User> |
getUser(Integer userId,
String runAsUser)
Retrieves information about a user with the specified ID.
|
ReusableResponse<User> |
getUser(String username)
Retrieves information about a user with the specified ID.
|
ReusableResponse<User> |
getUser(String username,
String runAsUser)
Retrieves information about a user with the specified username.
|
ReusableResponse<Role> |
removePermissionsFromRole(String product,
String role,
List<String> permissions)
Removes multiple permissions from a specified role for a specific product.
|
ReusableResponse<Role> |
removePermissionsFromRole(String product,
String role,
List<String> permissions,
String runAsUser)
Removes multiple permissions from a specified role for a specific product.
|
ReusableResponse<Group> |
removeRolesFromGroup(String group,
String product,
List<String> roles)
Removes multiple roles of a specific product from the specified group.
|
ReusableResponse<Group> |
removeRolesFromGroup(String group,
String product,
List<String> roles,
String runAsUser)
Removes multiple roles of a specific product from the specified group.
|
ReusableResponse<User> |
removeUserFromGroups(String username,
List<String> groups)
Removes a user from multiple specified groups.
|
ReusableResponse<User> |
removeUserFromGroups(String username,
List<String> groups,
String runAsUser)
Removes a user from multiple specified groups.
|
SearchResult<Group> |
searchGroups(String query)
Searches for groups based on the provided query.
|
SearchResult<Group> |
searchGroups(String query,
Map<String,String> options)
Searches for groups based on the provided query.
|
SearchResult<Permission> |
searchPermissions(String query)
Searches for permissions based on the provided query.
|
SearchResult<Permission> |
searchPermissions(String query,
Map<String,String> options)
Searches for permissions based on the provided query.
|
SearchResult<Role> |
searchRoles(String query)
Searches for roles based on the provided query.
|
SearchResult<Role> |
searchRoles(String query,
Map<String,String> options)
Searches for roles based on the provided query.
|
SearchResult<User> |
searchUsers(String query)
Searches for users based on the provided query.
|
SearchResult<User> |
searchUsers(String query,
Map<String,String> options)
Searches for users based on the provided query.
|
ReusableResponse<Group> |
updateGroup(String name,
Map<String,Object> groupData)
Updates an existing group with the provided information.
|
ReusableResponse<Group> |
updateGroup(String name,
Map<String,Object> groupData,
String runAsUser)
Updates an existing group with the provided information.
|
ReusableResponse<Permission> |
updatePermission(String product,
String name,
Map<String,Object> permissionData)
Updates an existing permission with the provided information.
|
ReusableResponse<Permission> |
updatePermission(String product,
String name,
Map<String,Object> permissionData,
String runAsUser)
Updates an existing permission with the provided information.
|
ReusableResponse<Role> |
updateRole(String product,
String name,
Map<String,Object> roleData)
Updates an existing role with the provided information.
|
ReusableResponse<Role> |
updateRole(String product,
String name,
Map<String,Object> roleData,
String runAsUser)
Updates an existing role with the provided information.
|
ReusableResponse<User> |
updateUser(String username,
Map<String,Object> userData)
Updates an existing user with the provided information.
|
ReusableResponse<User> |
updateUser(String username,
Map<String,Object> userData,
String runAsUser)
Updates an existing user with the provided information.
|
public UsermActionPack(String url, com.cultofbits.integrationm.service.internal.security.UserCookiesGenerator userCookiesGenerator)
public ReusableResponse<Role> addPermissionsToRole(String product, String role, List<String> permissions)
product
- the name of the product for which the permission and role should belong to.role
- the name of the role to which the permission should be added.permissions
- a list of permissions to be added.ReusableResponse
object containing the result of the permission addition to Role
operation. The response
includes information about the success or failure of the operation, any error messages,
and a Role
representing the updated role if the operation was successful.public ReusableResponse<Role> addPermissionsToRole(String product, String role, List<String> permissions, String runAsUser)
product
- the name of the product for which the permission and role should belong to.role
- the name of the role to which the permission should be added.permissions
- a list of permissions to be added.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the permission addition to Role
operation. The response
includes information about the success or failure of the operation, any error messages,
and a Role
representing the updated role if the operation was successful.public ReusableResponse<Group> addRolesToGroup(String group, String product, List<String> roles)
group
- the name of the group to which the roles should be added.product
- the name of the product for which the roles belong to.roles
- a list of role names to be added.ReusableResponse
object containing the result of the role addition to group operation. The response
includes information about the success or failure of the operation, any error messages,
and a Group
object representing the created group if the operation was successfulpublic ReusableResponse<Group> addRolesToGroup(String group, String product, List<String> roles, String runAsUser)
group
- the name of the group to which the roles should be added.product
- the name of the product for which the roles belong to.roles
- a list of role names to be added.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the role addition to group operation. The response
includes information about the success or failure of the operation, any error messages,
and a Group
object representing the created group if the operation was successfulpublic ReusableResponse<User> addUserToGroups(String username, List<String> groups)
username
- the username of the user to be added to the groups.groups
- a list of group names to which the user should be added.ReusableResponse
object containing the result of the user-to-group addition operation.
The response includes information about the success or failure of the operation, any error messages,
and the User
representing the updated user if the operation was successful.public ReusableResponse<User> addUserToGroups(String username, List<String> groups, String runAsUser)
username
- the username of the user to be added to the groups.groups
- a list of group names to which the user should be added.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the user-to-group addition operation.
The response includes information about the success or failure of the operation, any error messages,
and the User
representing the updated user if the operation was successful.public ReusableResponse<Group> createGroup(Map<String,String> groupData)
groupData
- a Map containing the group data. The available options are:
name
(required, cannot be null): the name of the groupdescription
: the optional description for the groupReusableResponse
object containing the result of the Group
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Group
object if the operation was successful.public ReusableResponse<Group> createGroup(Map<String,String> groupData, Map<String,List<String>> roles)
groupData
- a Map containing the group data. The available options are:
name
(required, cannot be null): the name of the groupdescription
: the optional description for the grouproles
- a Map representing the roles to be assigned to the group. The key is the product name,
and the value is a List of role names.ReusableResponse
object containing the result of the Group
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Group
object if the operation was successful.public ReusableResponse<Group> createGroup(Map<String,String> groupData, Map<String,List<String>> roles, String runAsUser)
groupData
- a Map containing the group data. The available options are:
name
(required, cannot be null): the name of the groupdescription
: the optional description for the grouproles
- a Map representing the roles to be assigned to the group. The key is the product name,
and the value is a List of role names.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Group
object if the operation was successful.public ReusableResponse<Group> createGroup(Map<String,String> groupData, String runAsUser)
groupData
- a Map containing the group data. The available options are:
name
(required, cannot be null): the name of the groupdescription
: the optional description for the grouprunAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Group
object if the operation was successful.public ReusableResponse<Permission> createPermission(Map<String,String> permissionData)
permissionData
- a Map containing the permission data. The available options are:
product
(required): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required): the permission expressiondescription
: the optional description for the permissionReusableResponse
object containing the result of the Permission
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Permission
object if the operation was successful.public ReusableResponse<Permission> createPermission(Map<String,String> permissionData, String runAsUser)
permissionData
- a Map containing the permission data. The available options are:
product
(required): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required): the permission expressiondescription
: the optional description for the permissionrunAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Permission
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Permission
object if the operation was successful.public ReusableResponse<Role> createRole(Map<String,String> roleData)
roleData
- a Map containing the role data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the name of the roledescription
: the optional description for the roleReusableResponse
object containing the result of the Role
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Role
object if the operation was successful.public ReusableResponse<Role> createRole(Map<String,String> roleData, List<String> permissions)
roleData
- a Map containing the role data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the name of the roledescription
: the optional description for the rolepermissions
- a list of permissions to be assigned to the role.ReusableResponse
object containing the result of the Role
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Role
object if the operation was successful.public ReusableResponse<Role> createRole(Map<String,String> roleData, List<String> permissions, String runAsUser)
roleData
- a Map containing the role data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the name of the roledescription
: the optional description for the rolepermissions
- a list of permissions to be assigned to the role.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Role
object if the operation was successful.public ReusableResponse<Role> createRole(Map<String,String> roleData, String runAsUser)
roleData
- a Map containing the role data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the name of the roledescription
: the optional description for the rolerunAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created Role
object if the operation was successful.public ReusableResponse<User> createUser(Map<String,String> userData)
userData
- a Map containing the user data. The available options are:
username
(required, cannot be null): the username of the user.name
(required, cannot be null): the name of the user.email
(required, cannot be null): the email of the user.password
: the password of the user.contact
: the contact information of the user.substitute
: the optional substitute value for the user.ReusableResponse
object containing the result of the User
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created User object if the operation was successful.public ReusableResponse<User> createUser(Map<String,String> userData, List<String> groups)
userData
- a Map containing the user data. The available options are:
username
(required, cannot be null): the username of the user.name
(required, cannot be null): the name of the user.email
(required, cannot be null): the email of the user.password
: the password of the user.contact
: the contact information of the user.substitute
: the optional substitute value for the user.groups
- a list of group names to which the user should be added.ReusableResponse
object containing the result of the User
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created User
object if the operation was successful.public ReusableResponse<User> createUser(Map<String,String> userData, List<String> groups, String runAsUser)
userData
- a Map containing the user data. The available options are:
username
(required, cannot be null): the username of the user.name
(required, cannot be null): the name of the user.email
(required, cannot be null): the email of the user.password
: the password of the user.contact
: the contact information of the user.substitute
: the optional substitute value for the user.groups
- a list of group names to which the user should be added.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the User
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created User
object if the operation was successful.public ReusableResponse<User> createUser(Map<String,String> userData, String runAsUser)
userData
- a Map containing the user data. The available options are:
username
(required, cannot be null): the username of the user.name
(required, cannot be null): the name of the user.email
(required, cannot be null): the email of the user.password
: the password of the user.contact
: the contact information of the user.substitute
: the optional substitute value for the user.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the User
creation operation. The response
includes information about the success or failure of the operation, any error messages, and the created User
object if the operation was successful.public ReusableResponse<EmptyBody> deleteGroup(String name)
name
- the name of the group to be deleted.ReusableResponse
object containing the result of the Group
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deleteGroup(String name, String runAsUser)
name
- the name of the group to be deleted.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deletePermission(String product, String name)
product
- the product name of the permission to be deleted.name
- the name of the permission to be deleted.ReusableResponse
object containing the result of the Permission
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deletePermission(String product, String name, String runAsUser)
product
- the product name of the permission to be deleted.name
- the name of the permission to be deleted.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Permission
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deleteRole(String product, String name)
product
- the product name of the role to be deleted.name
- the name of the role to be deleted.ReusableResponse
object containing the result of the Role
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deleteRole(String product, String name, String runAsUser)
product
- the product name of the role to be deleted.name
- the name of the role to be deleted.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deleteUser(String username)
username
- the ID of the user to be deleted.ReusableResponse
object containing the result of the User
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> deleteUser(String username, String runAsUser)
username
- the ID of the user to be deleted.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the User
deletion operation. The response
includes information about the success or failure of the operation and any error messages.public ReusableResponse<EmptyBody> disableUser(String username)
username
- the username of the user to be disabled.ReusableResponse
object containing the result of the disablement operation. The response
includes information about the success or failure of the operation, any error messages, and the created User object if the operation was successful.public ReusableResponse<EmptyBody> disableUser(String username, String runAsUser)
username
- the username of the user to be disabled.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the disablement operation. The response
includes information about the success or failure of the operation, any error messages, and the created User object if the operation was successful.public ReusableResponse<EmptyBody> enableUser(String username)
username
- the username of the user to be enabled.ReusableResponse
object containing the result of the enablement operation. The response
includes information about the success or failure of the operation, any error messages, and the created User object if the operation was successful.public ReusableResponse<EmptyBody> enableUser(String username, String runAsUser)
username
- the username of the user to be enabled.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the enablement operation. The response
includes information about the success or failure of the operation, any error messages, and the created User object if the operation was successful.public ReusableResponse<Group> getGroup(Integer groupId)
groupId
- the ID of the group to retrieve information for.ReusableResponse
object containing the result of the Group
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Group
object representing the retrieved user if the operation was successful.public ReusableResponse<Group> getGroup(Integer groupId, String runAsUser)
groupId
- the ID of the group to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Group
object representing the retrieved user if the operation was successful.public ReusableResponse<Group> getGroup(String name)
name
- the ID of the group to retrieve information for.ReusableResponse
object containing the result of the Group
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Group
object representing the retrieved user if the operation was successful.public ReusableResponse<Group> getGroup(String name, String runAsUser)
name
- the ID of the group to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Group
object representing the retrieved user if the operation was successful.public ReusableResponse<Permission> getPermission(Integer permissionId)
permissionId
- the ID of the role to retrieve information for.ReusableResponse
object containing the result of the Permission
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Permission
object representing the retrieved user if the operation was successful.public ReusableResponse<Permission> getPermission(Integer permissionId, String runAsUser)
permissionId
- the ID of the role to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Permission
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Permission
object representing the retrieved user if the operation was successful.public ReusableResponse<Permission> getPermission(String product, String name)
product
- the name of the product for which the permission should be retrieved.name
- the name of the permission to retrieve information for.ReusableResponse
object containing the result of the Permission
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Permission
object representing the retrieved role if the operation was successful.public ReusableResponse<Permission> getPermission(String product, String name, String runAsUser)
product
- the name of the product for which the permission should be retrieved.name
- the name of the permission to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Permission
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Permission
object representing the retrieved role if the operation was successful.public ReusableResponse<Role> getRole(Integer roleId)
roleId
- the ID of the role to retrieve information for.ReusableResponse
object containing the result of the Role
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Role
object representing the retrieved user if the operation was successful.public ReusableResponse<Role> getRole(Integer roleId, String runAsUser)
roleId
- the ID of the role to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Role
object representing the retrieved user if the operation was successful.public ReusableResponse<Role> getRole(String product, String name)
product
- the name of the product for which the role should be retrieved.name
- the name of the role to retrieve information for.ReusableResponse
object containing the result of the Role
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Role
object representing the retrieved role if the operation was successful.public ReusableResponse<Role> getRole(String product, String name, String runAsUser)
product
- the name of the product for which the role should be retrieved.name
- the name of the role to retrieve information for.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the Role
object representing the retrieved role if the operation was successful.public ReusableResponse<User> getUser(Integer userId)
userId
- the ID of the user to retrieve information for.ReusableResponse
object containing the result of the User
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the User
object representing the retrieved user if the operation was successful.public ReusableResponse<User> getUser(Integer userId, String runAsUser)
userId
- the ID of the user to retrieve information for.runAsUser
- the username of the user running the operation, or null if not applicable.ReusableResponse
object containing the result of the User
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the User
object representing the retrieved user if the operation was successful.public ReusableResponse<User> getUser(String username)
username
- the username of the user to retrieve information for.ReusableResponse
object containing the result of the User
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the User
object representing the retrieved user if the operation was successful.public ReusableResponse<User> getUser(String username, String runAsUser)
username
- the username of the user to retrieve information for.runAsUser
- the username of the user running the operation, or null if not applicable.ReusableResponse
object containing the result of the User
retrieval operation. The response
includes information about the success or failure of the operation, any error messages,
and the User
object representing the retrieved user if the operation was successful.public ReusableResponse<Role> removePermissionsFromRole(String product, String role, List<String> permissions)
product
- the name of the product from which the role and permission belongs to.role
- the name of the role from which the permission should be removed.permissions
- the list of permission to be removed.ReusableResponse
object containing the result of the permission addition to Role
operation. The response
includes information about the success or failure of the operation, any error messages,
and a Role
representing the updated role if the operation was successful.public ReusableResponse<Role> removePermissionsFromRole(String product, String role, List<String> permissions, String runAsUser)
product
- the name of the product from which the role and permission belongs to.role
- the name of the role from which the permission should be removed.permissions
- the list of permission to be removed.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the permission addition to Role
operation. The response
includes information about the success or failure of the operation, any error messages,
and a Role
representing the updated role if the operation was successful.public ReusableResponse<Group> removeRolesFromGroup(String group, String product, List<String> roles)
group
- the name of the group from which the roles should be removed.product
- the name of the product for which the roles belongs to.roles
- a list of role names to be removed.ReusableResponse
object containing the result of the roles removal from group operation. The response
includes information about the success or failure of the operation, any error messages,
and a Group
Group object representing the updated group if the operation was successful.public ReusableResponse<Group> removeRolesFromGroup(String group, String product, List<String> roles, String runAsUser)
group
- the name of the group from which the roles should be removed.product
- the name of the product for which the roles belongs to.roles
- a list of role names to be removed.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the roles removal from group operation. The response
includes information about the success or failure of the operation, any error messages,
and a Group
Group object representing the updated group if the operation was successful.public ReusableResponse<User> removeUserFromGroups(String username, List<String> groups)
username
- the username of the user to be removed from the groups.groups
- a list of group names from which the user should be removed.public ReusableResponse<User> removeUserFromGroups(String username, List<String> groups, String runAsUser)
username
- the username of the user to be removed from the groups.groups
- a list of group names from which the user should be removed.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.public SearchResult<Group> searchGroups(String query)
Searches for groups based on the provided query.
Some examples:query
- the search query to be used for finding groups.SearchResult
object containing the result of the Group
search operation. The SearchResult
includes a list of Group
objects that match the search query and additional information such as
the total count of matching groups.public SearchResult<Group> searchGroups(String query, Map<String,String> options)
Searches for groups based on the provided query.
Some examples:query
- the search query to be used for finding groups.options
- additional options for customizing the group search. The options are provided as a map
where the keys represent the option names, and the values contain the corresponding option values.
The list of options are:
size
: the number of results to return. Defaults to 30.sort
: a comma-separated list of fields and sort directions.
E.g. field1:asc,field2:desc
runAs
: the user under which the creation operation should be performed.
SearchResult
object containing the result of the Group
search operation. The SearchResult
includes a list of Group
objects that match the search query and additional information such as
the total count of matching groups.public SearchResult<Permission> searchPermissions(String query)
Searches for permissions based on the provided query.
Some examples:query
- the search query to be used for finding permissions.SearchResult
object containing the result of the Permission
search operation. The SearchResult
includes a list of Permission
objects that match the search query and additional information such as
the total count of matching permissions.public SearchResult<Permission> searchPermissions(String query, Map<String,String> options)
Searches for permissions based on the provided query.
Some examples:query
- the search query to be used for finding permissions.options
- additional options for customizing the permission search. The options are provided as a map
where the keys represent the option names, and the values contain the corresponding option values.
The list of options are:
size
: the number of results to return. Defaults to 30.sort
: a comma-separated list of fields and sort directions.
E.g. field1:asc,field2:desc
runAs
: the user under which the creation operation should be performed.
SearchResult
object containing the result of the Permission
search operation. The SearchResult
includes a list of Permission
objects that match the search query and additional information such as
the total count of matching permissions.public SearchResult<Role> searchRoles(String query)
Searches for roles based on the provided query.
Some examples:query
- the search query to be used for finding roles.SearchResult
object containing the result of the Role
search operation. The SearchResult
includes a list of Role
objects that match the search query and additional information such as
the total count of matching roles.public SearchResult<Role> searchRoles(String query, Map<String,String> options)
Searches for roles based on the provided query.
Some examples:query
- the search query to be used for finding roles.options
- additional options for customizing the role search. The options are provided as a map
where the keys represent the option names, and the values contain the corresponding option values.
The list of options are:
size
: the number of results to return. Defaults to 30.sort
: a comma-separated list of fields and sort directions.
E.g. field1:asc,field2:desc
runAs
: the user under which the creation operation should be performed.
SearchResult
object containing the result of the Role
search operation. The SearchResult
includes a list of Role
objects that match the search query and additional information such as
the total count of matching groups.public SearchResult<User> searchUsers(String query)
Searches for users based on the provided query.
Some examples:query
- the search query to be used for finding users.SearchResult
object containing the result of the User
search operation. The SearchResult
includes a list of User
objects that match the search query and additional information such as
the total count of matching users.public SearchResult<User> searchUsers(String query, Map<String,String> options)
Searches for users based on the provided query.
Some examples:query
- the search query to be used for finding users.options
- additional options for customizing the user search. The options are provided as a map
where the keys represent the option names, and the values contain the corresponding option values.
The list of options are:
size
: the number of results to return. Defaults to 30.sort
: a comma-separated list of fields and sort directions.
E.g. field1:asc,field2:desc
runAs
: the user under which the creation operation should be performed.
SearchResult
object containing the result of the User
search operation. The SearchResult
includes a list of User
objects that match the search query and additional information such as
the total count of matching users.public ReusableResponse<Group> updateGroup(String name, Map<String,Object> groupData)
name
- the name of the group to be updated.groupData
- a Map containing the updated group data. The available options are:
version
(required, cannot be null): the last version of the groupname
(required, cannot be null): the name of the groupdescription
: the optional description for the groupReusableResponse
object containing the result of the Group
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Group
object
if the operation was successful.public ReusableResponse<Group> updateGroup(String name, Map<String,Object> groupData, String runAsUser)
name
- the name of the group to be updated.groupData
- a Map containing the updated group data. The available options are:
name
(required, cannot be null): the name of the groupdescription
: the optional description for the grouprunAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Group
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Group object
if the operation was successful.public ReusableResponse<Permission> updatePermission(String product, String name, Map<String,Object> permissionData)
product
- the product of the permission to be updated.name
- the name of the permission to be updated.permissionData
- a Map containing the updated permission data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the permission expressiondescription
: the optional description for the permissionReusableResponse
object containing the result of the Permission
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Permission
object
if the operation was successful.public ReusableResponse<Permission> updatePermission(String product, String name, Map<String,Object> permissionData, String runAsUser)
product
- the product of the permission to be updated.name
- the name of the permission to be updated.permissionData
- a Map containing the updated permission data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the permission expressiondescription
: the optional description for the permissionrunAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Permission
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Permission
object
if the operation was successful.public ReusableResponse<Role> updateRole(String product, String name, Map<String,Object> roleData)
product
- the product of the role to be updated.name
- the name of the role to be updated.roleData
- a Map containing the updated role data. The available options are:
product
(required, cannot be null): the name of the product. Acceptable values are: RecordM, UserM, DeviceM, IntegrationMname
(required, cannot be null): the name of the roledescription
: the optional description for the roleReusableResponse
object containing the result of the Role
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Role
object
if the operation was successful.public ReusableResponse<Role> updateRole(String product, String name, Map<String,Object> roleData, String runAsUser)
product
- the product of the role to be updated.name
- the name of the role to be updated.roleData
- a map containing group information. The keys represent the attributes of the group,
and the values contain the corresponding values for each attribute.
runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the Role
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated Role
object
if the operation was successful.public ReusableResponse<User> updateUser(String username, Map<String,Object> userData)
username
- the username of the user to be updated.userData
- a Map containing the updated user data. The available options are:
name
(required, cannot be null): the updated name of the user.email
(required, cannot be null): the updated email of the user.state
(required, cannot be null): the updated state of the user.password
: the updated password of the user.contact
: the updated contact information of the user.substitute
: the optional substitute value for the user.ReusableResponse
object containing the result of the User
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated User
object if the operation was successful.public ReusableResponse<User> updateUser(String username, Map<String,Object> userData, String runAsUser)
username
- the username of the user to be updated.userData
- a Map containing the updated user data. The available options are:
name
(required, cannot be null): the updated name of the user.email
(required, cannot be null): the updated email of the user.state
(required, cannot be null): the updated state of the user.password
: the updated password of the user.contact
: the updated contact information of the user.substitute
: the optional substitute value for the user.runAsUser
- the user under which the creation operation should be performed, or null if not applicable.ReusableResponse
object containing the result of the User
update operation. The response
includes information about the success or failure of the operation, any error messages, and the updated User object
if the operation was successful.Copyright © 2021 Cult Of Bits, lda