Class TestandtargetCallOptions
- java.lang.Object
-
- com.day.cq.analytics.testandtarget.TestandtargetCallOptions
-
@ProviderType public class TestandtargetCallOptions extends java.lang.Object
Provides a nice way of grouping the options of an API call. Those options include (but are not limited to) the API location, the API method (GET, POST etc.), the API version to use etc.
-
-
Constructor Summary
Constructors Constructor Description TestandtargetCallOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetApiVersion()Returns the API version used.TestandtargetHttpClient.TestandtargetMethodTypegetCallMethod()Returns the call method (GET, POST etc.)java.lang.StringgetClientCode()Returns the client code.TestandtargetHttpParametersgetHttpParameters()Returns the HTTP parameters.java.lang.StringgetLocation()Returns API location to useTestandtargetHttpClient.TestandtargetSolutiongetSolution()Returns the solution to be used.TestandtargetCallOptionswithApiVersion(java.lang.String apiVersion)Sets the API version to invoke.TestandtargetCallOptionswithCallMethod(TestandtargetHttpClient.TestandtargetMethodType callMethod)Adds the call method to the options.TestandtargetCallOptionswithClientCode(java.lang.String clientCode)Sets the client codeTestandtargetCallOptionswithLocation(java.lang.String location)Sets the API location to invoke.TestandtargetCallOptionswithParameters(TestandtargetHttpParameters httpParameters)Sets the HTTP parametersTestandtargetCallOptionswithSolution(TestandtargetHttpClient.TestandtargetSolution solution)Sets the Adobe Target solution for which the options object is invoked
-
-
-
Method Detail
-
withCallMethod
public TestandtargetCallOptions withCallMethod(TestandtargetHttpClient.TestandtargetMethodType callMethod)
Adds the call method to the options.- Parameters:
callMethod- the HTTP method (GET, POST etc)- Returns:
- an instance of this object
-
withClientCode
public TestandtargetCallOptions withClientCode(java.lang.String clientCode)
Sets the client code- Parameters:
clientCode- the client code- Returns:
- an instance of this object
-
withLocation
public TestandtargetCallOptions withLocation(java.lang.String location)
Sets the API location to invoke.- Parameters:
location- the API location to invoke (e.g./rest/v1/campaignor/rest/v5/segments- Returns:
- an instance of this object
-
withSolution
public TestandtargetCallOptions withSolution(TestandtargetHttpClient.TestandtargetSolution solution)
Sets the Adobe Target solution for which the options object is invoked- Parameters:
solution- the Adobe Target solution to use (Target or Target Recommendation)- Returns:
- an instance of this object
-
withParameters
public TestandtargetCallOptions withParameters(TestandtargetHttpParameters httpParameters)
Sets the HTTP parameters- Parameters:
httpParameters- the additional HTTP parameters- Returns:
- an instance of this object
-
withApiVersion
public TestandtargetCallOptions withApiVersion(java.lang.String apiVersion)
Sets the API version to invoke.- Parameters:
apiVersion- the API version to invoke. Ifnullis supplied then the v1 version is used.- Returns:
- an instance of this object
-
getCallMethod
public TestandtargetHttpClient.TestandtargetMethodType getCallMethod()
Returns the call method (GET, POST etc.)- Returns:
- a
TestandtargetHttpClient.TestandtargetMethodTypeobject representing the method
-
getClientCode
public java.lang.String getClientCode()
Returns the client code.- Returns:
- a
Stringobject representing the client code
-
getLocation
public java.lang.String getLocation()
Returns API location to use- Returns:
- a
Stringobject representing the location (e.g.campaign/23.json
-
getSolution
public TestandtargetHttpClient.TestandtargetSolution getSolution()
Returns the solution to be used.- Returns:
- a
TestandtargetHttpClient.TestandtargetSolutionobject representing the method
-
getHttpParameters
public TestandtargetHttpParameters getHttpParameters()
Returns the HTTP parameters.- Returns:
- a
TestandtargetHttpParametersobject representing the additional HTTP parameters.
-
getApiVersion
public java.lang.String getApiVersion()
Returns the API version used.- Returns:
- a
Stringobject representing the API version.
-
-