Package org.rhq.core.pc.upgrade.plugins.multi.base

Examples of org.rhq.core.pc.upgrade.plugins.multi.base.BaseResourceComponentInterface


    }

    protected void addChildrenToFail(Resource parent, ResType childResType, int... childrenOrdinals) {
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        ResourceContainer parentContainer = inventoryManager.getResourceContainer(parent);
        BaseResourceComponentInterface parentComponent = (BaseResourceComponentInterface) parentContainer
            .getResourceComponent();
        if (parentComponent==null) {
            throw new RuntimeException("Did not get a container for parent " + parent.getName() + ", " + parent.getUuid() + ", " + parent.getId());
        }

        Map<String, Set<Integer>> childrenToFail = new HashMap<String, Set<Integer>>();
        Set<Integer> ordinals = new HashSet<Integer>();
        for (int i = 0; i < childrenOrdinals.length; ++i) {
            ordinals.add(childrenOrdinals[i]);
        }

        childrenToFail.put(childResType.getResourceTypeName(), ordinals);

        Configuration newPluginConfig = parentComponent.createPluginConfigurationWithMarkedFailures(childrenToFail);

        try {
            int resourceId = parent.getId();
            inventoryManager.updatePluginConfiguration(resourceId, newPluginConfig);
        } catch (InvalidPluginConfigurationClientException e) {
View Full Code Here

TOP

Related Classes of org.rhq.core.pc.upgrade.plugins.multi.base.BaseResourceComponentInterface

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.