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

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

Best Java code snippets using com.atlassian.plugin.connect.api.web.iframe.ConnectIFrame.shouldShow (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

ModuleContextParameters moduleContextParameters = moduleContextParser.parseContextParameters(req);
if (iFrame.shouldShow(moduleContextParameters.getOriginalContext())) {
  Optional<String> moduleUiParameters = moduleUiParamParser.parseUiParameters(req);
  iFrame.render(moduleContextParameters, resp.getWriter(), moduleUiParameters);
com.atlassian.plugin.connect.api.web.iframeConnectIFrameshouldShow

Popular methods of ConnectIFrame

  • render
  • renderAccessDenied
  • getContentType
  • toJsonIFrame
  • serialize

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Collectors (java.util.stream)
  • Best IntelliJ plugins
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