Class UserAgentUtil

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

public class UserAgentUtil extends Object
  • 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)