@Override public Enumeration<URL> getResources(String name) throws IOException { return new ResourcesEnumeration(getAlternativeResourceName(name), classLoaders); }
/** * Obtain a regular expression which matches any of the provided parts. */ public String buildRegularExpression(final Collection<String> parts) { return RegularExpressions.anyOf(parts); }
@Override public boolean satisfiesMinJavaVersion() { if (minJavaVersion != null) { return JavaVersionUtils.satisfiesMinVersion(minJavaVersion); } return true; }
/** * @throws IllegalArgumentException if the moduleClass is <code>null</code> */ public ModuleOfClassPredicate(final Class<T> moduleClass) { this.moduleClass = notNull("moduleClass", moduleClass); }
/** * Invokes the wait condition, trying every second for 10 seconds * * @param waitCondition The condition that determines when to stop waiting * @return True if the condition returned true */ public static boolean invoke(final WaitCondition waitCondition) { return invoke(waitCondition, STARTUP_WAIT); }
private static Comparator<String> newVersionComparator() { return new VersionStringComparator(); } }
private VersionRange newRange(String version, boolean rightIncluded) { if (leftVersion != null) { return newActualRange(version, rightIncluded); } else { return newLeftUnboundedRange(version, rightIncluded); } }
public <M> Class<M> loadClass(final String clazz, final Class<?> callingClass) throws ClassNotFoundException { return ClassLoaderUtils.loadClass(clazz, callingClass); }
public VersionRange include(String version) { return newRange(version, true); }
ModuleRestrict(String application, InstallationMode mode) { this(application, mode, VersionRange.all()); }
private LeftUnboundedVersionRange newLeftUnboundedRange(String version, boolean rightIncluded) { return new LeftUnboundedVersionRange(rightIncluded, version); }
/** * Delegate all event publication to the supplied {@code EventPublisher}. */ public DefaultPluginEventManager(final EventPublisher eventPublisher) { this.eventPublisher = notNull("eventPublisher", eventPublisher); }
/** * Invokes the wait condition, trying every second for the configured * seconds * * @param waitCondition The condition that determines when to stop waiting * @param tries The number of tries to attempt * @return True if the condition returned true */ public static boolean invoke(final WaitCondition waitCondition, final int tries) { final int secondMillis = 1000; return invoke(waitCondition, tries * secondMillis, TimeUnit.MILLISECONDS, secondMillis); }
/** * Obtain a regular expression which matches any of the provided parts. */ public String buildRegularExpression(final Collection<String> parts) { return RegularExpressions.anyOf(parts); }
/** * Sets the host component provider instance, used for registering application services as OSGi services so that * they can be automatically available to plugins * * @param hostComponentProvider The host component provider implementation * @return this */ public PluginsConfigurationBuilder hostComponentProvider(final HostComponentProvider hostComponentProvider) { this.hostComponentProvider = notNull("hostComponentProvider", hostComponentProvider); return this; }
public WebResourceManagerImpl(final WebResourceAssemblerFactory webResourceAssemblerFactory, final LegacyPageBuilderService pageBuilderService, final PluginResourceLocator pluginResourceLocator, final WebResourceIntegration webResourceIntegration, final WebResourceUrlProvider webResourceUrlProvider, final ResourceBatchingConfiguration batchingConfiguration, final ResourceDependencyResolver resourceDependencyResolver) { this.webResourceAssemblerFactory = notNull("webResourceAssemblerFactory", webResourceAssemblerFactory); this.pageBuilderService = notNull("pageBuilderService", pageBuilderService); this.webResourceIntegration = notNull("webResourceIntegration", webResourceIntegration); this.webResourceUrlProvider = notNull("webResourceUrlProvider", webResourceUrlProvider); }
public SinglePluginLoader(final URL url) { this.url = notNull("url", url); resource = null; }
/** * Sets the package scanner configuration instance that contains information about what packages to expose to plugins. * * @param packageScannerConfiguration The configuration instance * @return this */ public PluginsConfigurationBuilder packageScannerConfiguration(final PackageScannerConfiguration packageScannerConfiguration) { this.packageScannerConfiguration = notNull("packageScannerConfiguration", packageScannerConfiguration); return this; }
public SinglePluginLoader(final String resource) { this.resource = notNull("resource", resource); url = null; }