View Javadoc

1   package com.atlassian.plugin.osgi.loader;
2   
3   import com.atlassian.plugin.parsers.DescriptorParser;
4   import com.atlassian.plugin.parsers.DescriptorParserFactory;
5   import com.atlassian.plugin.PluginParseException;
6   
7   import java.io.InputStream;
8   
9   /**
10   * Descriptor parser factory that creates parsers that ignore all component-related modules
11   */
12  public class ComponentFilteringXmlDescriptorParserFactory implements DescriptorParserFactory
13  {
14      /**
15       * Gets an instance that filters the modules "component", "bean", and "spring"
16       * @param source The descriptor source
17       * @return The parser
18       * @throws PluginParseException
19       */
20      public DescriptorParser getInstance(InputStream source) throws PluginParseException
21      {
22          return new FilteringXmlDescriptorParser(source, "component", "component-import", "bean", "spring");
23      }
24  }