Package org.rhq.core.domain.resource

Examples of org.rhq.core.domain.resource.ResourceType


        createPlugin("child1-plugin.jar", "1.0", "child1_plugin_v1.xml");
        if (ignoreTypes) {
            ignoreType(TYPE_NAME_CHILD1, PLUGIN_NAME_CHILD1);
        }

        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD1, PLUGIN_NAME_CHILD1);
        assert resourceType.getName().equals(TYPE_NAME_CHILD1);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD1);
        assert resourceType.isIgnored() == ignoreTypes;
        assertVersion1(resourceType);

        // in our child #1 plugin, our extended type is actually a child of child #1 plugin's root type
        // here we want to make sure that hierarchy remains intact with our extended type - the parent
        // of our extended type should be this child #1 root type
        assert resourceType.getParentResourceTypes() != null;
        assert resourceType.getParentResourceTypes().size() == 1;
        assert resourceType.getParentResourceTypes().iterator().next().getName().equals("OuterServerA");
    }
View Full Code Here


        createPlugin("child2-plugin.jar", "1.0", "child2_plugin_v1.xml");
        if (ignoreTypes) {
            ignoreType(TYPE_NAME_CHILD2, PLUGIN_NAME_CHILD2);
        }

        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD2, PLUGIN_NAME_CHILD2);
        assert resourceType.getName().equals(TYPE_NAME_CHILD2);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD2);
        assert resourceType.isIgnored() == ignoreTypes;
        assertVersion1(resourceType);
    }
View Full Code Here

    private void registerParentPluginV2(boolean ignoreTypes) throws Exception {
        // register the plugin, load the new type and test to make sure its what we expect
        createPlugin("parent-plugin.jar", "2.0", "parent_plugin_v2.xml");

        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_PARENT, PLUGIN_NAME_PARENT);
        assert resourceType.getName().equals(TYPE_NAME_PARENT);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_PARENT);
        assert resourceType.isIgnored() == ignoreTypes;
        assertVersion2(resourceType);
    }
View Full Code Here

        assertVersion2(resourceType);
    }

    private void checkChild1Plugin(boolean ignoreTypes) throws Exception {
        // load the child #1 type and test to make sure it has been updated to what we expect
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD1, PLUGIN_NAME_CHILD1);
        assert resourceType.getName().equals(TYPE_NAME_CHILD1);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD1);
        assert resourceType.isIgnored() == ignoreTypes;
        assertVersion2(resourceType);

        // in our child #1 plugin, our extended type is actually a child of child #1 plugin's root type
        // here we want to make sure that hierarchy remains intact with our extended type - the parent
        // of our extended type should be this child #1 root type
        assert resourceType.getParentResourceTypes() != null;
        assert resourceType.getParentResourceTypes().size() == 1;
        assert resourceType.getParentResourceTypes().iterator().next().getName().equals("OuterServerA");
    }
View Full Code Here

        assert resourceType.getParentResourceTypes().iterator().next().getName().equals("OuterServerA");
    }

    private void checkChild2Plugin(boolean ignoreTypes) throws Exception {
        // load the child #2 type and test to make sure it has been updated to what we expect
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD2, PLUGIN_NAME_CHILD2);
        assert resourceType.getName().equals(TYPE_NAME_CHILD2);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD2);
        assert resourceType.isIgnored() == ignoreTypes;
        assertVersion2(resourceType);
    }
View Full Code Here

        c.addFilterIgnored(null);
        c.setStrict(true);
        c.fetchParentResourceTypes(true);
        c.fetchOperationDefinitions(true);
        List<ResourceType> t = resourceTypeMgr.findResourceTypesByCriteria(subjectMgr.getOverlord(), c);
        ResourceType resourceType = t.get(0);
        return resourceType;
    }
View Full Code Here

    private void registerParentPluginV1() throws Exception {
        // register the plugin, load the new type and test to make sure its what we expect
        createdJarFiles.add(createPluginJarFile("parent-plugin.jar", "parent_plugin_v1.xml"));
        getPluginScannerService().startDeployment(); // first time we need to scan so call startDeployment which will call scanAndRegister
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_PARENT, PLUGIN_NAME_PARENT);
        assert resourceType.getName().equals(TYPE_NAME_PARENT);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_PARENT);
        assertVersion1(resourceType);
    }
View Full Code Here

    private void registerChild1PluginV1() throws Exception {
        // register the plugin, load the new type and test to make sure its what we expect
        createdJarFiles.add(createPluginJarFile("child1-plugin.jar", "child1_plugin_v1.xml"));
        getPluginScannerService().scanAndRegister();
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD1, PLUGIN_NAME_CHILD1);
        assert resourceType.getName().equals(TYPE_NAME_CHILD1);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD1);
        assertVersion1(resourceType);

        // in our child #1 plugin, our extended type is actually a child of child #1 plugin's root type
        // here we want to make sure that hierarchy remains intact with our extended type - the parent
        // of our extended type should be this child #1 root type
        assert resourceType.getParentResourceTypes() != null;
        assert resourceType.getParentResourceTypes().size() == 1;
        assert resourceType.getParentResourceTypes().iterator().next().getName().equals("OuterServerA");
    }
View Full Code Here

    private void registerChild2PluginV1() throws Exception {
        // register the plugin, load the new type and test to make sure its what we expect
        createdJarFiles.add(createPluginJarFile("child2-plugin.jar", "child2_plugin_v1.xml"));
        getPluginScannerService().scanAndRegister();
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_CHILD2, PLUGIN_NAME_CHILD2);
        assert resourceType.getName().equals(TYPE_NAME_CHILD2);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD2);
        assertVersion1(resourceType);
    }
View Full Code Here

    private void registerParentPluginV2() throws Exception {
        // register the plugin, load the new type and test to make sure its what we expect
        createdJarFiles.add(createPluginJarFile("parent-plugin.jar", "parent_plugin_v2.xml"));
        getPluginScannerService().scanAndRegister();
        ResourceType resourceType = loadResourceTypeFully(TYPE_NAME_PARENT, PLUGIN_NAME_PARENT);
        assert resourceType.getName().equals(TYPE_NAME_PARENT);
        assert resourceType.getPlugin().equals(PLUGIN_NAME_PARENT);
        assertVersion2(resourceType);
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.resource.ResourceType

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.