Examples of PluginDefinition


Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

     *             the exception.
     */
    @Test
    public void performAction() throws Exception
    {
        final PluginDefinition plugin = context.mock(PluginDefinition.class);
        final Feed feed = context.mock(Feed.class);
        final Feed feed2 = context.mock(Feed.class, "f2");
        final FeedSubscriber feedSub = context.mock(FeedSubscriber.class);
        final FeedSubscriber feedSub2 = context.mock(FeedSubscriber.class, "fs2");

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

     * Test to make sure plugin mapper returns a plugin from it's parent.
     */
    @Test
    public void testThatPluginMapperIsTemplatedWell()
    {
        PluginDefinition plugin = sut.findByUrl("http://www.google1.com");
        assertEquals((Long) (9L), plugin.getUpdateFrequency());
        assertEquals(0, plugin.getNumberOfUsers());
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

    {
        PagedSet<PluginDefinition> beforeDelete = sut.findSortedByRecent(1, 9);

        assertEquals(3, beforeDelete.getTotal());

        PluginDefinition shouldHaveThisPlugin = sut.findByUrl("http://www.google1.com");

        sut.delete(shouldHaveThisPlugin);

        PagedSet<PluginDefinition> afterDelete = sut.findSortedByRecent(1, 9);
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

     * Test the overwritten update count.
     */
    @Test
    public void testUpdateCount()
    {
        PluginDefinition pluginCountTester = sut.findById(1L);
        assertEquals(0, pluginCountTester.getNumberOfUsers());

        pluginCountTester = sut.findById(2L);
        assertEquals(0, pluginCountTester.getNumberOfUsers());
       
        pluginCountTester = sut.findById(3L);
        assertEquals(0, pluginCountTester.getNumberOfUsers());
       
       
        sut.refreshGadgetDefinitionUserCounts();
       
        PluginDefinition pluginCountTesterAfter = sut.findById(1L);
        assertEquals(3, pluginCountTesterAfter.getNumberOfUsers());
       
        pluginCountTesterAfter = sut.findById(2L);
        assertEquals(2, pluginCountTesterAfter.getNumberOfUsers());
       
        pluginCountTesterAfter = sut.findById(3L);
        assertEquals(1, pluginCountTesterAfter.getNumberOfUsers());
       
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

        List<PluginDefinition> defs = new ArrayList<PluginDefinition>();

        for (int i = 0; i < NUMBER_OF_DEFS; i++)
        {
            defs.add(new PluginDefinition());
        }

        final int total = 20;
        final int secondPageStartIndex = 10;
        final int secondPageEndIndex = 19;
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

        List<PluginDefinition> defs = new ArrayList<PluginDefinition>();

        for (int i = 0; i < 2; i++)
        {
            defs.add(new PluginDefinition());
        }

        final int total = 2;

        final PagedSet<PluginDefinition> firstPage = new PagedSet<PluginDefinition>();
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

        final GalleryItemCategory galleryItemCategory = new GalleryItemCategory("CITY");

        final String urlPath = "src/main/webapp/plugin/plugin.xml";

        final PluginDefinition pluginDef = new PluginDefinition();
        pluginDef.setUpdateFrequency(9L);
        pluginDef.setUrl(urlPath);
        pluginDef.setCategory(galleryItemCategory);

        final String username = "validuser";

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
        formData.put("url", urlPath);
        formData.put("category", "CITY");

        context.checking(new Expectations()
        {
            {
                oneOf(userDetails).getParams();
                will(returnValue(formData));

                oneOf(pluginItemGetter).provide(userDetails, formData);
                will(returnValue(pluginDef));

                oneOf(galleryItemCategoryMapper).findByName(GalleryItemType.PLUGIN, "CITY");
                will(returnValue(galleryItemCategory));

                oneOf(pluginItemPopulator).populate(pluginDef, urlPath);

                oneOf(pluginItemSaver).save(pluginDef);
            }
        });

        Serializable[] params = { formData };

        // Make the call
        PluginDefinition actual = (PluginDefinition) sutPlugin.execute(userDetails);

        context.assertIsSatisfied();

        assertEquals("property should be gotten", new Long(9), pluginDef.getUpdateFrequency());
        assertEquals("property should be gotten", urlPath, pluginDef.getUrl());
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.plugins.PluginDefinition

     *
     * @return the PlugintDefinition
     */
    public PluginDefinition create()
    {
        return new PluginDefinition();
    }
View Full Code Here

Examples of org.fenrir.yggdrasil.core.definition.PluginDefinition

          applicationContext.addDefinition(applicationDefinition);
         
          Enumeration<URL> pluginFiles = this.getClass().getClassLoader().getResources(PLUGIN_DEFINITION_FILE);
          while(pluginFiles.hasMoreElements()){
            URL pluginFileURL = pluginFiles.nextElement();
            PluginDefinition pluginDefinition = builder.buildDefinition(pluginFileURL);
            applicationContext.addDefinition(pluginDefinition);
          }
        }
        catch(Exception e){
          log.error("Error recuperant la definició de l'aplicació: {}", e.getMessage(), e);
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.