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 StringDEFAULT_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 voidadd(Collection<? extends IdentityProvider> idps)Adds a list of identity providers.voidadd(IdentityProvider idp)Add an identity provider, using the unique id as the keyIdentityProviderget(Object key)StringgetCreationTSField()IdentityProvidersTablegetIdpTable()List<IdentityProvider>getMostRecent(int n, List<String> attributes)booleanhasIdp(String idp)Check if there is an entry for the given unique id.voidputAll(Map<? extends edu.uiuc.ncsa.security.core.Identifier,? extends IdentityProvider> m)voidreplaceAll(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, removeByID, save, search, search, search, search, setUpdateValues, size, size, size, toString, update, 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:
replaceAllin interfaceIdentityProviderStore- Parameters:
idps-
-
get
public IdentityProvider get(Object key)
- Specified by:
getin interfaceMap<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>- Overrides:
getin classedu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider>
-
getIdpTable
public IdentityProvidersTable getIdpTable()
-
hasIdp
public boolean hasIdp(String idp)
Description copied from interface:IdentityProviderStoreCheck if there is an entry for the given unique id.- Specified by:
hasIdpin interfaceIdentityProviderStore- Returns:
-
putAll
public void putAll(Map<? extends edu.uiuc.ncsa.security.core.Identifier,? extends IdentityProvider> m)
- Specified by:
putAllin interfaceMap<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>- Overrides:
putAllin classedu.uiuc.ncsa.security.storage.sql.SQLStore<IdentityProvider>
-
add
public void add(IdentityProvider idp)
Description copied from interface:IdentityProviderStoreAdd an identity provider, using the unique id as the key- Specified by:
addin interfaceIdentityProviderStore
-
add
public void add(Collection<? extends IdentityProvider> idps) throws CILogonException
Description copied from interface:IdentityProviderStoreAdds 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:
addin interfaceIdentityProviderStore- Throws:
CILogonException
-
getMostRecent
public List<IdentityProvider> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecentin interfaceedu.uiuc.ncsa.security.core.Store<IdentityProvider>- Overrides:
getMostRecentin classedu.uiuc.ncsa.security.storage.monitored.MonitoredSQLStore<IdentityProvider>
-
getCreationTSField
public String getCreationTSField()
- Specified by:
getCreationTSFieldin classedu.uiuc.ncsa.security.storage.sql.SQLStore<IdentityProvider>
-
-