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

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

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

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

ConnectIFrame iFrame = maybeIFrame.get();
if (JSON_CLASSIFIER.equals(classifier)) {
  iFrame = iFrame.toJsonIFrame();
com.atlassian.plugin.connect.api.web.iframeConnectIFrametoJsonIFrame

Popular methods of ConnectIFrame

  • render
  • renderAccessDenied
  • getContentType
  • shouldShow
  • serialize

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JCheckBox (javax.swing)
  • Top plugins for Android Studio
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