com.atlassian.jira.oauth.serviceprovider
Class CachingServiceProviderConsumerStore
java.lang.Object
com.atlassian.jira.oauth.serviceprovider.CachingServiceProviderConsumerStore
- All Implemented Interfaces:
- com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
public class CachingServiceProviderConsumerStore
- extends Object
- implements com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Caching Consumer Store, responsible for providing Consumers added by administrators in the Admin section. This list
will most likely not be very large since consumers are manually added by administrators.
Need to provide a cache however since lookups of a single consumer have to be fast, since everytime and OAUTH request
comes in, we need to check if the consumer for this request has been added by an admin.
- Since:
- v4.0
Constructor Summary |
CachingServiceProviderConsumerStore(com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachingServiceProviderConsumerStore
public CachingServiceProviderConsumerStore(com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
clearCaches
@EventListener
public void clearCaches(ClearCacheEvent event)
put
public void put(com.atlassian.oauth.Consumer consumer)
throws com.atlassian.oauth.serviceprovider.StoreException
- Specified by:
put
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
- Throws:
com.atlassian.oauth.serviceprovider.StoreException
get
public com.atlassian.oauth.Consumer get(String key)
throws com.atlassian.oauth.serviceprovider.StoreException
- Specified by:
get
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
- Throws:
com.atlassian.oauth.serviceprovider.StoreException
getAll
public Iterable<com.atlassian.oauth.Consumer> getAll()
throws com.atlassian.oauth.serviceprovider.StoreException
- Specified by:
getAll
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
- Throws:
com.atlassian.oauth.serviceprovider.StoreException
remove
public void remove(String key)
throws com.atlassian.oauth.serviceprovider.StoreException
- Specified by:
remove
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
- Throws:
com.atlassian.oauth.serviceprovider.StoreException
Copyright © 2002-2013 Atlassian. All Rights Reserved.