Class MemoryIDPStore
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<edu.uiuc.ncsa.security.core.Identifier,V>
-
- edu.uiuc.ncsa.security.storage.MemoryStore<V>
-
- edu.uiuc.ncsa.security.storage.monitored.MonitoredMemoryStore<IdentityProvider>
-
- org.cilogon.oauth2.servlet.storage.idp.MemoryIDPStore
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Store<IdentityProvider>
,edu.uiuc.ncsa.security.storage.MonitoredStoreInterface<IdentityProvider>
,Serializable
,Cloneable
,Map<edu.uiuc.ncsa.security.core.Identifier,IdentityProvider>
,IdentityProviderStore
public class MemoryIDPStore extends edu.uiuc.ncsa.security.storage.monitored.MonitoredMemoryStore<IdentityProvider> implements IdentityProviderStore
Created by Jeff Gaynor
on 3/13/12 at 2:34 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
edu.uiuc.ncsa.security.storage.MemoryStore.MSInitializer
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description MemoryIDPStore(edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> identityProviderIdentifiableProvider)
-
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 keyedu.uiuc.ncsa.security.storage.data.MapConverter
getMapConverter()
List<IdentityProvider>
getMostRecent(int n, List<String> attributes)
edu.uiuc.ncsa.security.core.XMLConverter<IdentityProvider>
getXMLConverter()
boolean
hasIdp(String idp)
Check if there is an entry for the given unique id.void
replaceAll(Collection<IdentityProvider> idps)
Replace every entry in the store by the ones in the list.-
Methods inherited from class edu.uiuc.ncsa.security.storage.monitored.MonitoredMemoryStore
addLastAccessedEventListener, doUpkeep, doUpkeep, fireLastAccessedEvent, get, getLastAccessedEventListeners, getUpkeepConfiguration, getUuid, hasUpkeepConfiguration, isMonitorEnabled, lastAccessUpdate, setMonitorEnabled, setUpkeepConfiguration, updateHook
-
Methods inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
create, getAll, getInitializer, realSave, register, remove, save, search, search, search, size, update
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, 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
-
-
-
-
Constructor Detail
-
MemoryIDPStore
public MemoryIDPStore(edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> identityProviderIdentifiableProvider)
-
-
Method Detail
-
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
-
replaceAll
public void replaceAll(Collection<IdentityProvider> idps)
Description copied from interface:IdentityProviderStore
Replace every entry in the store by the ones in the list. At the end of this operation, the store will be identical to the given list.- Specified by:
replaceAll
in interfaceIdentityProviderStore
-
add
public void add(Collection<? extends IdentityProvider> idps)
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
-
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:
-
getMapConverter
public edu.uiuc.ncsa.security.storage.data.MapConverter getMapConverter()
- Overrides:
getMapConverter
in classedu.uiuc.ncsa.security.storage.MemoryStore<IdentityProvider>
-
getXMLConverter
public edu.uiuc.ncsa.security.core.XMLConverter<IdentityProvider> getXMLConverter()
- Specified by:
getXMLConverter
in interfaceedu.uiuc.ncsa.security.core.Store<IdentityProvider>
- Overrides:
getXMLConverter
in classedu.uiuc.ncsa.security.storage.monitored.MonitoredMemoryStore<IdentityProvider>
-
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.MonitoredMemoryStore<IdentityProvider>
-
-