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.String
getApiVersion()
Returns the API version used.TestandtargetHttpClient.TestandtargetMethodType
getCallMethod()
Returns the call method (GET, POST etc.)java.lang.String
getClientCode()
Returns the client code.TestandtargetHttpParameters
getHttpParameters()
Returns the HTTP parameters.java.lang.String
getLocation()
Returns API location to useTestandtargetHttpClient.TestandtargetSolution
getSolution()
Returns the solution to be used.TestandtargetCallOptions
withApiVersion(java.lang.String apiVersion)
Sets the API version to invoke.TestandtargetCallOptions
withCallMethod(TestandtargetHttpClient.TestandtargetMethodType callMethod)
Adds the call method to the options.TestandtargetCallOptions
withClientCode(java.lang.String clientCode)
Sets the client codeTestandtargetCallOptions
withLocation(java.lang.String location)
Sets the API location to invoke.TestandtargetCallOptions
withParameters(TestandtargetHttpParameters httpParameters)
Sets the HTTP parametersTestandtargetCallOptions
withSolution(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/campaign
or/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. Ifnull
is 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.TestandtargetMethodType
object representing the method
-
getClientCode
public java.lang.String getClientCode()
Returns the client code.- Returns:
- a
String
object representing the client code
-
getLocation
public java.lang.String getLocation()
Returns API location to use- Returns:
- a
String
object representing the location (e.g.campaign/23.json
-
getSolution
public TestandtargetHttpClient.TestandtargetSolution getSolution()
Returns the solution to be used.- Returns:
- a
TestandtargetHttpClient.TestandtargetSolution
object representing the method
-
getHttpParameters
public TestandtargetHttpParameters getHttpParameters()
Returns the HTTP parameters.- Returns:
- a
TestandtargetHttpParameters
object representing the additional HTTP parameters.
-
getApiVersion
public java.lang.String getApiVersion()
Returns the API version used.- Returns:
- a
String
object representing the API version.
-
-