View Javadoc

1   package com.atlassian.plugin.osgi.container;
2   
3   import javax.servlet.ServletContext;
4   import java.util.List;
5   import java.util.Map;
6   
7   /**
8    * Contains configuration for the package scanning algorithm that scans your classpath to determine which packages
9    * and versions to export to OSGi.  Jar and package includes/excludes, and packages for the package version map can
10   * either be simple names or wildcard patterns, where the "*" character will match any character.
11   *
12   * <p>
13   * Includes and excludes are matched so that only includes are, well, included, but if you need to filter a few out
14   * of that set, the exclude patterns will be removed.
15   */
16  public interface PackageScannerConfiguration
17  {
18      /**
19       * @return The jar patterns to include
20       */
21      List<String> getJarIncludes();
22  
23      /**
24       * @return The jar patterns to exclude
25       */
26      List<String> getJarExcludes();
27  
28      /**
29       * @return The package patterns to include
30       */
31      List<String> getPackageIncludes();
32  
33      /**
34       * @return The package patterns to exclude
35       */
36      List<String> getPackageExcludes();
37  
38      /**
39       * @return A map of package patterns and their versions
40       */
41      Map<String,String> getPackageVersions();
42  
43      /**
44       * @return The current host application version number.  Used as a caching key for scanned data.
45       * @since 2.2.0
46       */
47      String getCurrentHostVersion();
48  
49      /**
50       * @return The servlet context to use to scan for jars, in case the classloader scanning fails
51       */
52      ServletContext getServletContext();
53  }