@Override protected String doExecute() throws Exception { webResourceManager.requireResource("jira.webresources:user-picker-filter-configuration-resources"); return INPUT; }
@Override protected void requireResource(WebResourceManager webResourceManager) { webResourceManager.requireResource(ADMIN_RESOURCES); webResourceManager.requireResourcesForContext(AUTOMATION_WEB_RESOURCE_CONTEXT); }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain; charset=utf-8"); PrintWriter pw = resp.getWriter(); resourceLocator.requireResource("com.atlassian.auiplugin:ajs"); resourceLocator.includeResources(pw, UrlMode.ABSOLUTE); pw.close(); } }
webResourceManager.requireResource("com.atlassian.auiplugin:ajs"); webResourceManager.requireResourcesForContext("speakeasy.admin"); 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))).
webResourceManager.requireResourcesForContext("wallboard"); webResourceManager.includeResources(writer, UrlMode.AUTO); params.setResourceIncludes(writer.toString());
private void init() { // ok if this gets ran twice if (xpiUrl == null) { this.xpiUrl = webResourceManager.getStaticPluginResource("com.atlassian.labs.speakeasy-plugin:firefox-extension", "speakeasy.xpi", UrlMode.AUTO); this.iconUrl = webResourceManager.getStaticPluginResource("com.atlassian.labs.speakeasy-plugin:firefox-extension", "icon.png", UrlMode.AUTO); } } }
public AbstractCopyIssueAction(final SubTaskManager subTaskManager, final FieldLayoutManager fieldLayoutManager, final CommentManager commentManager, final CopyIssuePermissionManager copyIssuePermissionManager, final ApplicationLinkService applicationLinkService, final JiraProxyFactory jiraProxyFactory, final WebResourceManager webResourceManager, final IssueLinkTypeManager issueLinkTypeManager) { super(subTaskManager); this.fieldLayoutManager = fieldLayoutManager; this.commentManager = commentManager; this.copyIssuePermissionManager = copyIssuePermissionManager; this.applicationLinkService = applicationLinkService; this.jiraProxyFactory = jiraProxyFactory; this.issueLinkTypeManager = issueLinkTypeManager; webResourceManager.requireResourcesForContext("com.atlassian.cpji.cpji-jira-plugin.copy-context"); }
public CharSequence get() { StringWriter writer = new StringWriter(); webResourceManager.includeResources(writer, UrlMode.AUTO); return writer.toString(); } })
webResourceManager.requireResource("com.atlassian.auiplugin:ajs"); webResourceManager.requireResourcesForContext("speakeasy.user-profile"); boolean devMode = speakeasyService.canAuthorExtensions(user); 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 URI getWikiRendererCssUri() { return URI.create(webResourceManager.getStaticPluginResource("jira.webresources:global-static", "wiki-renderer.css", com.atlassian.plugin.webresource.UrlMode.ABSOLUTE)).normalize(); }
@Override public SoyData computeForJava(List<SoyValue> args) { final SoyValue data = args.get(0); if (!(data instanceof StringData)) { throw SoySyntaxException.createWithoutMetaInfo("Argument to " + getName() + "() is not a literal string"); } final String context = data.stringValue(); webResourceManager.requireResourcesForContext(context); return StringData.EMPTY_STRING; }
@Override public SoyData computeForJava(List<SoyValue> args) { StringWriter writer = new StringWriter(); webResourceManager.includeResources(writer, UrlMode.AUTO); return UnsafeSanitizedContentOrdainer.ordainAsSafe(writer.toString(), SanitizedContent.ContentKind.HTML); }
@Override protected void requireResource(WebResourceManager webResourceManager) { webResourceManager.requireResource(ADMIN_RESOURCES); }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { webResourceManager.requireResource("com.atlassian.gadgets.dashboard:dashboard"); webResourceManager.requireResourcesForContext("atl.dashboard"); //Doesn't need a decorator,intended to not look like a Jira page. String[] rawDashboardIds = req.getParameterValues(DASHBOARD_ID.getKey()); String contextPath = req.getContextPath(); ApplicationUser user = authContext.getUser(); log.log(Level.DEBUG, "Session id is: " + req.getSession().getId()); if (rawDashboardIds == null) { rawDashboardIds = new String[0]; } doGetMultipleWallboards(req, resp, rawDashboardIds, contextPath, user); }
private Map<String, Object> createVelocityContext(final HttpServletResponse resp) { final Map<String, Object> context = new HashMap<>(); context.put("i18n", i18nResolver); resp.setContentType("text/html"); webResourceManager.requireResource("com.atlassian.applinks.applinks-oauth-plugin:oauth-dance"); final StringWriter stringWriter = new StringWriter(); webResourceManager.includeResources(stringWriter, UrlMode.RELATIVE); final WebResources webResources = new WebResources(); webResources.setIncludedResources(stringWriter.getBuffer().toString()); context.put(WEB_RESOURCES.key, webResources); return context; }
private Function<String, URI> getStaticPluginResource(final String moduleKey) { return s -> URI.create(webResourceManager.getStaticPluginResource(moduleKey, s, com.atlassian.plugin.webresource.UrlMode.ABSOLUTE)).normalize(); } }
private void includeResourcesDefinedInContexts() { for (final StrTokenizer csvTokenizer = StrTokenizer.getCSVInstance(contexts); csvTokenizer.hasNext();) { final String aRequiredWebResourceContext = csvTokenizer.nextToken(); getWebResourceManager().requireResourcesForContext(aRequiredWebResourceContext); } }
public String getHtmlForSelectedTab() { final ViewProfilePanelModuleDescriptor moduleDescriptor = getSelectedProfilePanelDescriptor(); final String tabHtml = moduleDescriptor.getModule().getHtml(profileUser); final StringBuilder strBuilder = new StringBuilder(); strBuilder.append(tabHtml); if (contentOnly) { // Put this after the HTML so that we don't have to come up with crazy css // selector to skip over resources that may or may not get dynamically injected // into the page. final SuperBatchFilteringWriter writer = new SuperBatchFilteringWriter(); webResourceManager.includeResources(writer, UrlMode.AUTO); strBuilder.append(writer.toString()); } return strBuilder.toString(); }
@Override protected void requireResource(WebResourceManager webResourceManager) { webResourceManager.requireResource(COMPLETE_PLUGIN_KEY + ":rule-list-resources"); }
webResourceManager.requireResourcesForContext("atl.userprofile"); webResourceManager.requireResourcesForContext("jira.userprofile"); webResourceManager.requireResource("jira.webresources:userprofile");