Package org.rhq.core.clientapi.agent.metadata

Examples of org.rhq.core.clientapi.agent.metadata.PluginMetadataParser


        return null;
    }
   
    private static List<ResourceType> getResourceTypesInPlugin(String pluginUri) throws Exception {
        PluginDescriptor descriptor = AgentPluginDescriptorUtil.loadPluginDescriptorFromUrl(new URI(pluginUri).toURL());
        PluginMetadataParser parser = new PluginMetadataParser(descriptor,
            Collections.<String, PluginMetadataParser> emptyMap());
   
        return parser.getAllTypes();
    }
View Full Code Here


            "          class='TestServer'" + //
            "          discovery='TestServerDiscoveryComponent'/>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType resourceType = findResourceType(parser, "testServer");

        String componentClass = parser.getComponentClass(resourceType);

        assertEquals(componentClass, "org.rhq.plugins.test.TestServer",
            "Expected the package name from the 'package' attribute of the <plugin> element to be included when the "
                + "package is not included in the 'class' attribute.");
    }
View Full Code Here

            "          class='org.rhq.plugins.test.TestServer'" + //
            "          discovery='org.rhq.plugins.test.TestServerDiscoveryComponent'/>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType resourceType = findResourceType(parser, "testServer");

        String discoveryComponent = parser.getDiscoveryComponentClass(resourceType);

        assertEquals(discoveryComponent, "org.rhq.plugins.test.TestServerDiscoveryComponent",
            "Expected the package and class name from 'discovery' attribute when it includes the package name.");
    }
View Full Code Here

            "          class='TestServer'" + //
            "          discovery='TestServerDiscoveryComponent'/>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType resourceType = findResourceType(parser, "testServer");

        String discoveryComponent = parser.getDiscoveryComponentClass(resourceType);

        assertEquals(discoveryComponent, "org.rhq.plugins.test.TestServerDiscoveryComponent",
            "Expected the package name from the 'package' attribute of the <plugin> element to be included when the "
                + "pacage is not included in the 'discovery' attribute.");
    }
View Full Code Here

            "             discovery='TestServiceDiscoveryComponent'/>" + //
            "  </server>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType serverResourceType = findResourceType(parser, "testServer");
        Set<ResourceType> childResourceTypes = serverResourceType.getChildResourceTypes();
        ResourceType child = null;
        for (ResourceType resourceType : childResourceTypes) {
View Full Code Here

            "    </resource-configuration>" + //
            "  </server>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType serverResourceType = findResourceType(parser, "testServer");

        assertNotNull(serverResourceType.getResourceConfigurationDefinition(),
            "Expected resource type to have a resource configuration definition.");
View Full Code Here

            "    </resource-configuration>" + //
            "  </server>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType serverResourceType = findResourceType(parser, "testServer");
        ConfigurationDefinition resourceConfigurationDefinition = serverResourceType
            .getResourceConfigurationDefinition();
View Full Code Here

            "    </resource-configuration>" + //
            "  </server>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);

        ResourceType serverResourceType = findResourceType(parser, "testServer");
        ConfigurationDefinition resourceConfigurationDefinition = serverResourceType
            .getResourceConfigurationDefinition();
View Full Code Here

            "    <resource-configuration configurationFormat='raw'/>" + //
            "  </server>" + //
            "</plugin>");

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(pluginDescriptor, parsersByPlugin);
        assert parser.getAllTypes().size() > 0;
    }
View Full Code Here

    private void verifyDriftDefinition(PluginDescriptor descriptor, String resourceTypeName, String driftDefName,
        AssertDriftTemplateRunnable test) throws Exception {

        Map<String, PluginMetadataParser> parsersByPlugin = new HashMap<String, PluginMetadataParser>(0);
        PluginMetadataParser parser = new PluginMetadataParser(descriptor, parsersByPlugin);
        ResourceType resourceType = findResourceType(parser, resourceTypeName);
        Set<DriftDefinitionTemplate> driftTemplates = resourceType.getDriftDefinitionTemplates();
        DriftDefinitionTemplate driftTemplate = null;
        for (DriftDefinitionTemplate template : driftTemplates) {
            if (template.getName().equals(driftDefName)) {
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.agent.metadata.PluginMetadataParser

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.