public class PreviewToken extends Object implements Serializable
Constructor and Description |
---|
PreviewToken() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getApplicationId()
The ID of the application this preview token is authorized for.
|
String |
getAuthor()
The username of the author associated with the preview token.
|
Instant |
getExpirationTime()
The expiration time of the preview token in UTC.
|
Set<String> |
getSandboxIds()
The set of sandbox IDs the preview token is authorized for.
|
String |
getTenantId()
The ID of the tenant this preview token is authorized for.
|
String |
getToken()
The token string that is used to authorize that a request has access to preview data for a
given sandbox.
|
int |
hashCode() |
boolean |
matchesContext(ContextRequest contextRequest)
Validates whether or not this preview token matches the provided
OperationType and
ContextRequest . |
void |
setApplicationId(String applicationId)
The ID of the application this preview token is authorized for.
|
void |
setAuthor(String author)
The username of the author associated with the preview token.
|
void |
setExpirationTime(Instant expirationTime)
The expiration time of the preview token in UTC.
|
void |
setSandboxIds(Set<String> sandboxIds)
The set of sandbox IDs the preview token is authorized for.
|
void |
setTenantId(String tenantId)
The ID of the tenant this preview token is authorized for.
|
void |
setToken(String token)
The token string that is used to authorize that a request has access to preview data for a
given sandbox.
|
String |
toString() |
public boolean matchesContext(ContextRequest contextRequest)
OperationType
and
ContextRequest
.
A preview token is considered a match for a context when the following are all true:
contextRequest
- the request contextpublic String getToken()
This token should be provided as part of the `X-Context-Request` header as the `previewToken` property along with the `sandboxId` the user wishes to access.
public Instant getExpirationTime()
public String getAuthor()
public Set<String> getSandboxIds()
public String getTenantId()
public String getApplicationId()
public void setToken(String token)
This token should be provided as part of the `X-Context-Request` header as the `previewToken` property along with the `sandboxId` the user wishes to access.
public void setExpirationTime(Instant expirationTime)
public void setAuthor(String author)
public void setSandboxIds(Set<String> sandboxIds)
public void setTenantId(String tenantId)
public void setApplicationId(String applicationId)
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.