Class RemoteAPIToken
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.RemoteAPIToken
-
@Entity public class RemoteAPIToken extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RemoteAPIToken()
RemoteAPIToken(java.lang.String tokenString, RemoteAPI remoteApi, java.util.Date expiryDate)
RemoteAPIToken(java.lang.String tokenString, java.lang.String refreshToken, RemoteAPI remoteApi, java.util.Date expiryDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Equals method using remoteAPI and tokenStringjava.util.Date
getExpiryDate()
Get the date that this token expiresjava.lang.Long
getId()
java.lang.String
getRefreshToken()
RemoteAPI
getRemoteApi()
java.lang.String
getTokenString()
User
getUser()
int
hashCode()
Hashcode using remoteAPI and tokenStringboolean
isExpired()
Test if this token has expiredvoid
setExpiryDate(java.util.Date expiryDate)
Set the date that this token expiresvoid
setId(java.lang.Long id)
void
setRefreshToken(java.lang.String refreshToken)
void
setRemoteApi(RemoteAPI remoteApi)
void
setTokenString(java.lang.String tokenString)
void
setUser(User user)
java.lang.String
toString()
-
-
-
Constructor Detail
-
RemoteAPIToken
public RemoteAPIToken()
-
RemoteAPIToken
public RemoteAPIToken(java.lang.String tokenString, RemoteAPI remoteApi, java.util.Date expiryDate)
-
RemoteAPIToken
public RemoteAPIToken(java.lang.String tokenString, java.lang.String refreshToken, RemoteAPI remoteApi, java.util.Date expiryDate)
-
-
Method Detail
-
getId
public java.lang.Long getId()
- Returns:
- the id
-
setId
public void setId(java.lang.Long id)
- Parameters:
id
- the id to set
-
getTokenString
public java.lang.String getTokenString()
- Returns:
- the tokenString
-
setTokenString
public void setTokenString(java.lang.String tokenString)
- Parameters:
tokenString
- the tokenString to set
-
getRemoteApi
public RemoteAPI getRemoteApi()
- Returns:
- the remoteApi
-
setRemoteApi
public void setRemoteApi(RemoteAPI remoteApi)
- Parameters:
remoteApi
- the remoteApi to set
-
getUser
public User getUser()
- Returns:
- the user
-
setUser
public void setUser(User user)
- Parameters:
user
- the user to set
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getExpiryDate
public java.util.Date getExpiryDate()
Get the date that this token expires- Returns:
- the
Date
that this token expires.
-
setExpiryDate
public void setExpiryDate(java.util.Date expiryDate)
Set the date that this token expires- Parameters:
expiryDate
- theDate
that this token expires.
-
isExpired
public boolean isExpired()
Test if this token has expired- Returns:
- true if this token has expired
-
getRefreshToken
public java.lang.String getRefreshToken()
-
setRefreshToken
public void setRefreshToken(java.lang.String refreshToken)
-
hashCode
public int hashCode()
Hashcode using remoteAPI and tokenString- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
Equals method using remoteAPI and tokenString- Overrides:
equals
in classjava.lang.Object
-
-