List of usage examples for com.vaadin.server LegacyCommunicationManager registerDependency
@Deprecated
public String registerDependency(String resourceUri, Class<?> context)
From source file:com.haulmont.cuba.web.sys.CubaUidlWriter.java
License:Apache License
@SuppressWarnings("deprecation") @Override/*from w w w . j a v a 2 s . c o m*/ protected void handleAdditionalDependencies(List<Class<? extends ClientConnector>> newConnectorTypes, List<String> scriptDependencies, List<String> styleDependencies) { LegacyCommunicationManager manager = VaadinSession.getCurrent().getCommunicationManager(); for (Class<? extends ClientConnector> connector : newConnectorTypes) { WebJarResource webJarResource = connector.getAnnotation(WebJarResource.class); if (webJarResource == null) continue; for (String uri : webJarResource.value()) { String resourceUri = processResourceUri(uri); String resourcePath = getResourceActualPath(resourceUri); resourcePath = resourcePath.replace(META_INF_PREFIX, VAADIN_PREFIX); if (resourcePath.endsWith(JAVASCRIPT_EXTENSION)) { scriptDependencies.add(manager.registerDependency(resourcePath, connector)); } if (resourcePath.endsWith(CSS_EXTENSION)) { styleDependencies.add(manager.registerDependency(resourcePath, connector)); } } } }