Package nva.commons.core.useragent
Class UserAgent.UserAgentBuilder
java.lang.Object
nva.commons.core.useragent.UserAgent.UserAgentBuilder
- Enclosing class:
- UserAgent
Allows the building of a valid UserAgent string.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the UserAgent.The class that is calling, typically the Handler class that initiates the call.The contact email (typically support@somewhere) that recipients can contact in case of an issue.environment(String environment) The environment that is calling, typically dev, test, sandbox, e2e or prod.repository(URI uri) The repository for the code of the calling class.The version of Handler class that initiates the call.
-
Field Details
-
USER_AGENT_TEMPLATE
- See Also:
-
NULL_VALUE_ERROR
- See Also:
-
-
Method Details
-
client
The class that is calling, typically the Handler class that initiates the call.- Parameters:
aClass- The root caller class that initiates the call.- Returns:
- UserAgentBuilder
-
version
The version of Handler class that initiates the call.- Parameters:
version- The version string.- Returns:
- UserAgentBuilder
-
repository
The repository for the code of the calling class.- Parameters:
uri- The URI of the repository.- Returns:
- UserAgentBuilder
-
email
The contact email (typically support@somewhere) that recipients can contact in case of an issue.- Parameters:
email- The root caller class that initiates the call.- Returns:
- UserAgentBuilder
-
environment
The environment that is calling, typically dev, test, sandbox, e2e or prod.- Parameters:
environment- The environment.- Returns:
- UserAgentBuilder
-
build
Builds the UserAgent.- Returns:
- UserAgent.
-