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 Constructor Description MutableAccessTokenImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@NotNull DategetCreationDate()@NotNull StringgetHashedToken()@NotNull StringgetName()@NotNull Set<AccessTokenPermission>getPermissions()intgetPermissionsMask()Get token permissions as mask.@NotNull StringgetTokenId()@NotNull StringgetUserName()inthashCode()voidsetCreationDate(Date creationDate)Set creation datevoidsetHashedToken(@NotNull String hashedToken)Set hashed token valuevoidsetName(@NotNull String name)Set 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 ownerAccessTokentoAccessToken()-
Methods 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
-
-
-
-
Method Detail
-
getHashedToken
@NotNull public @NotNull String getHashedToken()
- Specified by:
getHashedTokenin interfaceMutableAccessToken- Returns:
- Hashed token value
-
setHashedToken
public void setHashedToken(@NotNull @NotNull String hashedToken)Description copied from interface:MutableAccessTokenSet hashed token value- Specified by:
setHashedTokenin interfaceMutableAccessToken
-
getTokenId
@NotNull public @NotNull String getTokenId()
- Specified by:
getTokenIdin interfaceAccessToken- Returns:
- unique token id
-
setTokenId
public void setTokenId(@NotNull @NotNull String tokenId)Description copied from interface:MutableAccessTokenSet token unique id- Specified by:
setTokenIdin interfaceMutableAccessToken
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getNamein interfaceAccessToken- Returns:
- name of the token
-
setName
public void setName(@NotNull @NotNull String name)Description copied from interface:MutableAccessTokenSet token name- Specified by:
setNamein interfaceMutableAccessToken
-
getUserName
@NotNull public @NotNull String getUserName()
- Specified by:
getUserNamein interfaceAccessToken- Returns:
- token owner user name
-
setUserName
public void setUserName(@NotNull @NotNull String userName)Description copied from interface:MutableAccessTokenSet token owner- Specified by:
setUserNamein interfaceMutableAccessToken
-
getCreationDate
@NotNull public @NotNull Date getCreationDate()
- Specified by:
getCreationDatein interfaceAccessToken- Overrides:
getCreationDatein classcom.atlassian.core.bean.EntityObject- Returns:
- token creation date
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:MutableAccessTokenSet creation date- Specified by:
setCreationDatein interfaceMutableAccessToken- Overrides:
setCreationDatein classcom.atlassian.core.bean.EntityObject
-
setPermissions
public void setPermissions(@NotNull @NotNull Iterable<AccessTokenPermission> permissions)Description copied from interface:MutableAccessTokenSet token permissions- Specified by:
setPermissionsin interfaceMutableAccessToken
-
getPermissions
@NotNull public @NotNull Set<AccessTokenPermission> 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
-
toAccessToken
public AccessToken toAccessToken()
- Specified by:
toAccessTokenin interfaceAccessToken- Returns:
- safe version of access token without authentication token itself
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
-