public class SolutionInfo extends Base
A User-Agent header with a solution information looks like this:
commercetools-sdk-java-v1/1.4.1 (AHC/2.0) Java/1.8.0_92-b14 (Mac OS X; x86_64) SOLUTION_NAME/SOLUTION_VERSION (+https://website.tld; +info@SOLUTION.com)
To add a solution information to the JVM SDK create a resource file src/main/resources/META-INF/services/io.sphere.sdk.client.SolutionInfo
which contains a fully qualified class name like (replace at least SOLUTION with your solution name)
tld.SOLUTION.client.SOLUTIONSolutionInfo
tld.SOLUTION.client.SOLUTIONSolutionInfo
:
public class SOLUTIONSolutionInfo extends SolutionInfo {
public SOLUTIONSolutionInfo() {
setName("JVM-SDK-integration-tests");
setVersion(BuildInfo.version());
setWebsite("https://github.com/commercetools/commercetools-jvm-sdk");
setEmergencyContact("helpdesk@commercetools.com");
}
}
This class will be loaded via reflection.Constructor and Description |
---|
SolutionInfo() |
Modifier and Type | Method and Description |
---|---|
String |
getEmergencyContact() |
String |
getName() |
String |
getVersion() |
String |
getWebsite() |
void |
setEmergencyContact(String emergencyContact) |
void |
setName(String name) |
void |
setVersion(String version) |
void |
setWebsite(String website) |
public String getName()
public void setName(String name)
public String getVersion()
public void setVersion(String version)
public String getWebsite()
public void setWebsite(String website)
public String getEmergencyContact()
public void setEmergencyContact(String emergencyContact)