Class UserAgentUtil
java.lang.Object
org.apache.sling.testing.clients.util.UserAgentUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
constructAgent
(Class<?> clazz) Create user-agent with simple class name.static String
constructAgent
(String name, Package pkg) Create user-agent from name and determine version through implementation version of the provided package.static String
constructAgent
(String name, String version) Create user-agent from name and version-string [name]/[version].
-
Method Details
-
constructAgent
Create user-agent with simple class name.- Parameters:
clazz
- the class
-
constructAgent
Create user-agent from name and determine version through implementation version of the provided package. In case the implementation version of the package returns null, the version info is omitted.- Parameters:
name
- the user-agent namepkg
- the package
-
constructAgent
Create user-agent from name and version-string [name]/[version].- Parameters:
name
- the user-agent nameversion
- the user-agent version (or null to use name only)
-