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 * @return The jar patterns to include
19 */
20 List<String> getJarIncludes();
21
22 /**
23 * @return The jar patterns to exclude
24 */
25 List<String> getJarExcludes();
26
27 /**
28 * @return The package patterns to include
29 */
30 List<String> getPackageIncludes();
31
32 /**
33 * @return The package patterns to exclude
34 */
35 List<String> getPackageExcludes();
36
37 /**
38 * @return A map of package patterns and their versions
39 */
40 Map<String, String> getPackageVersions();
41
42 /**
43 * @return The current host application version number. Used as a caching key for scanned data.
44 * @since 2.2.0
45 */
46 String getCurrentHostVersion();
47
48 /**
49 * @return The servlet context to use to scan for jars, in case the classloader scanning fails
50 */
51 ServletContext getServletContext();
52 }