@ApplicationScoped public class ClientUserSystemManager extends Object implements UserSystemManager
The main client side manager for the user management stuff.
Modifier and Type | Field and Description |
---|---|
protected org.jboss.errai.common.client.api.ErrorCallback<org.jboss.errai.bus.client.api.messaging.Message> |
loadErrorCallback |
Constructor and Description |
---|
ClientUserSystemManager(org.jboss.errai.common.client.api.Caller<UserManagerService> usersManagerService,
org.jboss.errai.common.client.api.Caller<GroupManagerService> groupsManagerService,
org.jboss.errai.common.client.api.Caller<RoleManagerService> rolesManagerService,
ClientSecurityExceptionMessageResolver exceptionMessageResolver,
ErrorPopupPresenter errorPopupPresenter) |
Modifier and Type | Method and Description |
---|---|
org.jboss.errai.security.shared.api.Group |
createGroup(String name) |
org.jboss.errai.security.shared.api.Role |
createRole(String name) |
org.jboss.errai.security.shared.api.identity.User |
createUser(String identifier) |
UserManager.UserAttribute |
createUserAttribute(String name,
boolean isMandatory,
boolean isEditable,
String defaultValue) |
Collection<String> |
getConstrainedGroups() |
GroupManagerSettings |
getGroupManagerSettings() |
UserManagerSettings |
getUserManagerSettings() |
UserManager.UserAttribute |
getUserSupportedAttribute(String attributeName) |
Collection<UserManager.UserAttribute> |
getUserSupportedAttributes() |
GroupManager |
groups() |
GroupManager |
groups(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback,
org.jboss.errai.common.client.api.ErrorCallback errorCallback) |
EntityValidator<org.jboss.errai.security.shared.api.Group> |
groupsValidator() |
void |
initCache() |
boolean |
isActive() |
boolean |
isCapabilityEnabled(Map<Capability,CapabilityStatus> capabilities,
Capability capability) |
boolean |
isGroupCapabilityEnabled(Capability capability) |
boolean |
isUserCapabilityEnabled(Capability capability) |
RoleManager |
roles() |
RoleManager |
roles(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback,
org.jboss.errai.common.client.api.ErrorCallback errorCallback) |
EntityValidator<org.jboss.errai.security.shared.api.Role> |
rolesValidator() |
UserManager |
users() |
UserManager |
users(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback,
org.jboss.errai.common.client.api.ErrorCallback errorCallback) |
EntityValidator<org.jboss.errai.security.shared.api.identity.User> |
usersValidator() |
void |
waitForInitialization(Command command)
Executes the command argument when services are initialized, you can.check the
isActive() method after the command execution to check it services are up. |
protected final org.jboss.errai.common.client.api.ErrorCallback<org.jboss.errai.bus.client.api.messaging.Message> loadErrorCallback
@Inject public ClientUserSystemManager(org.jboss.errai.common.client.api.Caller<UserManagerService> usersManagerService, org.jboss.errai.common.client.api.Caller<GroupManagerService> groupsManagerService, org.jboss.errai.common.client.api.Caller<RoleManagerService> rolesManagerService, ClientSecurityExceptionMessageResolver exceptionMessageResolver, ErrorPopupPresenter errorPopupPresenter)
@PostConstruct public void initCache()
public UserManager users(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback, org.jboss.errai.common.client.api.ErrorCallback errorCallback)
public GroupManager groups(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback, org.jboss.errai.common.client.api.ErrorCallback errorCallback)
public RoleManager roles(org.jboss.errai.common.client.api.RemoteCallback<?> remoteCallback, org.jboss.errai.common.client.api.ErrorCallback errorCallback)
public UserManager users()
users
in interface UserManagementService
public GroupManager groups()
groups
in interface UserManagementService
public RoleManager roles()
roles
in interface UserManagementService
public boolean isUserCapabilityEnabled(Capability capability)
public Collection<UserManager.UserAttribute> getUserSupportedAttributes()
public UserManager.UserAttribute getUserSupportedAttribute(String attributeName)
public boolean isGroupCapabilityEnabled(Capability capability)
public boolean isCapabilityEnabled(Map<Capability,CapabilityStatus> capabilities, Capability capability)
public Collection<String> getConstrainedGroups()
public org.jboss.errai.security.shared.api.identity.User createUser(String identifier)
public UserManager.UserAttribute createUserAttribute(String name, boolean isMandatory, boolean isEditable, String defaultValue)
public org.jboss.errai.security.shared.api.Group createGroup(String name)
public org.jboss.errai.security.shared.api.Role createRole(String name)
public EntityValidator<org.jboss.errai.security.shared.api.identity.User> usersValidator()
usersValidator
in interface UserSystemManager
public EntityValidator<org.jboss.errai.security.shared.api.Group> groupsValidator()
groupsValidator
in interface UserSystemManager
public EntityValidator<org.jboss.errai.security.shared.api.Role> rolesValidator()
rolesValidator
in interface UserSystemManager
public boolean isActive()
isActive
in interface UserSystemManager
public void waitForInitialization(Command command)
isActive()
method after the command execution to check it services are up.
The command argument is ensured to be executed whether services are up or when the initialization has failed.command
- The command executed when the initialization has finished.public UserManagerSettings getUserManagerSettings()
public GroupManagerSettings getGroupManagerSettings()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.