Examples of DeviceODOMElement


Examples of com.volantis.mcs.eclipse.ab.editors.devices.odom.DeviceODOMElement

                                        EXCEPTION_LOCALIZER.
                                        format("device-not-found", params);
                                throw new UndeclaredThrowableException(new
                                        RepositoryException(message));
                            } else {
                                DeviceODOMElement parent = (DeviceODOMElement)
                                        deviceIDElement.getParent();
                                if (parent == null) {
                                    LOGGER.error("device-no-parent", deviceName);
                                    String message =
                                            EXCEPTION_LOCALIZER.
                                            format("device-no-parent",
                                                    deviceName);
                                    throw new UndeclaredThrowableException(new
                                            RepositoryException(message));
                                } else {
                                    parent.submitRestorableName(deviceName);
                                }
                            }
                        } else {
                            deviceIDElement = null;
                        }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.devices.odom.DeviceODOMElement

        // Retrieve the policies element.
        ODOMElement policies = (ODOMElement) deviceElement.getChild(
                DeviceRepositorySchemaConstants.POLICIES_ELEMENT_NAME,
                deviceElement.getNamespace());

        DeviceODOMElement currentPolicy =
                (DeviceODOMElement) context.
                getDeviceRepositoryAccessorManager().
                retrievePolicy(deviceName, policyName);

        UndoRedoManager undoRedoManager = context.getUndoRedoManager();
        undoRedoManager.demarcateUOW();
        try {
            // It may be the case that the user has chosen to override when
            // override was previously selected in which case the resolved policy
            // will come from the current device and we must do some special
            // processing to handle the standard element that should be present
            if (currentPolicy != null) {
                currentPolicy.override((DeviceODOMElement) policy);
            } else {
                // This is an override. Where there is no existing policy so nothing to
                // remove, only something to add.
                policies.addContent(policy);
            }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.devices.odom.DeviceODOMElement

                    resolvePolicy(deviceName, policyName);
            modifier.setPolicy(rdp.policy);

            // Retrieve the policies element and manage its named policy with a
            // standard handler.
            DeviceODOMElement policies = (DeviceODOMElement) deviceElement.getChild(
                    DeviceRepositorySchemaConstants.POLICIES_ELEMENT_NAME,
                    deviceElement.getNamespace());
            policies.submitRestorableName(policyName);

            // Remove and then add the listener again (just in case it has been
            // added already). This should ensure only one listener is added.
            policies.removeChangeListener(policiesElementListener);
            policies.addChangeListener(policiesElementListener);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.devices.odom.DeviceODOMElement

     * method must be called when a user is finished with this instance
     * of PolicyController.
     */
    public void dispose() {
        if (deviceElement != null) {
            DeviceODOMElement policies = (DeviceODOMElement) deviceElement.getChild(
                    DeviceRepositorySchemaConstants.POLICIES_ELEMENT_NAME,
                    deviceElement.getNamespace());
            policies.removeChangeListener(policiesElementListener);
        }
    }
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.