public class RefreshTokenServiceImpl extends java.lang.Object implements RefreshTokenService
Modifier and Type | Field and Description |
---|---|
private ShopRepository |
repository |
Constructor and Description |
---|
RefreshTokenServiceImpl(javax.inject.Provider<ShopRepository> shopProvider) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getByShopId(java.lang.String shopId)
Gets a refresh token for the passed shop id from
the database.
|
private ShopEntity |
getOrCreateShopEntity(java.lang.String shopId) |
void |
save(java.lang.String shopId,
java.lang.String refreshToken)
Stores the given refresh token to the database
mapped to the passed shop id.
|
private void |
saveShopEntity(ShopEntity entity) |
private ShopRepository repository
@Inject public RefreshTokenServiceImpl(javax.inject.Provider<ShopRepository> shopProvider)
public void save(java.lang.String shopId, java.lang.String refreshToken) throws javax.persistence.PersistenceException
RefreshTokenService
save
in interface RefreshTokenService
javax.persistence.PersistenceException
- in case an error occurred
while saving the data.public java.lang.String getByShopId(java.lang.String shopId)
RefreshTokenService
getByShopId
in interface RefreshTokenService
private void saveShopEntity(ShopEntity entity) throws javax.persistence.PersistenceException
javax.persistence.PersistenceException
private ShopEntity getOrCreateShopEntity(java.lang.String shopId) throws javax.persistence.PersistenceException
javax.persistence.PersistenceException