Class PersistentServiceProviderConsumerStore
- java.lang.Object
 - 
- com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.AbstractPersistentStore<Consumer>
 - 
- com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.consumer.PersistentServiceProviderConsumerStore
 
 
 
- 
- All Implemented Interfaces:
 ServiceProviderConsumerStore,Saveable,OnMaster
@Singleton public class PersistentServiceProviderConsumerStore extends AbstractPersistentStore<Consumer> implements ServiceProviderConsumerStore
AServiceProviderConsumerStoreimplementation that persists theconsumersto an XML fileOnly one instance of this class must be created per Jenkins instance.
 
- 
- 
Field Summary
- 
Fields inherited from class com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.AbstractPersistentStore
entityMap, xStream 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PersistentServiceProviderConsumerStore() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Consumer consumer)Add the consumer to the store.voiddelete(String key)Deletes a consumer whosekeyis equal to the givenkeyOptional<Consumer>get(String key)Iterable<Consumer>getAll()Retrieve all theconsumersfrom the store.protected Class<Consumer>getEntityClass()protected StringgetStoreEntryName()protected StringgetStoreKeyName()protected StringgetStoreValueName()voidupdate(Consumer consumer)Updates an existing consumer.- 
Methods inherited from class com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.AbstractPersistentStore
decrypt, encrypt, getConfigFile, load, save 
 - 
 
 - 
 
- 
- 
Method Detail
- 
add
public void add(Consumer consumer)
Description copied from interface:ServiceProviderConsumerStoreAdd the consumer to the store.- Specified by:
 addin interfaceServiceProviderConsumerStore- Parameters:
 consumer- theconsumerto be added, cannot be null
 
- 
get
public Optional<Consumer> get(String key)
Description copied from interface:ServiceProviderConsumerStoreRetrieve aconsumerfrom the store whosekeyattribute is equal to thekeyparameter, oremptyif such aconsumerdoesn't exist- Specified by:
 getin interfaceServiceProviderConsumerStore- Parameters:
 key- theconsumer key- Returns:
 Consumerwhosekeyis equal to the givenkey, oremptyif such aconsumerdoesn't exist
 
- 
getAll
public Iterable<Consumer> getAll()
Description copied from interface:ServiceProviderConsumerStoreRetrieve all theconsumersfrom the store.- Specified by:
 getAllin interfaceServiceProviderConsumerStore- Returns:
 - all the 
consumersfrom the store 
 
- 
delete
public void delete(String key)
Description copied from interface:ServiceProviderConsumerStoreDeletes a consumer whosekeyis equal to the givenkey- Specified by:
 deletein interfaceServiceProviderConsumerStore- Parameters:
 key- thekeyof theconsumerto be deleted
 
- 
update
public void update(Consumer consumer)
Description copied from interface:ServiceProviderConsumerStoreUpdates an existing consumer.- Specified by:
 updatein interfaceServiceProviderConsumerStore- Parameters:
 consumer- the consumer to update
 
- 
getEntityClass
protected Class<Consumer> getEntityClass()
- Specified by:
 getEntityClassin classAbstractPersistentStore<Consumer>
 
- 
getStoreEntryName
protected String getStoreEntryName()
- Specified by:
 getStoreEntryNamein classAbstractPersistentStore<Consumer>
 
- 
getStoreKeyName
protected String getStoreKeyName()
- Specified by:
 getStoreKeyNamein classAbstractPersistentStore<Consumer>
 
- 
getStoreValueName
protected String getStoreValueName()
- Specified by:
 getStoreValueNamein classAbstractPersistentStore<Consumer>
 
 - 
 
 -