public class PackageScannerConfigurationBuilder extends Object
PackageScannerConfiguration instances that additionally performs validation and default creation.
For a usage example, see the package javadocs.
Not thread-safe. Instances of this class should be thread and preferably method local.
| Constructor and Description |
|---|
PackageScannerConfigurationBuilder()
Default constructor.
|
PackageScannerConfigurationBuilder(PackageScannerConfiguration packageScannerConfiguration)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PackageScannerConfiguration |
build()
Builds a
PackageScannerConfiguration instance by processing the configuration that
was previously set and setting any defaults where not explicitly specified. |
PackageScannerConfigurationBuilder |
hostVersion(String... pkgs)
Sets the current host version.
|
PackageScannerConfigurationBuilder |
jarsToExclude(String... jars)
Sets a list of jar expressions to hide from plugins.
|
PackageScannerConfigurationBuilder |
jarsToInclude(String... jars)
Sets a list of jar expressions to expose to plugins.
|
static PackageScannerConfigurationBuilder |
packageScannerConfiguration()
Static factory for creating a new builder.
|
PackageScannerConfigurationBuilder |
packagesToExclude(String... pkgs)
Sets a list of package expressions to hide from plugins.
|
PackageScannerConfigurationBuilder |
packagesToInclude(String... pkgs)
Sets a list of package expressions to expose to plugins.
|
PackageScannerConfigurationBuilder |
packagesVersions(Map<String,String> packageToVersion)
Sets which packages should be exposed as which versions.
|
PackageScannerConfigurationBuilder |
servletContext(javax.servlet.ServletContext servletContext)
Sets the
ServletContext used to lookup jars as some application servers need it to lookup jar files. |
public PackageScannerConfigurationBuilder()
public PackageScannerConfigurationBuilder(PackageScannerConfiguration packageScannerConfiguration)
packageScannerConfiguration - public static PackageScannerConfigurationBuilder packageScannerConfiguration()
public PackageScannerConfigurationBuilder hostVersion(String... pkgs)
pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration.getCurrentHostVersion()public PackageScannerConfigurationBuilder servletContext(javax.servlet.ServletContext servletContext)
ServletContext used to lookup jars as some application servers need it to lookup jar files.pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration#getS()public PackageScannerConfigurationBuilder packagesToInclude(String... pkgs)
pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration.getPackageIncludes()public PackageScannerConfigurationBuilder packagesToExclude(String... pkgs)
pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration.getPackageExcludes()public PackageScannerConfigurationBuilder packagesVersions(Map<String,String> packageToVersion)
packageToVersion - A map of package names to version names. No wildcards allowed, and the version names
must match the expected OSGi versioning scheme.PackageScannerConfiguration.getPackageVersions()public PackageScannerConfigurationBuilder jarsToInclude(String... jars)
pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration.getJarIncludes()public PackageScannerConfigurationBuilder jarsToExclude(String... jars)
pkgs - A list of package expressions, where the '*' character matches any character including subpackagesPackageScannerConfiguration.getPackageExcludes()public PackageScannerConfiguration build()
PackageScannerConfiguration instance by processing the configuration that
was previously set and setting any defaults where not explicitly specified.PackageScannerConfiguration instance to pass to AtlassianPluginsCopyright © 2014 Atlassian. All rights reserved.