private String getImageUrl(String pluginKey, long stateKey, String fileName) { String fullUrl = webResourceManager.getStaticResourcePrefix(UrlMode.AUTO) + "/download/resources/" + pluginKey + ":images-" + stateKey + "/" + fileName; if (!fullUrl.startsWith("/s")) { fullUrl = fullUrl.substring(fullUrl.indexOf("/s")); } return fullUrl; }
@Override protected String transform(String originalContent) { String content = originalContent.replace("@staticResourcePrefix", webResourceManager.getStaticResourcePrefix(UrlMode.RELATIVE) + "/download/resources"); String fullModuleKey = configElement.attributeValue("fullModuleKey"); if (fullModuleKey != null) { content = content.replace("@modulePrefix", webResourceManager.getStaticResourcePrefix(UrlMode.RELATIVE) + "/download/resources/" + fullModuleKey); } String imagesModuleKey = configElement.attributeValue("imagesModuleKey"); if (imagesModuleKey != null) { content = content.replace("@imagesPrefix", webResourceManager.getStaticResourcePrefix(UrlMode.RELATIVE) + "/download/resources/" + imagesModuleKey); } return content; } }
put("user", user). put("contextPath", req.getContextPath()). put("staticResourcesPrefix", webResourceManager.getStaticResourcePrefix(UrlMode.RELATIVE)). put("settings", new JsRenderer(jsonMarshaller.marshal(settings))). put("permissionsJson", new JsRenderer(jsonMarshaller.marshal(Permission.ALL))).
put("rowRenderer", new RowRenderer(req.getContextPath(), plugin)). put("jsdocRenderer", new JsDocRenderer(plugin, commonJsModulesAccessor.getAllPublicCommonJsModules())). put("staticResourcesPrefix", webResourceManager.getStaticResourcePrefix(UrlMode.RELATIVE)). put("product", productAccessor.getSdkName()). put("devmode", devMode).
public StudioAdministration(WebResourceManager webResourceManager, AppLinksManager appLinksManager, GlobalPermissionManager globalPermissionManager, I18nResolver i18nResolver, UserCounter userCounter) { this.i18nResolver = i18nResolver; this.userCounter = userCounter; primaryConfluence = appLinksManager.getPrimaryApplicationInstance(Application.CONFLUENCE.toString()); primaryFisheye = appLinksManager.getPrimaryApplicationInstance(Application.FISHEYE.toString()); LookAndFeelBean lookAndFeelBean = LookAndFeelBean.getInstance(getApplicationProperties()); logoUrl = lookAndFeelBean.getLogoUrl(); if (logoUrl != null && !logoUrl.startsWith("http://") && !logoUrl.startsWith("https://")) { logoUrl = webResourceManager.getStaticResourcePrefix() + logoUrl; } logoHeight = lookAndFeelBean.getLogoHeight(); logoWidth = lookAndFeelBean.getLogoWidth(); this.globalPermissionManager = globalPermissionManager; }