Class IDPFileStore
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.IndexedStreamStore<V>
-
- edu.uiuc.ncsa.security.storage.FileStore<V>
-
- edu.uiuc.ncsa.security.storage.monitored.MonitoredFileStore<IdentityProvider>
-
- org.cilogon.oauth2.servlet.storage.idp.IDPFileStore
-
- 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 IDPFileStore extends edu.uiuc.ncsa.security.storage.monitored.MonitoredFileStore<IdentityProvider> implements IdentityProviderStore
Created by Jeff Gaynor
on 3/8/12 at 5:17 PM
-
-
Constructor Summary
Constructors Constructor Description IDPFileStore(File file, edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> idpp, IDPConverter converter, boolean removeEmptyFiles, boolean removeFailedFiles)
IDPFileStore(File storeDirectory, File indexDirectory, edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> idpp, edu.uiuc.ncsa.security.storage.data.MapConverter converter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
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 keyList<IdentityProvider>
getMostRecent(int n, List<String> attributes)
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.MonitoredFileStore
addLastAccessedEventListener, doUpkeep, doUpkeep, fireLastAccessedEvent, get, getLastAccessedEventListeners, getUpkeepConfiguration, getUuid, hasUpkeepConfiguration, isMonitorEnabled, lastAccessUpdate, setMonitorEnabled, setUpkeepConfiguration, updateHook
-
Methods inherited from class edu.uiuc.ncsa.security.storage.FileStore
checkPermissions, clear, containsKey, containsValue, create, createIndexEntry, delete, doSetup, entrySet, getAll, getIndexDirectory, getIndexEntry, getItemFile, getItemFile, getMapConverter, getStorageDirectory, getXMLConverter, keySet, loadByIdentifier, loadFile, loadFromIndex, putAll, realRemove, realSave, register, remove, remove, removeIndexEntry, save, search, search, search, setIndexDirectory, setStorageDirectory, size, size, toString, update, values
-
Methods inherited from class edu.uiuc.ncsa.security.storage.IndexedStreamStore
createIndexEntry, getCreatedItems, hashString, isEmpty, loadStream, put, put
-
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
-
-
-
-
Constructor Detail
-
IDPFileStore
public IDPFileStore(File file, edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> idpp, IDPConverter converter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
IDPFileStore
public IDPFileStore(File storeDirectory, File indexDirectory, edu.uiuc.ncsa.security.core.IdentifiableProvider<IdentityProvider> idpp, edu.uiuc.ncsa.security.storage.data.MapConverter converter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
-
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:
-
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.MonitoredFileStore<IdentityProvider>
-
-