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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@NotNull Date
@Nullable Integer
@NotNull String
@NotNull String
getName()
@NotNull Set<AccessTokenPermission>
int
Get token permissions as mask.@NotNull String
@NotNull String
int
hashCode()
void
setCreationDate
(Date creationDate) Set creation datevoid
setDaysUntilExpiry
(@Nullable Integer daysUntilExpiry) Set number of days until the token expires since its creation datevoid
setHashedToken
(@NotNull String hashedToken) Set hashed token valuevoid
Set token namevoid
setPermissions
(@NotNull Iterable<AccessTokenPermission> permissions) Set token permissionsvoid
setPermissionsMask
(int permissionsMask) Set token permissions as mask.void
setTokenId
(@NotNull String tokenId) Set token unique idvoid
setUserName
(@NotNull String userName) Set token ownerMethods inherited from class com.atlassian.bamboo.hibernate.HibernateEntityObject
getId, setId
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCurrentDate, getLastModificationDate, setClock, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
MutableAccessTokenImpl
public MutableAccessTokenImpl()
-
-
Method Details
-
getHashedToken
- Specified by:
getHashedToken
in interfaceMutableAccessToken
- Returns:
- Hashed token value
-
setHashedToken
Description copied from interface:MutableAccessToken
Set hashed token value- Specified by:
setHashedToken
in interfaceMutableAccessToken
-
getTokenId
- Specified by:
getTokenId
in interfaceAccessToken
- Returns:
- unique token id
-
setTokenId
Description copied from interface:MutableAccessToken
Set token unique id- Specified by:
setTokenId
in interfaceMutableAccessToken
-
getName
- Specified by:
getName
in interfaceAccessToken
- Returns:
- name of the token
-
setName
Description copied from interface:MutableAccessToken
Set token name- Specified by:
setName
in interfaceMutableAccessToken
-
getUserName
- Specified by:
getUserName
in interfaceAccessToken
- Returns:
- token owner user name
-
setUserName
Description copied from interface:MutableAccessToken
Set token owner- Specified by:
setUserName
in interfaceMutableAccessToken
-
getCreationDate
- Specified by:
getCreationDate
in interfaceAccessToken
- Overrides:
getCreationDate
in classcom.atlassian.core.bean.EntityObject
- Returns:
- token creation date
-
setCreationDate
Description copied from interface:MutableAccessToken
Set creation date- Specified by:
setCreationDate
in interfaceMutableAccessToken
- Overrides:
setCreationDate
in classcom.atlassian.core.bean.EntityObject
-
setPermissions
Description copied from interface:MutableAccessToken
Set token permissions- Specified by:
setPermissions
in interfaceMutableAccessToken
-
getPermissions
- Specified by:
getPermissions
in interfaceAccessToken
- Returns:
- permissions granted to this token
-
getPermissionsMask
public int getPermissionsMask()Description copied from interface:MutableAccessToken
Get token permissions as mask.- Specified by:
getPermissionsMask
in interfaceMutableAccessToken
-
setPermissionsMask
public void setPermissionsMask(int permissionsMask) Description copied from interface:MutableAccessToken
Set token permissions as mask.- Specified by:
setPermissionsMask
in interfaceMutableAccessToken
-
getDaysUntilExpiry
- Specified by:
getDaysUntilExpiry
in interfaceAccessToken
- Returns:
- number of days until the token expires since its creation date
-
setDaysUntilExpiry
Description copied from interface:MutableAccessToken
Set number of days until the token expires since its creation date- Specified by:
setDaysUntilExpiry
in interfaceMutableAccessToken
-
toAccessToken
- Specified by:
toAccessToken
in interfaceAccessToken
- Returns:
- safe version of access token without authentication token itself
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-