Class SQLPermissionStore<V extends Permission>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.SQLDatabase
-
- edu.uiuc.ncsa.security.storage.sql.SQLStore<V>
-
- org.oa4mp.server.api.permissions.admin.SQLPermissionStore<V>
-
- All Implemented Interfaces:
PermissionsStore<V>
,edu.uiuc.ncsa.security.core.Store<V>
,Map<edu.uiuc.ncsa.security.core.Identifier,V>
public class SQLPermissionStore<V extends Permission> extends edu.uiuc.ncsa.security.storage.sql.SQLStore<V> implements PermissionsStore<V>
Created by Jeff Gaynor
on 10/13/16 at 3:58 PM
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_TABLENAME
-
Constructor Summary
Constructors Constructor Description SQLPermissionStore()
SQLPermissionStore(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> identifiableProvider, edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionList
get(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Retrieve a permission from the admin and client identifier.List<edu.uiuc.ncsa.security.core.Identifier>
getAdmins(edu.uiuc.ncsa.security.core.Identifier clientID)
A list of all admin ids for a given client.int
getClientCount(edu.uiuc.ncsa.security.core.Identifier adminID)
List<edu.uiuc.ncsa.security.core.Identifier>
getClients(edu.uiuc.ncsa.security.core.Identifier adminID)
A list of all identifiers that a given admin can manage.String
getCreationTSField()
Permission
getErsatzChain(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
Get the specific permission with the chain starting with clientID and ending with ersatzID.PermissionList
getErsatzChains(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Returns the chain of ersatz clients for a given admin and provisioning client.PermissionList
getProvisioners(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
boolean
hasEntry(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Returns whether or not there is an entry for this pair of identifiers.-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLStore
checkColumns, checkTable, clear, containsKey, containsValue, create, depopulate, entrySet, get, getAll, getDerbyMostRecent, getMapConverter, getMostRecent, getMostRecentStatement, getTable, getXMLConverter, isEmpty, keySet, populate, put, putAll, register, remove, remove, save, search, search, search, size, size, size, toString, update, values
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLDatabase
destroyConnection, getConnection, getConnectionPool, releaseConnection, rsToMap, setConnectionPool
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionsStore
getMapConverter
-
-
-
-
Field Detail
-
DEFAULT_TABLENAME
public static String DEFAULT_TABLENAME
-
-
Method Detail
-
getCreationTSField
public String getCreationTSField()
- Specified by:
getCreationTSField
in classedu.uiuc.ncsa.security.storage.sql.SQLStore<V extends Permission>
-
get
public PermissionList get(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Retrieve a permission from the admin and client identifier.- Specified by:
get
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getProvisioners
public PermissionList getProvisioners(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
- Specified by:
getProvisioners
in interfacePermissionsStore<V extends Permission>
-
getErsatzChains
public PermissionList getErsatzChains(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Returns the chain of ersatz clients for a given admin and provisioning client. Access the list usingPermission.getErsatzChain()
.- Specified by:
getErsatzChains
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getErsatzChain
public Permission getErsatzChain(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
Description copied from interface:PermissionsStore
Get the specific permission with the chain starting with clientID and ending with ersatzID.- Specified by:
getErsatzChain
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getClientCount
public int getClientCount(edu.uiuc.ncsa.security.core.Identifier adminID)
- Specified by:
getClientCount
in interfacePermissionsStore<V extends Permission>
-
getClients
public List<edu.uiuc.ncsa.security.core.Identifier> getClients(edu.uiuc.ncsa.security.core.Identifier adminID)
Description copied from interface:PermissionsStore
A list of all identifiers that a given admin can manage.- Specified by:
getClients
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getAdmins
public List<edu.uiuc.ncsa.security.core.Identifier> getAdmins(edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
A list of all admin ids for a given client.- Specified by:
getAdmins
in interfacePermissionsStore<V extends Permission>
- Returns:
-
hasEntry
public boolean hasEntry(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Returns whether or not there is an entry for this pair of identifiers. There is at most one permission for any such pair- Specified by:
hasEntry
in interfacePermissionsStore<V extends Permission>
- Returns:
-
-