Package org.apache.sling.testing.clients.util

# Class UserAgentUtil

java.lang.Object
org.apache.sling.testing.clients.util.UserAgentUtil

public class UserAgentUtil extends Object

## Method Summary

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].

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### 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 name
  `pkg` - the package

### constructAgent

public static String constructAgent(String name, String version)
Create user-agent from name and version-string [name]/[version].

Parameters:
  `name` - the user-agent name
  `version` - the user-agent version (or null to use name only)