Class CILSQLIdentityProviderStore
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.SQLDatabase
-
- edu.uiuc.ncsa.security.storage.sql.SQLStore<V>
-
- edu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider>
-
- org.cilogon.oauth2.servlet.storage.idp.CILSQLIdentityProviderStore
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Store<IdentityProvider>
,edu.uiuc.ncsa.security.storage.MonitoredStoreInterface<IdentityProvider>
,Map<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>
,IdentityProviderStore
public class CILSQLIdentityProviderStore extends edu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider> implements IdentityProviderStore
Created by Jeff Gaynor
on Apr 10, 2010 at 10:04:49 AM
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_TABLENAME
-
Constructor Summary
Constructors Constructor Description CILSQLIdentityProviderStore(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<IdentityProvider> idp, IDPConverter converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Collection<? extends IdentityProvider> idps)
Adds a list of identity providers.void
add(IdentityProvider idp)
Add an identity provider, using the unique id as the keyIdentityProvider
get(Object key)
String
getCreationTSField()
IdentityProvidersTable
getIdpTable()
List<IdentityProvider>
getMostRecent(int n, List<String> attributes)
boolean
hasIdp(String idp)
Check if there is an entry for the given unique id.void
putAll(Map<? extends edu.uiuc.ncsa.security.core.Identifier,? extends IdentityProvider> m)
void
replaceAll(Collection<IdentityProvider> idps)
Completely replace every idp-
Methods inherited from class edu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore
addLastAccessedEventListener, doUpkeep, doUpkeep, fireLastAccessedEvent, gatherStats, getKeys, getLastAccessedEventListeners, getUpkeepConfiguration, getUuid, hasUpkeepConfiguration, isMonitorEnabled, lastAccessUpdate, setMonitorEnabled, setUpkeepConfiguration, updateHook
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLStore
checkColumns, checkTable, clear, containsKey, containsValue, crappySQLParser, crappySQLParser, create, depopulate, doRegisterStatement, entrySet, getAll, getDerbyMostRecent, getMapConverter, getMostRecentStatement, getTable, getXMLConverter, isEmpty, keySet, populate, put, register, remove, remove, save, search, search, search, setUpdateValues, size, size, size, toString, update, 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, getOrDefault, hashCode, isEmpty, keySet, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
DEFAULT_TABLENAME
public static final String DEFAULT_TABLENAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CILSQLIdentityProviderStore
public CILSQLIdentityProviderStore(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<IdentityProvider> idp, IDPConverter converter)
-
-
Method Detail
-
replaceAll
public void replaceAll(Collection<IdentityProvider> idps)
Completely replace every idp- Specified by:
replaceAll
in interfaceIdentityProviderStore
- Parameters:
idps
-
-
get
public IdentityProvider get(Object key)
- Specified by:
get
in interfaceMap<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>
- Overrides:
get
in classedu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider>
-
getIdpTable
public IdentityProvidersTable getIdpTable()
-
hasIdp
public boolean hasIdp(String idp)
Description copied from interface:IdentityProviderStore
Check if there is an entry for the given unique id.- Specified by:
hasIdp
in interfaceIdentityProviderStore
- Returns:
-
putAll
public void putAll(Map<? extends edu.uiuc.ncsa.security.core.Identifier,? extends IdentityProvider> m)
- Specified by:
putAll
in interfaceMap<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>
- Overrides:
putAll
in classedu.uiuc.ncsa.security.storage.sql.SQLStore<IdentityProvider>
-
add
public void add(IdentityProvider idp)
Description copied from interface:IdentityProviderStore
Add an identity provider, using the unique id as the key- Specified by:
add
in interfaceIdentityProviderStore
-
add
public void add(Collection<? extends IdentityProvider> idps) throws CILogonException
Description copied from interface:IdentityProviderStore
Adds a list of identity providers. Note: Change to contract. Previously this was to fail if any of the idps were already in the store. The problem is that if a list of these was sent that had fewer idps than previously, (such as due to some error in a non-Java component) then the list of IDPs might be damaged. Therefore, now this should add any idps not already in the store, and ignore any that are there already.- Specified by:
add
in interfaceIdentityProviderStore
- Throws:
CILogonException
-
getMostRecent
public List<IdentityProvider> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecent
in interfaceedu.uiuc.ncsa.security.core.Store<IdentityProvider>
- Overrides:
getMostRecent
in classedu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider>
-
getCreationTSField
public String getCreationTSField()
- Specified by:
getCreationTSField
in classedu.uiuc.ncsa.security.storage.sql.SQLStore<IdentityProvider>
-
-