/** * <p> * Public plugin APIs delivering classes used by plugins need to be accessible in the engine's classpath * because both * the engine and the plugins need to access the same classes. Other classes in the engine's classpath may not be * accessible to plugins. Therefore only a few packages are allowed to be accessible in this classpath. This packages * are defined by the most common package prefix. Every resource or class request is checked: If it accesses one of * the packages a prefix was defined for, access to this classes or resources is granted, otherwise the request is * delegated to the parent classloader of the engines classpath (which usually results in skipping the AppClassloader * and redirecting to its parent delivering the bootstrap classpath). * <p> * * <p> * <b>Note: The convention described above has a side-effect. The public API may not deliver resources in the root * package that must be available for plugins. The package prefix would be empty and this would grant access to the * whole engine classpath.</b> * </p> * * * @return Returns the list of allowed package prefixes to be accessed in the classpath of this engine. */ private final List<String> getAllowedPackagePrefixes() { String[] publicAccessPackages = getPublicAccessPackages(); Lang.denyNull("publicAccessPackages", publicAccessPackages); List<String> allowedPackagePrefixes = new LinkedList<String>(Arrays.asList(publicAccessPackages)); List<String> defaultAllowedPackagePrefixes = LimbusUtil.getDefaultAllowedPackagePrefixes(); allowedPackagePrefixes.addAll(defaultAllowedPackagePrefixes); return allowedPackagePrefixes; }