Class UserAgentUtil
- java.lang.Object
-
- org.apache.sling.testing.clients.util.UserAgentUtil
-
public class UserAgentUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
constructAgent
public static String constructAgent(Class<?> clazz)
Create user-agent with simple class name.- Parameters:
clazz
- the class
-
constructAgent
public static String constructAgent(String name, Package pkg)
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
-
-