Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage;
 

Created by Jeff Gaynor
on 3/25/14 at 12:51 PM

public class OA2MTStore<V extends OA2ServiceTransactionextends TransactionMemoryStore<V> implements RefreshTokenStore<V>{
    public OA2MTStore(IdentifiableProvider identifiableProvider) {
        super(identifiableProvider);
    }
    public TokenIndex getRTIndex() {
        if ( == null) {
             = new TokenIndex();
        }
        return ;
    }
    @Override
    protected void updateIndices(V v) {
        super.updateIndices(v);
        if (v.getRefreshToken() != null) {
                   getRTIndex().put(v.getRefreshToken().getToken(), v);
               }
    }
    @Override
    protected void removeItem(V value) {
        super.removeItem(value);
        getRTIndex().remove(value.getRefreshToken());
    }
    @Override
    public OA2ServiceTransaction get(RefreshToken refreshToken) {
        return getRTIndex().get(refreshToken.getToken());
    }
New to GrepCode? Check out our FAQ X