Tabnine Logo
PluginUtils.doesModuleElementApplyToApplication
Code IndexAdd Tabnine to your IDE (free)

How to use
doesModuleElementApplyToApplication
method
in
com.atlassian.plugin.util.PluginUtils

Best Java code snippets using com.atlassian.plugin.util.PluginUtils.doesModuleElementApplyToApplication (Showing top 5 results out of 315)

origin: com.atlassian.plugins/atlassian-plugins-core

public Iterable<Element> getModules(final InstallationMode installationMode) {
  return elements(getPluginElement()).stream()
      .filter(element -> {
        String name = element.getName();
        return !(PLUGIN_INFO.equalsIgnoreCase(name) || RESOURCE.equalsIgnoreCase(name));
      })
      .filter(module -> {
        if (!PluginUtils.doesModuleElementApplyToApplication(module, applications, installationMode)) {
          log.debug("Ignoring module descriptor for this application: {}", module.attributeValue("key"));
          return false;
        }
        return true;
      })
      .collect(Collectors.toList());
}
origin: com.atlassian.plugins/atlassian-plugins-osgi

public void execute(TransformContext context) throws PluginTransformationException {
  if (SpringHelper.shouldGenerateFile(context, SPRING_XML)) {
    Document springDoc = SpringHelper.createSpringDocument();
    Element root = springDoc.getRootElement();
    ServiceReference[] serviceReferences = context.getOsgiContainerManager().getRegisteredServices();
    for (ComponentImport comp : context.getComponentImports().values()) {
      if (!PluginUtils.doesModuleElementApplyToApplication(comp.getSource(), context.getApplications(), context.getInstallationMode())) {
        continue;
      }
      Element osgiReference = root.addElement("osgi:reference");
      // make sure the new bean id is not already in use.
      context.trackBean(comp.getKey(), BEAN_SOURCE);
      osgiReference.addAttribute("id", comp.getKey());
      if (comp.getFilter() != null) {
        osgiReference.addAttribute("filter", comp.getFilter());
      }
      Element interfaces = osgiReference.addElement("osgi:interfaces");
      for (String infName : comp.getInterfaces()) {
        validateInterface(infName, context.getPluginFile().getName(), serviceReferences);
        context.getExtraImports().add(infName.substring(0, infName.lastIndexOf('.')));
        Element e = interfaces.addElement("beans:value");
        e.setText(infName);
      }
    }
    if (root.elements().size() > 0) {
      context.setShouldRequireSpring(true);
      context.getFileOverrides().put(SPRING_XML, SpringHelper.documentToBytes(springDoc));
    }
  }
}
origin: com.atlassian.plugins/atlassian-plugins-osgi

if (!PluginUtils.doesModuleElementApplyToApplication(component, context.getApplications(), context.getInstallationMode())) {
  continue;
origin: com.atlassian.plugins/atlassian-plugins-osgi

if (PluginUtils.doesModuleElementApplyToApplication(compImport.getSource(), context.getApplications(), context.getInstallationMode()) && regInterfaces.containsAll(compImport.getInterfaces())) {
  found = false;
  break;
origin: com.atlassian.plugins/atlassian-plugins-osgi

if (!PluginUtils.doesModuleElementApplyToApplication(e, context.getApplications(), context.getInstallationMode())) {
  continue;
com.atlassian.plugin.utilPluginUtilsdoesModuleElementApplyToApplication

Javadoc

Determines if a module element applies to the current application by matching the 'application' attribute to the set of applications. If the application is specified, but isn't in the set, we return false

Popular methods of PluginUtils

  • isAtlassianDevMode
  • getDefaultEnablingWaitPeriod
  • doesPluginRequireRestart
    Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation
  • asString
  • getPluginModulesThatRequireRestart
    Gets a list of all the module keys in a plugin that require restart. Looks for the annotation Requir

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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