Examples of ResourceUpgradeReport


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

    public ResourceUpgradeReport upgrade(ResourceUpgradeContext<PostgresServerComponent<?>> inventoriedResource) {
        String currentResourceKey = inventoriedResource.getResourceKey();

        if (!currentResourceKey.startsWith(OID_PREFIX)) {
            // currentResourceKey is the user name
            ResourceUpgradeReport report = new ResourceUpgradeReport();
            try {
                long userOid = getUserOid(currentResourceKey, inventoriedResource.getParentResourceComponent()
                    .getPooledConnectionProvider());
                if (userOid == -1) {
                    LOG.warn("Could not find oid of user [" + currentResourceKey + "]");
                    return null;
                }
                report.setNewResourceKey(createResourceKey(userOid));
                return report;
            } catch (SQLException e) {
                LOG.warn("Exception thrown while searching oid of user [" + currentResourceKey + "]", 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.