Package com.atlassian.bamboo.accesstoken
Class MutableAccessTokenImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.hibernate.HibernateEntityObject
com.atlassian.bamboo.accesstoken.MutableAccessTokenImpl
- All Implemented Interfaces:
AccessToken,MutableAccessToken,BambooIdProvider,BambooObject,Cloneable
@Entity
public class MutableAccessTokenImpl
extends HibernateEntityObject
implements MutableAccessToken
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@NotNull Date@Nullable Integer@NotNull String@NotNull StringgetName()@NotNull Set<AccessTokenPermission>intGet token permissions as mask.@NotNull String@NotNull StringinthashCode()voidsetCreationDate(Date creationDate) Set creation datevoidsetDaysUntilExpiry(@Nullable Integer daysUntilExpiry) Set number of days until the token expires since its creation datevoidsetHashedToken(@NotNull String hashedToken) Set hashed token valuevoidSet token namevoidsetPermissions(@NotNull Iterable<AccessTokenPermission> permissions) Set token permissionsvoidsetPermissionsMask(int permissionsMask) Set token permissions as mask.voidsetTokenId(@NotNull String tokenId) Set token unique idvoidsetUserName(@NotNull String userName) Set token ownerMethods inherited from class com.atlassian.bamboo.hibernate.HibernateEntityObject
getId, setIdMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCurrentDate, getLastModificationDate, setClock, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
MutableAccessTokenImpl
public MutableAccessTokenImpl()
-
-
Method Details
-
getHashedToken
- Specified by:
getHashedTokenin interfaceMutableAccessToken- Returns:
- Hashed token value
-
setHashedToken
Description copied from interface:MutableAccessTokenSet hashed token value- Specified by:
setHashedTokenin interfaceMutableAccessToken
-
getTokenId
- Specified by:
getTokenIdin interfaceAccessToken- Returns:
- unique token id
-
setTokenId
Description copied from interface:MutableAccessTokenSet token unique id- Specified by:
setTokenIdin interfaceMutableAccessToken
-
getName
- Specified by:
getNamein interfaceAccessToken- Returns:
- name of the token
-
setName
Description copied from interface:MutableAccessTokenSet token name- Specified by:
setNamein interfaceMutableAccessToken
-
getUserName
- Specified by:
getUserNamein interfaceAccessToken- Returns:
- token owner user name
-
setUserName
Description copied from interface:MutableAccessTokenSet token owner- Specified by:
setUserNamein interfaceMutableAccessToken
-
getCreationDate
- Specified by:
getCreationDatein interfaceAccessToken- Overrides:
getCreationDatein classcom.atlassian.core.bean.EntityObject- Returns:
- token creation date
-
setCreationDate
Description copied from interface:MutableAccessTokenSet creation date- Specified by:
setCreationDatein interfaceMutableAccessToken- Overrides:
setCreationDatein classcom.atlassian.core.bean.EntityObject
-
setPermissions
Description copied from interface:MutableAccessTokenSet token permissions- Specified by:
setPermissionsin interfaceMutableAccessToken
-
getPermissions
- Specified by:
getPermissionsin interfaceAccessToken- Returns:
- permissions granted to this token
-
getPermissionsMask
public int getPermissionsMask()Description copied from interface:MutableAccessTokenGet token permissions as mask.- Specified by:
getPermissionsMaskin interfaceMutableAccessToken
-
setPermissionsMask
public void setPermissionsMask(int permissionsMask) Description copied from interface:MutableAccessTokenSet token permissions as mask.- Specified by:
setPermissionsMaskin interfaceMutableAccessToken
-
getDaysUntilExpiry
- Specified by:
getDaysUntilExpiryin interfaceAccessToken- Returns:
- number of days until the token expires since its creation date
-
setDaysUntilExpiry
Description copied from interface:MutableAccessTokenSet number of days until the token expires since its creation date- Specified by:
setDaysUntilExpiryin interfaceMutableAccessToken
-
toAccessToken
- Specified by:
toAccessTokenin interfaceAccessToken- Returns:
- safe version of access token without authentication token itself
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-