public class AuthResourceInMemoryDao extends Object implements AuthResourceDao
AuthResourceDao to provide functionality manage in memory auth resources.| Constructor and Description |
|---|
AuthResourceInMemoryDao() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGroups(String resourceType,
String resourceName,
String action,
List<String> groups)
Add batch of group mapping to the given auth resource
|
boolean |
delete(String resourceType,
String resource)
Delete resource from database on given given resource type and name and user groups.
|
boolean |
isExists(String resourceType,
String resourceName)
Check resource existence for given resource type and name.
|
void |
persist(AuthResource authResource)
Persist resource in the database
|
AuthResource |
read(String resourceType,
String resource)
Get resource for given resource type and name.
|
List<AuthResource> |
readAll(String resourceType,
String ownerId)
Get all resource for given resource type.
|
List<AuthResource> |
readAll(String resourceType,
String action,
String ownerId,
List<String> userGroups)
Get all resource for given resource type.
|
boolean |
removeGroup(String resourceType,
String resourceName,
String action,
String group)
Remove a group mapping from the given auth resource.
|
void |
update(AuthResource authResource)
Update resource owner in the database
|
boolean |
updateOwner(String resourceType,
String resourceName,
String newOwner)
Update owner of the given resource.
|
public void persist(AuthResource authResource) throws AuthServerException
AuthResourceDaopersist in interface AuthResourceDaoauthResource - authResourceAuthServerException - when database operation failed.public void update(AuthResource authResource)
AuthResourceDaoupdate in interface AuthResourceDaoauthResource - authResourcepublic boolean delete(String resourceType, String resource)
AuthResourceDaodelete in interface AuthResourceDaoresourceType - resource Typeresource - resourcepublic AuthResource read(String resourceType, String resource)
AuthResourceDaoread in interface AuthResourceDaoresourceType - resource Typeresource - resourcepublic List<AuthResource> readAll(String resourceType, String ownerId)
AuthResourceDaoreadAll in interface AuthResourceDaoresourceType - resource TypeownerId - owner
user idpublic List<AuthResource> readAll(String resourceType, String action, String ownerId, List<String> userGroups)
AuthResourceDaoreadAll in interface AuthResourceDaoresourceType - resource Typeaction - actionownerId - owner user iduserGroups - user groupspublic boolean isExists(String resourceType, String resourceName)
AuthResourceDaoisExists in interface AuthResourceDaoresourceType - resource TyperesourceName - resourcepublic boolean updateOwner(String resourceType, String resourceName, String newOwner)
AuthResourceDaoupdateOwner in interface AuthResourceDaoresourceType - resource typeresourceName - resource namenewOwner - user ID of the new ownerpublic boolean addGroups(String resourceType, String resourceName, String action, List<String> groups)
AuthResourceDaoaddGroups in interface AuthResourceDaoresourceType - resource typeresourceName - resource nameaction - actiongroups - list of group to addpublic boolean removeGroup(String resourceType, String resourceName, String action, String group)
AuthResourceDaoremoveGroup in interface AuthResourceDaoresourceType - resource typeresourceName - resource nameaction - actiongroup - group to addCopyright © 2018 WSO2. All rights reserved.