public class RoleServiceImpl extends Object implements RoleService
| Modifier | Constructor and Description |
|---|---|
protected |
RoleServiceImpl(MongoConnection mongoConnection,
MongoJackObjectMapperProvider mapper,
Permissions permissions,
javax.validation.Validator validator) |
| Modifier and Type | Method and Description |
|---|---|
int |
delete(String roleName)
Deletes the (case insensitively) named role, unless it is read only.
|
boolean |
exists(String roleName) |
String |
getAdminRoleObjectId() |
String |
getReaderRoleObjectId() |
RoleImpl |
load(String roleName) |
Set<Role> |
loadAll() |
Map<String,Role> |
loadAllIdMap() |
Map<String,Role> |
loadAllLowercaseNameMap() |
Role |
loadById(String roleId) |
RoleImpl |
save(Role role1) |
Set<javax.validation.ConstraintViolation<Role>> |
validate(Role role) |
@Inject protected RoleServiceImpl(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, Permissions permissions, javax.validation.Validator validator)
public Role loadById(String roleId) throws NotFoundException
loadById in interface RoleServiceNotFoundExceptionpublic RoleImpl load(String roleName) throws NotFoundException
load in interface RoleServiceNotFoundExceptionpublic boolean exists(String roleName)
exists in interface RoleServicepublic Set<Role> loadAll() throws NotFoundException
loadAll in interface RoleServiceNotFoundExceptionpublic Map<String,Role> loadAllIdMap() throws NotFoundException
loadAllIdMap in interface RoleServiceNotFoundExceptionpublic Map<String,Role> loadAllLowercaseNameMap() throws NotFoundException
loadAllLowercaseNameMap in interface RoleServiceNotFoundExceptionpublic RoleImpl save(Role role1) throws ValidationException
save in interface RoleServiceValidationExceptionpublic Set<javax.validation.ConstraintViolation<Role>> validate(Role role)
validate in interface RoleServicepublic int delete(String roleName)
RoleServicedelete in interface RoleServiceroleName - role name to delete, case insensitivepublic String getAdminRoleObjectId()
getAdminRoleObjectId in interface RoleServicepublic String getReaderRoleObjectId()
getReaderRoleObjectId in interface RoleServiceCopyright © 2012-2016 Graylog, Inc.. All Rights Reserved.