Package org.rhq.core.domain.plugin

Examples of org.rhq.core.domain.plugin.Plugin


        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setDescription("description");

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getDescription(),
            pluginDescriptor.getDescription(),
            "The plugin.description property should be set to the plugin descriptor description."
        );
    }
View Full Code Here


    public void pluginEnabledFlagShouldBeSetToTrue() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertTrue(plugin.isEnabled(), "The plugin.enabled property should be set to true.");
    }
View Full Code Here

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);

        assertEquals(
            plugin.getPath(),
            pluginURL.getPath(),
            "The plugin.path property should be set to the plugin url path."
        );
    }
View Full Code Here

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);

        assertEquals(
            plugin.getMtime(),
            jarFile.lastModified(),
            "The plugin.mtime property should be set to the last modification time of the plugin JAR file."
        );
    }
View Full Code Here

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setHelp(help);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getHelp(),
            pluginDescriptor.getHelp().getContent().get(0),
            "The plugin.help property should be set to the plugin descriptor help."
        );
    }
View Full Code Here

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);

        assertEquals(
            plugin.getMd5(),
            MessageDigestGenerator.getDigestString(jarFile),
            "The plugin.md5 property should be set to the MD5 sum of the plugin JAR file."
        );
    }
View Full Code Here

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setVersion("2.1");

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getVersion(),
            pluginDescriptor.getVersion(),
            "The plugin.version property should be set to the plugin descriptor version."
        );
    }
View Full Code Here

        File jarFile = createPluginJARFile();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(new PluginDescriptor(), pluginURL);

        assertEquals(
            plugin.getVersion(),
            getVersionFromPluginJarManifest(jarFile),
            "The pliugin.version property should be set to the " + Attributes.Name.IMPLEMENTATION_VERSION +
                " attribute in the plugin JAR manifest when the plugin descriptor version is null."
        );
    }
View Full Code Here

        File jarFile = createPluginJARFileWithoutVersionInManifest();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(new PluginDescriptor(), pluginURL);
    }
View Full Code Here

            PluginDescriptor pluginDescriptor = AgentPluginDescriptorUtil.loadPluginDescriptorFromUrl(file.toURI()
                .toURL());
            testPluginDescriptors.put(entry.getKey(), pluginDescriptor);

            Plugin pluginPojo = new Plugin(PLUGIN_NAME, file.getName());
            pluginPojo.setVersion(pluginDescriptor.getVersion());
            pluginPojo.setMd5(MessageDigestGenerator.getDigestString(file));
            pluginPojo.setMtime(testTimestamps.get(entry.getKey()).getTime());
            testPlugins.put(entry.getKey(), pluginPojo);
        }

        return;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.plugin.Plugin

Copyright © 2018 www.massapicom. 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.