Package org.rhq.core.domain.resource

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


                public void onChange(final ChangeEvent event) {
                    // by canceling the selection remain unchanged if the user does not confirm. If he does confirm
                    // the dialog gets destroyed anyway.
                    event.cancel();

                    final MissingPolicy newPolicy = MissingPolicy.valueOf((String) event.getValue());
                    String msg = MSG.view_adminConfig_missingResourcePolicy_confirm(getPolicyDisplay(newPolicy),
                        AncestryUtil.getFormattedType(type));

                    SC.ask(MSG.common_msg_areYouSure(), msg, new BooleanCallback() {
                        public void execute(Boolean value) {
                            if (Boolean.TRUE.equals(value)) {
                                // call server to flip flag on type
                                GWTServiceLookup.getResourceTypeGWTService().setResourceTypeMissingPolicy(type.getId(),
                                    newPolicy, new AsyncCallback<Void>() {
                                        public void onSuccess(Void result) {
                                            // this type reference is inside our cache so make sure we update it
                                            type.setMissingPolicy(newPolicy);

                                            String msg = MSG.view_adminConfig_missingResourcePolicy_success(
                                                getPolicyDisplay(newPolicy), type.getName());
                                            CoreGUI.getMessageCenter().notify(new Message(msg));

                                            // refresh the grid
                                            recordClickEvent.getRecord()
                                                .setAttribute(ATTR_POLICY, newPolicy.toString());
                                            recordClickEvent.getViewer().markForRedraw();

                                            MissingPolicyDialog.this.destroy();
                                        }
View Full Code Here

TOP

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

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.