public interface TokenCache
Modifier and Type | Method and Description |
---|---|
boolean |
existsTokenFor(java.lang.String shopId)
Determines whether or not an token for the passed shop
identifier exists within the cache.
|
java.lang.String |
get(java.lang.String shopId)
Returns the access token for the shop with
the passed identifier.
|
void |
put(java.lang.String shopId,
java.lang.String accessToken)
Stores the passed access token in the cache mapped by the
specified shop identifier.
|
boolean existsTokenFor(java.lang.String shopId)
Identifier
- of the shop.java.lang.String get(java.lang.String shopId) throws javax.persistence.EntityNotFoundException
Identifier
- of the shop to retrieve a access token for.javax.persistence.EntityNotFoundException
- in case no access token was found.void put(java.lang.String shopId, java.lang.String accessToken) throws javax.persistence.PersistenceException
Identifier
- of the shop belonging to the access token to store.Access
- token to store.javax.persistence.PersistenceException
- in case an error occurred while
trying to store to the cache.