Class TestandtargetCallOptions
- java.lang.Object
-
- com.day.cq.analytics.testandtarget.TestandtargetCallOptions
-
@ProviderType public class TestandtargetCallOptions extends 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
-
-
-
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(String clientCode)
Sets the client code- Parameters:
clientCode
- the client code- Returns:
- an instance of this object
-
withLocation
public TestandtargetCallOptions withLocation(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(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 String getClientCode()
Returns the client code.- Returns:
- a
String
object representing the client code
-
getLocation
public 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.
-
-