Examples of DeviceRepositoryAccessorManager


Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

    /**
     * Adds/removes any optional controls that are required for the current
     * policy type.
     */
    private void updateOptionalTypeControls() {
        DeviceRepositoryAccessorManager dram =
                    context.getDeviceRepositoryAccessorManager();

        Element typeElement = dram.getTypeDefinitionElement(getPolicyName());
        PolicyType type = PolicyType.getType(typeElement);

        // If the optional controls already exist for the policy type, then we
        // do not recreate them - this prevents flicker as related values are
        // changed.
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

    /**
     * Updates the lower and upper range text fields to reflect the value
     * of the range type element.
     */
    public void updateRangeBoundsControls() {
        DeviceRepositoryAccessorManager dram =
                            context.getDeviceRepositoryAccessorManager();
        Element typeElement = dram.getTypeDefinitionElement(getPolicyName());
        Element rangeElement = findDescendantElement(
                    DeviceRepositorySchemaConstants.
                        POLICY_DEFINITION_RANGE_ELEMENT_NAME,
                    typeElement);

View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

     * range text fields
     */
    public void updateRangeBoundsValue() {
        String lowerBound = rangeLowerBoundField.getText();
        String upperBound = rangeUpperBoundField.getText();
        DeviceRepositoryAccessorManager dram =
                            context.getDeviceRepositoryAccessorManager();

        Element typeElement = dram.getTypeDefinitionElement(getPolicyName());
        Element rangeElement = findDescendantElement(
                    DeviceRepositorySchemaConstants.
                        POLICY_DEFINITION_RANGE_ELEMENT_NAME,
                    typeElement);

View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

     * Updates the ListValueBuilder control that allows the selection type
     * keywords to be defined. The keywords are obtained from the policy
     * definition element
     */
    private void updateSelectionValueBuilder() {
        DeviceRepositoryAccessorManager dram =
                    context.getDeviceRepositoryAccessorManager();

        Element typeElement = dram.getTypeDefinitionElement(getPolicyName());
        Namespace namespace = typeElement.getNamespace();
        Element selectionElement = findDescendantElement(
                    DeviceRepositorySchemaConstants.
                        POLICY_DEFINITION_SELECTION_ELEMENT_NAME,
                    typeElement);
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

     * Updates the policy definitions "selection" type element so that it
     * reflects the selection keywords specified in the selectionValueBuilder
     * control
     */
    private void updateSelectionValueKeywords() {
        DeviceRepositoryAccessorManager dram =
                    context.getDeviceRepositoryAccessorManager();

        Element typeElement = dram.getTypeDefinitionElement(getPolicyName());
        Namespace namespace = typeElement.getNamespace();
        Element selectionElement = findDescendantElement(
                    DeviceRepositorySchemaConstants.
                        POLICY_DEFINITION_SELECTION_ELEMENT_NAME,
                    typeElement);
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

     */
    private SelectionValidator createValidator() {

        List selection = new ArrayList();
        try {
            DeviceRepositoryAccessorManager dram =
                    ProjectDeviceRepositoryProvider.getSingleton().
                    getDeviceRepositoryAccessorManager(projectProvider.
                    getProject());
            final String parentNode = dram.
                    getDeviceHierarchyDocument().getRootElement().getName();
            buildSelectionList(selection, contentProvider, parentNode);
        } catch (RepositoryException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        }
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

        dialog = new ElementTreeSelectionDialog(
                this.getShell(), labelProvider, contentProvider);

        try {
            DeviceRepositoryAccessorManager dram =
                    ProjectDeviceRepositoryProvider.getSingleton().
                    getDeviceRepositoryAccessorManager(projectProvider.
                    getProject());
            dialog.setInput(dram.getDeviceHierarchyDocument().getRootElement());
        } catch (RepositoryException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        }
        dialog.setMessage(getResource(KEY_PREFIX_MESSAGE));
        dialog.setTitle(getResource(KEY_PREFIX_TITLE));
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

        Element element = null;
        String deviceName = getText().getText();

        try {
            // get the device from the text box.
            DeviceRepositoryAccessorManager dram =
                    ProjectDeviceRepositoryProvider.getSingleton().
                    getDeviceRepositoryAccessorManager(projectProvider.
                    getProject());
            if ((deviceName != null) && (!deviceName.equals("") &&
                    dram.deviceExists(deviceName))) {
                element = dram.getHierarchyDeviceElement(deviceName);
                if (element != null) {
                    dialog.setInitialSelection(element);
                }
            } else {   // try the previous selection
                IProject project = projectProvider.getProject();
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

                    (DeviceRepositoryBrowserPage) obj;
            initPage(page);
            page.createControl(getPageBook());

            // Use the manager to retrieve version and revision information
            DeviceRepositoryAccessorManager deviceRAM =
                    page.getDeviceRepositoryAccessorManager();
            String version = deviceRAM.getVersion();
            String revision = deviceRAM.getRevision();

            // Create and set the title.
            MessageFormat titleFormat = new MessageFormat(TITLE_FORMAT);
            String title = titleFormat.format(new Object[]{version, revision});
            this.setTitle(title);
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.DeviceRepositoryAccessorManager

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager deviceRAM =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                PolicyValueModifierFactory pvmodFactory =
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.