Class ApiTokenDataModel
java.lang.Object
com.gentics.contentnode.rest.model.token.ApiTokenDataModel
- All Implemented Interfaces:
Serializable
Model for an API Token
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetCdate()Creation dateintExpiry dateintgetId()ID of the tokenintDate of the last usagegetName()Token nameintUser IDinthashCode()booleanisValid()True when the token is still valid (not expired), false when the token is expiredsetCdate(int cdate) Set the creation datesetExpires(int expires) Set the expiry datesetId(int id) Set the IDsetLastUsed(int lastUsed) Set the last usage dateSet the namesetUserId(int userId) Set the user IDsetValid(boolean valid) Set the "valid" flagtoString()
-
Constructor Details
-
ApiTokenDataModel
public ApiTokenDataModel()
-
-
Method Details
-
getId
public int getId()ID of the token- Returns:
- ID
-
setId
Set the ID- Parameters:
id- ID- Returns:
- fluent API
-
getUserId
public int getUserId()User ID- Returns:
- user Id
-
setUserId
Set the user ID- Parameters:
userId- user ID- Returns:
- fluent API
-
getName
Token name- Returns:
- name
-
setName
Set the name- Parameters:
name- name- Returns:
- fluent API
-
getCdate
public int getCdate()Creation date- Returns:
- creation date
-
setCdate
Set the creation date- Parameters:
cdate- creation date- Returns:
- fluent API
-
getExpires
public int getExpires()Expiry date- Returns:
- expiry date
-
setExpires
Set the expiry date- Parameters:
expires- expiry date- Returns:
- fluent API
-
getLastUsed
public int getLastUsed()Date of the last usage- Returns:
- last usage date
-
setLastUsed
Set the last usage date- Parameters:
lastUsed- date- Returns:
- fluent API
-
isValid
public boolean isValid()True when the token is still valid (not expired), false when the token is expired- Returns:
- flag
-
setValid
Set the "valid" flag- Parameters:
valid- flag- Returns:
- fluent API
-
hashCode
public int hashCode() -
equals
-
toString
-