Package com.atlassian.bamboo.agent
Class PerAgentTokenHibernateDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<PerAgentToken>
-
- com.atlassian.bamboo.agent.PerAgentTokenHibernateDao
-
- All Implemented Interfaces:
PerAgentTokenDao
,BambooObjectDao<PerAgentToken>
,org.springframework.beans.factory.InitializingBean
public class PerAgentTokenHibernateDao extends BambooHibernateObjectDao<PerAgentToken> implements PerAgentTokenDao
-
-
Constructor Summary
Constructors Constructor Description PerAgentTokenHibernateDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(@NotNull String resultKey, @NotNull Timestamp dueTimestamp)
Deletes all tokens for a given result key created before the passed timestamp.boolean
isValid(@NotNull String resultKey, @NotNull String token)
Checks if token is valid for a given result key.boolean
isValidForAnyResultKey(@NotNull String token)
Checks if token is valid for any result key.void
save(@NotNull String resultKey, @NotNull String token)
Saves token for a given result key.-
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
save
public void save(@NotNull @NotNull String resultKey, @NotNull @NotNull String token)
Description copied from interface:PerAgentTokenDao
Saves token for a given result key.- Specified by:
save
in interfacePerAgentTokenDao
- Parameters:
resultKey
- result keytoken
- token
-
isValid
public boolean isValid(@NotNull @NotNull String resultKey, @NotNull @NotNull String token)
Description copied from interface:PerAgentTokenDao
Checks if token is valid for a given result key.- Specified by:
isValid
in interfacePerAgentTokenDao
- Parameters:
resultKey
- result keytoken
- token- Returns:
- true if token is valid, false otherwise
-
isValidForAnyResultKey
public boolean isValidForAnyResultKey(@NotNull @NotNull String token)
Description copied from interface:PerAgentTokenDao
Checks if token is valid for any result key.- Specified by:
isValidForAnyResultKey
in interfacePerAgentTokenDao
- Parameters:
token
- token- Returns:
- true if token is valid, false otherwise
-
delete
public void delete(@NotNull @NotNull String resultKey, @NotNull @NotNull Timestamp dueTimestamp)
Description copied from interface:PerAgentTokenDao
Deletes all tokens for a given result key created before the passed timestamp.- Specified by:
delete
in interfacePerAgentTokenDao
- Parameters:
resultKey
- result keydueTimestamp
- due timestamp
-
-