Tabnine Logo
ConnectIFrame.render
Code IndexAdd Tabnine to your IDE (free)

How to use
render
method
in
com.atlassian.plugin.connect.api.web.iframe.ConnectIFrame

Best Java code snippets using com.atlassian.plugin.connect.api.web.iframe.ConnectIFrame.render (Showing top 4 results out of 315)

origin: com.atlassian.plugins/atlassian-connect-api

public static String renderToString(ModuleContextParameters moduleContextParameters, ConnectIFrame connectIFrame) {
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  try {
    connectIFrame.render(moduleContextParameters, new OutputStreamWriter(out), Optional.empty());
  } catch (IOException e) {
    // no I/O, so no IOException.. right?
    throw new IllegalStateException(e);
  }
  return out.toString();
}
origin: com.atlassian.plugins/atlassian-connect-server-core

@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp)
    throws ServletException, IOException {
  Optional<AddOnKeyAndModuleKey> keys = keysFromPathMatcher.getAddOnKeyAndModuleKey(req.getPathInfo());
  if (!keys.isPresent()) {
    resp.sendError(SC_NOT_FOUND);
    return;
  }
  final AddOnKeyAndModuleKey addOnKeyAndModuleKey = keys.get();
  String classifier = req.getParameter(CLASSIFIER_PARAMETER);
  Optional<String> lookupClassifier = StringUtils.isBlank(classifier) || JSON_CLASSIFIER.equals(classifier) ? Optional.empty() : Optional.of(classifier);
  Optional<ConnectIFrame> maybeIFrame = iFrameAccessor.fetchConnectIFrame(addOnKeyAndModuleKey.getAddOnKey(), addOnKeyAndModuleKey.getModuleKey(), lookupClassifier);
  if (maybeIFrame.isPresent()) {
    ConnectIFrame iFrame = maybeIFrame.get();
    if (JSON_CLASSIFIER.equals(classifier)) {
      iFrame = iFrame.toJsonIFrame();
    }
    resp.setContentType(iFrame.getContentType());
    ModuleContextParameters moduleContextParameters = moduleContextParser.parseContextParameters(req);
    if (iFrame.shouldShow(moduleContextParameters)) {
      Optional<String> moduleUiParameters = moduleUiParamParser.parseUiParameters(req);
      iFrame.render(moduleContextParameters, resp.getWriter(), moduleUiParameters);
      eventPublisher.publish(new IFrameRenderedEvent(addOnKeyAndModuleKey.getAddOnKey(), addOnKeyAndModuleKey.getModuleKey(), moduleContextParameters));
    } else {
      iFrame.renderAccessDenied(resp.getWriter());
    }
  } else {
    resp.sendError(SC_NOT_FOUND);
  }
}
origin: com.atlassian.plugins/atlassian-connect-core

  iFrame.render(moduleContextParameters, resp.getWriter(), moduleUiParameters);
  eventPublisher.publish(new IFrameRenderedEvent(addOnKeyAndModuleKey.getAddOnKey(), addOnKeyAndModuleKey.getModuleKey(), moduleContextParameters));
} else {
origin: com.atlassian.plugins/atlassian-connect-server-api

public static String renderToString(ModuleContextParameters moduleContextParameters, ConnectIFrame connectIFrame) {
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  try {
    connectIFrame.render(moduleContextParameters, new OutputStreamWriter(out), Optional.empty());
  } catch (IOException e) {
    // no I/O, so no IOException.. right?
    throw new IllegalStateException(e);
  }
  return out.toString();
}
com.atlassian.plugin.connect.api.web.iframeConnectIFramerender

Popular methods of ConnectIFrame

  • renderAccessDenied
  • getContentType
  • shouldShow
  • toJsonIFrame
  • serialize

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • String (java.lang)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Option (scala)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now