Class CILFSArchivedUserStore
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.IndexedStreamStore<V>
-
- edu.uiuc.ncsa.security.storage.FileStore<ArchivedUser>
-
- org.cilogon.oauth2.servlet.storage.archiveUser.CILFSArchivedUserStore
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Store<ArchivedUser>
,Map<edu.uiuc.ncsa.security.core.Identifier,ArchivedUser>
,ArchivedUserStore
public class CILFSArchivedUserStore extends edu.uiuc.ncsa.security.storage.FileStore<ArchivedUser> implements ArchivedUserStore
This actually creates and manages a store of old users that are recorded in a specific data structure. The reason is that we must be able to look up old users by their ID, of which there may be many. So we get lists of archived user entries which are are only distinguishable by their archive date.Created by Jeff Gaynor
on 3/9/12 at 11:18 AM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CILFSArchivedUserStore.AUEntry
protected static class
CILFSArchivedUserStore.AUEntryFileStore
-
Constructor Summary
Constructors Constructor Description CILFSArchivedUserStore(File dataPath, File indexPath, UserStore userStore, edu.uiuc.ncsa.security.core.util.IdentifiableProviderImpl<ArchivedUser> aup, edu.uiuc.ncsa.security.storage.data.MapConverter archivedUserMapConverter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description edu.uiuc.ncsa.security.core.Identifier
archiveUser(edu.uiuc.ncsa.security.core.Identifier userId)
Add a User to the archive.List<ArchivedUser>
getAllByUserId(edu.uiuc.ncsa.security.core.Identifier userId)
Get the list of all archived users for a given user (as opposed to archive) id.ArchivedUser
getLastArchivedUser(edu.uiuc.ncsa.security.core.Identifier userid)
Convenience method.List<ArchivedUser>
getMostRecent(int n, List<String> attributes)
-
Methods inherited from class edu.uiuc.ncsa.security.storage.FileStore
checkPermissions, clear, containsKey, containsValue, create, createIndexEntry, delete, doSetup, entrySet, get, 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
-
CILFSArchivedUserStore
public CILFSArchivedUserStore(File dataPath, File indexPath, UserStore userStore, edu.uiuc.ncsa.security.core.util.IdentifiableProviderImpl<ArchivedUser> aup, edu.uiuc.ncsa.security.storage.data.MapConverter archivedUserMapConverter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
-
Method Detail
-
archiveUser
public edu.uiuc.ncsa.security.core.Identifier archiveUser(edu.uiuc.ncsa.security.core.Identifier userId)
Description copied from interface:ArchivedUserStore
Add a User to the archive. This takes the current user as stored (so save any updates before invoking). Returns the id of the archived user entry.- Specified by:
archiveUser
in interfaceArchivedUserStore
-
getAllByUserId
public List<ArchivedUser> getAllByUserId(edu.uiuc.ncsa.security.core.Identifier userId)
Description copied from interface:ArchivedUserStore
Get the list of all archived users for a given user (as opposed to archive) id. This always returns a list sorted by archive date.- Specified by:
getAllByUserId
in interfaceArchivedUserStore
- Returns:
-
getLastArchivedUser
public ArchivedUser getLastArchivedUser(edu.uiuc.ncsa.security.core.Identifier userid)
Description copied from interface:ArchivedUserStore
Convenience method. Return the most recently archived user for this id or a null if there is no such user.- Specified by:
getLastArchivedUser
in interfaceArchivedUserStore
- Returns:
-
getMostRecent
public List<ArchivedUser> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecent
in interfaceedu.uiuc.ncsa.security.core.Store<ArchivedUser>
-
-