The old findDependencies method is made private since it's only an implementation detail and should not be used from outside the class. At the same time, the new findAndFilterDependencies method is renamed to findDependencies since there's no longer necessary to have a name that distinguishes it from the variant that doesn't do any filtering.tags/8.1.0.beta1
.attr("href", themeUri + "/favicon.ico"); | .attr("href", themeUri + "/favicon.ico"); | ||||
} | } | ||||
Collection<? extends Dependency> deps = Dependency | |||||
.findAndFilterDependencies(Collections.singletonList(uiClass), | |||||
context.getSession().getCommunicationManager(), | |||||
new FilterContext(context.getSession())); | |||||
Collection<? extends Dependency> deps = Dependency.findDependencies( | |||||
Collections.singletonList(uiClass), | |||||
context.getSession().getCommunicationManager(), | |||||
new FilterContext(context.getSession())); | |||||
for (Dependency dependency : deps) { | for (Dependency dependency : deps) { | ||||
Type type = dependency.getType(); | Type type = dependency.getType(); | ||||
String url = context.getUriResolver() | String url = context.getUriResolver() |
List<Dependency> dependencies = new ArrayList<>(); | List<Dependency> dependencies = new ArrayList<>(); | ||||
dependencies.addAll(ui.getPage().getPendingDependencies()); | dependencies.addAll(ui.getPage().getPendingDependencies()); | ||||
dependencies.addAll(Dependency.findAndFilterDependencies( | |||||
newConnectorTypes, manager, new FilterContext(session))); | |||||
dependencies.addAll(Dependency.findDependencies(newConnectorTypes, | |||||
manager, new FilterContext(session))); | |||||
// Include dependencies in output if there are any | // Include dependencies in output if there are any | ||||
if (!dependencies.isEmpty()) { | if (!dependencies.isEmpty()) { |
* @return the list of found dependencies | * @return the list of found dependencies | ||||
*/ | */ | ||||
@SuppressWarnings("deprecation") | @SuppressWarnings("deprecation") | ||||
public static List<Dependency> findDependencies( | |||||
private static List<Dependency> findDependencies( | |||||
List<Class<? extends ClientConnector>> connectorTypes, | List<Class<? extends ClientConnector>> connectorTypes, | ||||
LegacyCommunicationManager manager) { | LegacyCommunicationManager manager) { | ||||
List<Dependency> dependencies = new ArrayList<>(); | List<Dependency> dependencies = new ArrayList<>(); | ||||
* the context information for the filtering operation | * the context information for the filtering operation | ||||
* @return the list of found and filtered dependencies | * @return the list of found and filtered dependencies | ||||
*/ | */ | ||||
public static List<Dependency> findAndFilterDependencies( | |||||
public static List<Dependency> findDependencies( | |||||
List<Class<? extends ClientConnector>> connectorTypes, | List<Class<? extends ClientConnector>> connectorTypes, | ||||
LegacyCommunicationManager manager, FilterContext context) { | LegacyCommunicationManager manager, FilterContext context) { | ||||
List<Dependency> dependencies = findDependencies(connectorTypes, | List<Dependency> dependencies = findDependencies(connectorTypes, |