@Valid public class Context extends Object implements com.anaptecs.jeaf.core.api.ServiceObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Context.Builder
Class implements builder to create a new instance of class
Context. |
| Modifier | Constructor and Description |
|---|---|
protected |
Context()
Default constructor is only intended to be used for deserialization by tools like Jackson for JSON.
|
protected |
Context(Context.Builder pBuilder)
Initialize object using the passed builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomHeader(String pHeaderName,
String pHeaderValue)
Method adds the passed values as custom headers.
|
static Context.Builder |
builder()
Method returns a new builder.
|
static Context.Builder |
builder(Context pObject)
Method creates a new builder and initialize it with the data from the passed object.
|
static Context.Builder |
builder(String pAccessToken,
Locale pLanguage,
long pResellerID,
long pPathParam,
String pQueryParam)
Method creates a new builder and initializes it with the passed attributes.
|
String |
getAccessToken()
Method returns attribute
accessToken. |
Map<String,String> |
getCustomHeaders()
Method returns map with all custom headers that were added
|
Locale |
getLanguage()
Method returns attribute
language. |
long |
getPathParam()
Method returns attribute
pathParam. |
String |
getQueryParam()
Method returns attribute
queryParam. |
long |
getResellerID()
Method returns attribute
resellerID. |
void |
setAccessToken(String pAccessToken)
Method sets attribute
accessToken. |
void |
setLanguage(Locale pLanguage)
Method sets attribute
language. |
void |
setPathParam(long pPathParam)
Method sets attribute
pathParam. |
void |
setQueryParam(String pQueryParam)
Method sets attribute
queryParam. |
void |
setResellerID(long pResellerID)
Method sets attribute
resellerID. |
String |
toString()
Method creates a new String with the values of all attributes of this class.
|
StringBuilder |
toStringBuilder(String pIndent)
Method returns a StringBuilder that can be used to create a String representation of this object.
|
protected Context()
protected Context(Context.Builder pBuilder)
pBuilder - Builder that should be used to initialize this object. The parameter must not be null.public static Context.Builder builder()
Context.Builder New builder that can be used to create new Context objects.public static Context.Builder builder(Context pObject)
pObject - Object that should be used to initialize the builder. The parameter may be null.Context.Builder New builder that can be used to create new Context objects. The method never returns null.public static Context.Builder builder(String pAccessToken, Locale pLanguage, long pResellerID, long pPathParam, String pQueryParam)
public String getAccessToken()
accessToken.String Value to which accessToken is set.public void setAccessToken(String pAccessToken)
accessToken.pAccessToken - Value to which accessToken should be set.public void setLanguage(Locale pLanguage)
language.pLanguage - Value to which language should be set.public long getResellerID()
resellerID.resellerID is set.public void setResellerID(long pResellerID)
resellerID.pResellerID - Value to which resellerID should be set.public long getPathParam()
pathParam.pathParam is set.public void setPathParam(long pPathParam)
pathParam.pPathParam - Value to which pathParam should be set.public String getQueryParam()
queryParam.String Value to which queryParam is set.public void setQueryParam(String pQueryParam)
queryParam.pQueryParam - Value to which queryParam should be set.public Map<String,String> getCustomHeaders()
Map Map with all custom headers. The method never returns null. The returned map is unmodifiable.public void addCustomHeader(String pHeaderName, String pHeaderValue)
pHeaderName - Name of the HTTP header. The parameter must not be null,pHeaderValue - Value of the http header the parameter may be null.public StringBuilder toStringBuilder(String pIndent)
StringBuilder StringBuilder representing this object. The method never returns null.Copyright © 2023. All rights reserved.