/** * Checks that the version reported by the client (widgetset) matches that * of the server. * * @param widgetsetVersion * the widget set version reported by the client or null */ private void checkWidgetsetVersion(String widgetsetVersion) { if (widgetsetVersion == null) { // Only check when the widgetset version is reported. It is reported // in the first UIDL request (not the initial request as it is a // plain GET /) return; } if (!Version.getFullVersion().equals(widgetsetVersion)) { getLogger().warning(String.format(Constants.WIDGETSET_MISMATCH_INFO, Version.getFullVersion(), widgetsetVersion)); } }
piggybackLazyList)); comboBox.setContainerDataSource(getBic()); if (Version.getMajorVersion() >= 7 && Version.getMinorVersion() >= 5) {
private ScssCacheEntry loadPersistedScssCache(String scssFilename, ServletContext sc) throws IOException { String realFilename = sc.getRealPath(scssFilename); File scssCacheFile = getScssCacheFile(new File(realFilename)); if (!scssCacheFile.exists()) { return null; } String jsonString = readFile(scssCacheFile, StandardCharsets.UTF_8); JsonObject entryJson = Json.parse(jsonString); String cacheVersion = entryJson.getString("version"); if (!Version.getFullVersion().equals(cacheVersion)) { // Compiled for some other Vaadin version, discard cache scssCacheFile.delete(); return null; } return new ScssCacheEntry(entryJson); }
public String asJson() { JsonArray uris = Json.createArray(); for (String uri : sourceUris) { uris.set(uris.length(), uri); } JsonObject object = Json.createObject(); object.put("version", Version.getFullVersion()); object.put("timestamp", Long.toString(timestamp)); object.put("uris", uris); object.put("css", css); return object.toJson(); }
String versionQueryParam = "?v=" + Version.getFullVersion();
/** * Checks that the version reported by the client (widgetset) matches that * of the server. * * @param widgetsetVersion * the widget set version reported by the client or null */ private void checkWidgetsetVersion(String widgetsetVersion) { if (widgetsetVersion == null) { // Only check when the widgetset version is reported. It is reported // in the first UIDL request (not the initial request as it is a // plain GET /) return; } if (!Version.getFullVersion().equals(widgetsetVersion)) { getLogger().warning(String.format(Constants.WIDGETSET_MISMATCH_INFO, Version.getFullVersion(), widgetsetVersion)); } }
@PostConstruct public void init() { m_aboutInfo.setApplicationVersion(m_applicationVersion); List<String> versions = new ArrayList<>(); Map<String, Version> versionMap = m_beanFactory.getBeansOfType(nz.co.senanque.version.Version.class); for (Map.Entry<String, Version> entry: versionMap.entrySet()) { String v = entry.getKey()+": "; String v1 = entry.getValue().getVersion(); if (v1 != null) { v=v+v1; } versions.add(v); } versions.add("VaadinVersion: "+com.vaadin.shared.Version.getFullVersion()); m_aboutInfo.setVersions(versions); }
Version.getFullVersion()); System.out.println("Compiling theme " + themeName + " styles successful"); Version.getFullVersion()); System.out.println("Compiling theme " + themeName + " legacy-styles successful");
String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion(); String vaadinServlet = CmsStringUtil.joinPaths(context, "workplace/", ERROR_PAGE_PATH_FRAQUMENT); String vaadinBootstrap = CmsStringUtil.joinPaths(context, "VAADIN/vaadinBootstrap.js");
private static Element getPushScript(BootstrapContext context) { VaadinRequest request = context.getRequest(); // Parameter appended to JS to bypass caches after version upgrade. String versionQueryParam = "?v=" + Version.getFullVersion(); // Load client-side dependencies for push support String pushJS = ServletHelper.getContextRootRelativePath(request) + "/"; if (request.getService().getDeploymentConfiguration() .isProductionMode()) { pushJS += ApplicationConstants.VAADIN_PUSH_JS; } else { pushJS += ApplicationConstants.VAADIN_PUSH_DEBUG_JS; } pushJS += versionQueryParam; return new Element(Tag.valueOf("script"), "") .attr("type", TYPE_TEXT_JAVASCRIPT).attr("src", pushJS); }
versionInfo.put("vaadinVersion", Version.getFullVersion()); String atmosphereVersion = AtmospherePushConnection .getAtmosphereVersion();
String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion(); String vaadinServlet = CmsStringUtil.joinPaths(context, "workplace/dialogs/"); String vaadinBootstrap = CmsStringUtil.joinPaths(
/** * Returns the Javascript code to use for initializing a Vaadin UI.<p> * * @param cms the CMS context * @param elementId the id of the DOM element in which to initialize the UI * @param servicePath the UI servlet path * @return the Javascript code to initialize Vaadin * * @throws Exception if something goes wrong */ public static String getBootstrapScript(CmsObject cms, String elementId, String servicePath) throws Exception { String script = BOOTSTRAP_SCRIPT; CmsMacroResolver resolver = new CmsMacroResolver(); String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion(); String vaadinServlet = CmsStringUtil.joinPaths(context, servicePath); String vaadinBootstrap = CmsStringUtil.joinPaths(context, "VAADIN/vaadinBootstrap.js"); resolver.addMacro("vaadinDir", vaadinDir); resolver.addMacro("vaadinVersion", vaadinVersion); resolver.addMacro("elementId", elementId); resolver.addMacro("vaadinServlet", vaadinServlet); resolver.addMacro("vaadinBootstrap", vaadinBootstrap); script = resolver.resolveMacros(script); return script; }
versionInfo.put("vaadinVersion", Version.getFullVersion()); String atmosphereVersion = AtmospherePushConnection .getAtmosphereVersion();