public final class

LicenseReader

extends Object
java.lang.Object
   ↳ com.atlassian.jira.test.util.lic.LicenseReader

Class Overview

Simply utility class to read License objects used in tests.

Summary

Public Methods
static License readLicense(String resource, Class<?> base)
Try and read the passed resource as a License.
static String readLicenseEncodedString(String resource, Class<?> base)
Try and read the passed resource as an encoded license string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static License readLicense (String resource, Class<?> base)

Try and read the passed resource as a License. The search for the resource tries two methods:

A runtime exception will be thrown if the license cannot be found.

Parameters
resource the resource to read.
base the class that will be used to resolve the resource.
Returns
  • the parsed license.
Throws
RuntimeException if the license cannot be found.

public static String readLicenseEncodedString (String resource, Class<?> base)

Try and read the passed resource as an encoded license string. The search for the resource trys two methods:

A runtime exception will be thrown if the license cannot be found.

Parameters
resource the resource to read.
base the class that will be used to resolve the resource.
Returns
  • the encoded license string.
Throws
RuntimeException if the license cannot be found.