public interface Storage
Security information (user information, user group information, role information, rights information) access interface
Modifier and Type | Method and Description |
---|---|
void |
addRole(Role toAdd)
Adds roles
|
void |
addUser(User toAdd)
adds user
|
void |
addUserGroup(UserGroup toAdd)
adds user array
|
void |
alterRole(java.lang.String name, Role role)
Update roles
|
void |
alterUser(java.lang.String name, User user)
Update users
|
void |
alterUserGroup(java.lang.String name, UserGroup userGroup)
Update user array
|
void |
dispose()
Disconnects the security information memory, when disconnecting internal resources, such as database connections, file handles, and file locks, are disconnected
|
boolean |
existSystemUser(java.lang.String[] userNames)
Check if there is a system (SYSTEM role) user in incoming users.
|
int |
getAllUsersCount()
Get the total number of users.
|
getGroups(int startIndex, int expectCount)
Batch return to user group
|
|
java.util.Map<java.lang.String,AuthorizeSetting> |
getInstanceAuthorisations()
Deprecated.
|
int |
getIportalUserCount()
Query the total number of iportal users.
|
java.util.Set<java.lang.String> |
getPermission(java.lang.String user, java.util.Collection<? extends java.lang.String> groups, java.util.Collection<? extends java.lang.String> roles, java.util.Set<java.lang.String> resourceIds)
Accesses authority information according to the user, user group, role.
|
java.util.List<java.lang.String> |
getPortalUserNames()
Query the names of all iportal users.
|
java.util.Set<java.lang.String> |
getPublicServiceNames()
Queries all roles, and batch returns.
|
Role |
getRole(java.lang.String name)
Gets roles
|
java.util.Map<java.lang.String,RolePermissions> |
getRolePermissions(java.lang.String[] names)
Gets permission information based on role name
|
getRoles(int startIndex, int expectCount)
Queries all roles, and batch returns.
|
|
User |
getSystemUser()
Query the system administrator.
|
User |
getUser(java.lang.String name)
Gets the user
|
java.util.List<java.lang.String> |
getUserNames()
Query the names of all users.
|
getUsers(int startIndex, int expectCount)
Finds all users and return them in bulk
|
|
Page<User> |
getUsers(UserSearchParameter param)
Query the user according to the parameter paging.
|
void |
grantUser(java.lang.String username, RolePermissions permission)
Defines role permissions to users based on user name
|
void |
insert(ServiceBeanPermission[] permissions)
Adds service authority
|
java.util.List<java.lang.String> |
listUsers(java.lang.String includedRole, java.util.List<java.lang.String> anyIncludedRoles, java.util.List<java.lang.String> excludedRoles)
Query the user who satisfies the role filter.
|
void |
removeInstances(java.lang.String[] names)
Deletes the authorization instance by name
|
void |
removeRoles(java.lang.String[] names)
Removes the role
|
void |
removeUserGroups(java.lang.String[] names)
Removes the user array
|
void |
removeUsers(java.lang.String[] names)
Removes the user
|
void |
renameInstance(java.lang.String oldName, java.lang.String newName)
Modifies the instance name
|
void |
resetStorageSetting(SecurityInfoStorageSetting setting)
Reset the storage settings, and re-initialize according to the reset settings
|
void |
setFormPasswordSavedCount(int passwordDiffCount)
Sets the number of password saved
|
void |
setPasswordService(PasswordService value) |
void |
setRolePermissions(java.lang.String roleName, RolePermissions permission, ServiceBeanPermission[] permissions)
Sets the role permissions and service permissions based on the role name
|
void |
updateInstanceAuthorisation(java.lang.String name, AuthorizeSetting authorizeSetting)
Updates the authorization instance settings based on the authorization instance name
|
void resetStorageSetting(SecurityInfoStorageSetting setting) throws ConnectionException
Reset the storage settings, and re-initialize according to the reset settings
setting
-ConnectionException
User getUser(java.lang.String name)
Gets the user
name
- user name.void addUser(User toAdd)
adds user
toAdd
- users to addvoid removeUsers(java.lang.String[] names)
Removes the user
names
- An array of user names to removevoid alterUser(java.lang.String name, User user)
Update users
name
- user name.user
- new user objectvoid addUserGroup(UserGroup toAdd)
adds user array
toAdd
- user array to addvoid alterUserGroup(java.lang.String name, UserGroup userGroup)
Update user array
name
- The name of the user groupuserGroup
- new user objectvoid removeUserGroups(java.lang.String[] names)
Removes the user array
names
- user name group arraygetUsers(int startIndex, int expectCount)
Finds all users and return them in bulk
startIndex
-expectCount
-java.util.List<java.lang.String> getUserNames()
Query the names of all users.
java.util.List<java.lang.String> getPortalUserNames()
Query the names of all iportal users.
Page<User> getUsers(UserSearchParameter param)
Query the user according to the parameter paging.
param
-int getAllUsersCount()
Get the total number of users.
User getSystemUser()
Query the system administrator.
int getIportalUserCount()
Query the total number of iportal users.
boolean existSystemUser(java.lang.String[] userNames)
Check if there is a system (SYSTEM role) user in incoming users.
java.util.List<java.lang.String> listUsers(java.lang.String includedRole, java.util.List<java.lang.String> anyIncludedRoles, java.util.List<java.lang.String> excludedRoles)
Query the user who satisfies the role filter.
includedRole
-anyIncludedRoles
-excludedRoles
-getGroups(int startIndex, int expectCount)
Batch return to user group
startIndex
-expectCount
-void addRole(Role toAdd)
Adds roles
toAdd
- roles to addvoid alterRole(java.lang.String name, Role role)
Update roles
name
- roles' name.role
- new role objectvoid removeRoles(java.lang.String[] names)
Removes the role
names
- An array of role names to removeRole getRole(java.lang.String name)
Gets roles
name
- roles' name.getRoles(int startIndex, int expectCount)
Queries all roles, and batch returns.
startIndex
-expectCount
-java.util.Set<java.lang.String> getPublicServiceNames()
Queries all roles, and batch returns.
java.util.Set<java.lang.String> getPermission(java.lang.String user, java.util.Collection<? extends java.lang.String> groups, java.util.Collection<? extends java.lang.String> roles, java.util.Set<java.lang.String> resourceIds)
Accesses authority information according to the user, user group, role.
user
- user.groups
- user groupsroles
- rolesjava.util.Map<java.lang.String,RolePermissions> getRolePermissions(java.lang.String[] names)
Gets permission information based on role name
names
-void updateInstanceAuthorisation(java.lang.String name, AuthorizeSetting authorizeSetting)
Updates the authorization instance settings based on the authorization instance name
name
-authorizeSetting
-@Deprecated java.util.Map<java.lang.String,AuthorizeSetting> getInstanceAuthorisations()
Obtains authorization information for all service instances
void removeInstances(java.lang.String[] names)
Deletes the authorization instance by name
names
-void renameInstance(java.lang.String oldName, java.lang.String newName)
Modifies the instance name
oldName
-newName
-void setRolePermissions(java.lang.String roleName, RolePermissions permission, ServiceBeanPermission[] permissions)
Sets the role permissions and service permissions based on the role name
roleName
-permission
-permissions
-void grantUser(java.lang.String username, RolePermissions permission)
Defines role permissions to users based on user name
username
-permission
-void insert(ServiceBeanPermission[] permissions)
Adds service authority
permissions
-void setFormPasswordSavedCount(int passwordDiffCount)
Sets the number of password saved
passwordDiffCount
-void dispose()
Disconnects the security information memory, when disconnecting internal resources, such as database connections, file handles, and file locks, are disconnected
void setPasswordService(PasswordService value)