Examples of PluginRepository


Examples of org.b3log.solo.repository.PluginRepository

        LOGGER.log(Level.DEBUG, "Processing an event[type={0}, data={1}] in listener[className={2}]",
            new Object[] {event.getType(), plugins, PluginRefresher.class.getName()});

        final LatkeBeanManager beanManager = Lifecycle.getBeanManager();
        final PluginRepository pluginRepository = beanManager.getReference(PluginRepositoryImpl.class);
       
        final Transaction transaction = pluginRepository.beginTransaction();
       
        try {
            final PluginMgmtService pluginMgmtService = beanManager.getReference(PluginMgmtService.class);
           
            pluginMgmtService.refresh(plugins);
View Full Code Here

Examples of org.b3log.solo.repository.PluginRepository

     *
     * @throws Exception exception
     */
    @Test
    public void test() throws Exception {
        final PluginRepository pluginRepository = getPluginRepository();
    }
View Full Code Here

Examples of org.b3log.solo.repository.PluginRepository

     *
     * @throws Exception exception
     */
    @Test
    public void test() throws Exception {
        final PluginRepository pluginRepository = getPluginRepository();
    }
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

  DefaultI18n manager;

  @Before
  public void before() {
    PluginRepository pluginRepository = mock(PluginRepository.class);
    List<PluginMetadata> plugins = Arrays.asList(newPlugin("core"), newPlugin("sqale"), newPlugin("frpack"), newPlugin("checkstyle"), newPlugin("other"));
    when(pluginRepository.getMetadata()).thenReturn(plugins);

    manager = new DefaultI18n(pluginRepository, system2);
    manager.doStart(getClass().getClassLoader());
  }
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

  public void deployRubyRailsApps_no_apps() throws Exception {
    ServerFileSystem fileSystem = mock(ServerFileSystem.class);
    File tempDir = this.temp.getRoot();
    when(fileSystem.getTempDir()).thenReturn(tempDir);

    PluginRepository pluginRepository = mock(PluginRepository.class);
    when(pluginRepository.getMetadata()).thenReturn(Collections.<PluginMetadata>emptyList());
    new RailsAppsDeployer(fileSystem, pluginRepository).start();

    File appDir = new File(tempDir, "ror");
    assertThat(appDir.isDirectory(), is(true));
    assertThat(appDir.exists(), is(true));
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

    // but we don' have the "php-model.xml" one
    PluginMetadata phpPluginMetadata = mock(PluginMetadata.class);
    when(phpPluginMetadata.getKey()).thenReturn("php");

    PluginRepository repository = mock(PluginRepository.class);
    when(repository.getMetadata()).thenReturn(Lists.newArrayList(csharpPluginMetadata, phpPluginMetadata));
    FakePlugin fakePlugin = new FakePlugin();
    when(repository.getPlugin(anyString())).thenReturn(fakePlugin);
    modelFinder = new DebtModelPluginRepository(repository, TEST_XML_PREFIX_PATH);

    // when
    modelFinder.start();
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

  @Test
  public void should_create_plugin_referential() {
    PluginMetadata metadata = mock(DefaultPluginMetadata.class);
    when(metadata.getKey()).thenReturn("foo");
    PluginRepository pluginRepository = mock(PluginRepository.class);
    when(pluginRepository.getMetadata()).thenReturn(newArrayList(metadata));
    InstalledPluginReferentialFactory installedPluginReferentialFactory = new InstalledPluginReferentialFactory(pluginRepository);

    assertThat(installedPluginReferentialFactory.getInstalledPluginReferential()).isNull();
    installedPluginReferentialFactory.start();
    assertThat(installedPluginReferentialFactory.getInstalledPluginReferential()).isNotNull();
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

    assertThat(installedPluginReferentialFactory.getInstalledPluginReferential().getPlugins()).hasSize(1);
  }

  @Test(expected = RuntimeException.class)
  public void should_encapsulate_exception() {
    PluginRepository pluginRepository = mock(PluginRepository.class);
    when(pluginRepository.getMetadata()).thenThrow(new IllegalArgumentException());
    InstalledPluginReferentialFactory installedPluginReferentialFactory = new InstalledPluginReferentialFactory(pluginRepository);
    installedPluginReferentialFactory.start();
  }
View Full Code Here

Examples of org.sonar.api.platform.PluginRepository

    when(fileSystem.getPluginIndex()).thenReturn(index);
  }

  @Test
  public void shouldWriteIndex() throws IOException {
    PluginRepository repository = mock(PluginRepository.class);
    PluginMetadata sqale = newMetadata("sqale");
    PluginMetadata checkstyle = newMetadata("checkstyle");
    when(repository.getMetadata()).thenReturn(Arrays.asList(sqale, checkstyle));

    new GeneratePluginIndex(fileSystem, repository).start();

    List<String> lines = FileUtils.readLines(index);
    assertThat(lines.size(), Is.is(2));
View Full Code Here

Examples of se.sics.mspsim.util.PluginRepository

        if (registry.getComponent(name) != null) {
          context.err.println("Another component with name '" + name + "' is already installed");
          return 1;
        }
        Class<?> pluginClass = null;
        PluginRepository plugins = (PluginRepository) registry.getComponent("pluginRepository");
        try {
          try {
            pluginClass = plugins != null ? plugins.loadClass(className) :
              Class.forName(className);
          } catch (ClassNotFoundException e) {
            String newClassName = "se.sics.mspsim.plugin." + className;
            pluginClass = plugins != null ? plugins.loadClass(newClassName) :
              Class.forName(newClassName);
          }
          Object component = pluginClass.newInstance();
          registry.registerComponent(name, component);
          return 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.