Class OA2FSTStore<V extends OA2ServiceTransaction>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.IndexedStreamStore<V>
-
- edu.uiuc.ncsa.security.storage.FileStore<V>
-
- org.oa4mp.delegation.common.storage.transactions.FSTransactionStore<V>
-
- org.oa4mp.server.api.admin.transactions.DSFSTransactionStore<V>
-
- org.oa4mp.server.loader.oauth2.storage.transactions.OA2FSTStore<V>
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Store<V>,Map<edu.uiuc.ncsa.security.core.Identifier,V>,TransactionStore<V>,RefreshTokenStore<V>,RFC8628Store<V>,OA2TStoreInterface<V>,UsernameFindable<V>
public class OA2FSTStore<V extends OA2ServiceTransaction> extends DSFSTransactionStore<V> implements OA2TStoreInterface<V>
Created by Jeff Gaynor
on 3/12/14 at 1:21 PM
-
-
Field Summary
-
Fields inherited from class org.oa4mp.delegation.common.storage.transactions.FSTransactionStore
tokenForge
-
Fields inherited from class edu.uiuc.ncsa.security.storage.FileStore
indexDirectory, storageDirectory
-
-
Constructor Summary
Constructors Constructor Description OA2FSTStore(File storeDirectory, File indexDirectory, edu.uiuc.ncsa.security.core.IdentifiableProvider<V> idp, TokenForge tokenForge, edu.uiuc.ncsa.security.storage.data.MapConverter<V> cp, boolean removeEmptyFiles, boolean removeFailedFiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.Identifier clientID)Vget(RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.Identifier clientID)Vget(RefreshToken refreshToken)List<edu.uiuc.ncsa.security.core.Identifier>getAllClientID()List<edu.uiuc.ncsa.security.core.Identifier>getByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)VgetByIDTokenID(edu.uiuc.ncsa.security.core.Identifier idTokenIdentifier)Get a transaction by its ID token identifier.VgetByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)VgetByUserCode(String userCode)List<V>getByUsername(String username)List<RFC8628State>getPending()protected StringgetSubIndexKey(String token, edu.uiuc.ncsa.security.core.Identifier clientID)TokenInfoRecordMapgetTokenInfo(String username)booleanhasUserCode(String userCode)VrealRemove(V thingie)voidrealSave(boolean checkExists, V t)-
Methods inherited from class org.oa4mp.server.api.admin.transactions.DSFSTransactionStore
getMostRecent
-
Methods inherited from class org.oa4mp.delegation.common.storage.transactions.FSTransactionStore
get, get, getMapConverter
-
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, getStorageDirectory, getXMLConverter, keySet, loadByIdentifier, loadFile, loadFromIndex, putAll, register, remove, remove, removeByID, removeIndexEntry, save, search, search, search, search, setIndexDirectory, setStorageDirectory, size, size, toString, update, 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
-
Methods inherited from interface edu.uiuc.ncsa.security.core.Store
create, getAll, getMostRecent, getXMLConverter, register, remove, removeByID, save, search, search, search, search, size, update, update
-
Methods inherited from interface org.oa4mp.delegation.common.storage.TransactionStore
get, get, getMapConverter
-
-
-
-
Constructor Detail
-
OA2FSTStore
public OA2FSTStore(File storeDirectory, File indexDirectory, edu.uiuc.ncsa.security.core.IdentifiableProvider<V> idp, TokenForge tokenForge, edu.uiuc.ncsa.security.storage.data.MapConverter<V> cp, boolean removeEmptyFiles, boolean removeFailedFiles)
-
-
Method Detail
-
get
public V get(RefreshToken refreshToken)
- Specified by:
getin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
getin interfaceRefreshTokenStore<V extends OA2ServiceTransaction>
-
get
public V get(AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.Identifier clientID)
- Specified by:
getin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
get
public V get(RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.Identifier clientID)
- Specified by:
getin interfaceRefreshTokenStore<V extends OA2ServiceTransaction>
-
getSubIndexKey
protected String getSubIndexKey(String token, edu.uiuc.ncsa.security.core.Identifier clientID)
-
realRemove
public V realRemove(V thingie)
- Overrides:
realRemovein classFSTransactionStore<V extends OA2ServiceTransaction>
-
realSave
public void realSave(boolean checkExists, V t)- Overrides:
realSavein classFSTransactionStore<V extends OA2ServiceTransaction>
-
getByUsername
public List<V> getByUsername(String username)
- Specified by:
getByUsernamein interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
getByUsernamein interfaceUsernameFindable<V extends OA2ServiceTransaction>
-
getTokenInfo
public TokenInfoRecordMap getTokenInfo(String username)
- Specified by:
getTokenInfoin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
getPending
public List<RFC8628State> getPending()
- Specified by:
getPendingin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
getPendingin interfaceRFC8628Store<V extends OA2ServiceTransaction>
-
getByUserCode
public V getByUserCode(String userCode)
- Specified by:
getByUserCodein interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
getByUserCodein interfaceRFC8628Store<V extends OA2ServiceTransaction>
-
getByClientID
public List<edu.uiuc.ncsa.security.core.Identifier> getByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)
- Specified by:
getByClientIDin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
getAllClientID
public List<edu.uiuc.ncsa.security.core.Identifier> getAllClientID()
- Specified by:
getAllClientIDin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
getByProxyID
public V getByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)
- Specified by:
getByProxyIDin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
getByProxyIDin interfaceTransactionStore<V extends OA2ServiceTransaction>- Overrides:
getByProxyIDin classDSFSTransactionStore<V extends OA2ServiceTransaction>
-
getByIDTokenID
public V getByIDTokenID(edu.uiuc.ncsa.security.core.Identifier idTokenIdentifier)
Description copied from interface:OA2TStoreInterfaceGet a transaction by its ID token identifier. Note that to get the token itself, you must useOA2ServiceTransaction.getUserMetaData().- Specified by:
getByIDTokenIDin interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Returns:
-
hasUserCode
public boolean hasUserCode(String userCode)
- Specified by:
hasUserCodein interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>- Specified by:
hasUserCodein interfaceRFC8628Store<V extends OA2ServiceTransaction>
-
-