Package org.rhq.enterprise.server.resource.group

Examples of org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal


        if (forward != null) {
            return forward;
        }

        try {
            ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
            ResourceGroup group = groupManager.getResourceGroupById(subject, groupId, null);
            groupForm.updateResourceGroup(group);
            groupManager.updateResourceGroup(subject, group);

            log.trace("saving group [" + group.getName() + "]" + " with attributes " + groupForm);

            RequestUtils.setConfirmation(request, "resource.group.inventory.confirm.EditGeneralProperties");
            return returnSuccess(request, mapping, forwardParams, BaseAction.YES_RETURN_PATH);
View Full Code Here


                if (log.isDebugEnabled()) {
                    log.debug("Autogroup p=" + parent + ", ct=" + resourceTypeId);
                }
            } else if (groupId > 0) // compat (or mixed) group
            {
                ResourceGroupManagerLocal resourceGroupManager = LookupUtil.getResourceGroupManager();
                ResourceGroup group = resourceGroupManager.getResourceGroupById(subject, groupId, null);
                request.setAttribute(AttrConstants.GROUP_ID, groupId);
                request.setAttribute(AttrConstants.TITLE_PARAM_ATTR, group.getName());
                // TODO more ?
            } else if ((resourceTypeId > 0) && (parent == -1)) // MeasurementDefinition
            {
View Full Code Here

    @Test(groups = "integration.ejb3")
    public void testMixedGroupCompositeQuery() throws Exception {
        getTransactionManager().begin();
        try {
            ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
            SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
            PageControl pc = new PageControl(1, 5, new OrderingField("rg.name", PageOrdering.ASC));

            //Subject subject = subjectManager.loginUnauthenticated("ghinkle");
            Subject subject = subjectManager.getOverlord();
            subject = createSession(subject);
            List<ResourceGroupComposite> groups = groupManager.findResourceGroupComposites(subject,
                GroupCategory.MIXED, null, null, null, null, null, null, pc);
            System.out.println("Found mixed groups: " + groups.size());
            for (ResourceGroupComposite group : groups) {
                System.out.println("\t" + group);
            }
View Full Code Here

    @Test(groups = "integration.ejb3")
    public void testCompatibleGroupCompositeQuery() throws Exception {
        getTransactionManager().begin();
        try {
            ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
            SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
            PageControl pc = new PageControl(0, 5, new OrderingField("rg.name", PageOrdering.ASC));
            PageList<ResourceGroupComposite> groups = groupManager.findResourceGroupComposites(
                subjectManager.getOverlord(), GroupCategory.COMPATIBLE, null, null, null, null, null, null, pc);
            System.out.println("Found compatible groups: " + groups.getTotalSize());
            for (ResourceGroupComposite group : groups) {
                System.out.println("\t" + group);
            }
View Full Code Here

            } catch (ParameterNotFoundException e) {
                // not a problem, this can be null
            }

            Subject subject = RequestUtils.getSubject(request);
            ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
            ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager();

            // auto-group support (of plats?)
            // request.setAttribute(Constants.CONTROL_ENABLED_ATTR, Boolean.FALSE);
            // request.setAttribute(Constants.PERFORMANCE_SUPPORTED_ATTR, Boolean.FALSE);

            //            AppdefEntityTypeID aetid = null;
            //            if (null == groupId/* || groupId instanceof AppdefEntityTypeID*/) {
            //                // this can happen if we're an auto-group of platforms
            //
            //                try {
            //                    if (groupId != null)
            //                        aetid = (AppdefEntityTypeID) groupId;
            //                    else
            //                        aetid = new AppdefEntityTypeID(
            //                            RequestUtils.getStringParameter(
            //                                request, Constants.APPDEF_RES_TYPE_ID));
            //
            ///*                    AppdefResourceTypeValue resourceTypeVal =
            //                        appdefBoss.findResourceTypeById(sessionId.intValue(),
            //                                                        aetid);*/
            //                    ResourceType resourceType = resourceTypeManager.getResourceTypeById(subject, aetid.getId());
            //
            //                    //request.setAttribute(Constants.RESOURCE_TYPE_ATTR, resourceTypeVal);
            //                    request.setAttribute(Constants.RESOURCE_TYPE_ATTR, resourceType);
            //                    // Set the title parameters
            //                    //request.setAttribute(Constants.TITLE_PARAM_ATTR, resourceTypeVal.getName());
            //                    request.setAttribute(Constants.TITLE_PARAM_ATTR, resourceType.getName());
            //                } catch (Exception e) {
            //                    // if this param isnt found, leave aetid null
            //                }
            //            } else {
            log.trace("finding group [" + groupId + "]");

            ResourceGroup group = groupManager.getResourceGroupById(subject, groupId, null);
            GroupCategory category = group.getGroupCategory();

            log.trace("finding most recent modifier for resource [" + groupId + "]");
            String modifier = group.getModifiedBy();

View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal

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.