Package com.volantis.devrep.repository.accessors

Examples of com.volantis.devrep.repository.accessors.EclipseDeviceRepository.retrieveDeviceElement()


                assertNull("policy should not have been found.", policy);


                // now retrieve the policy from the repository again to see if we
                // actually wrote it out.
                device = accessor.retrieveDeviceElement("PC");
                policy = retrievePolicy(device, "custom.mypolicy");
                assertEquals("Should have seen a different value for the policy.",
                        "xyz", policy.getAttributeValue("value"));
            }
        });
View Full Code Here


                File backupRepository = new File(repository.getPath() + ".bak");
                assertFalse("Backup repository should NOT exist",
                        backupRepository.exists());

                Map devices = new HashMap();
                Element device = accessor.retrieveDeviceElement("PC");
                Element policy = retrievePolicy(device, "rendermode");
                policy.setAttribute("value", "wibble");
                devices.put("PC", device);

                accessor.writeDeviceElements(devices);
View Full Code Here

                accessor.writeDeviceElements(devices);
                accessor.saveRepositoryArchive();

                // now retrieve the policy from the repository again to see if we
                // actually wrote it out.
                device = accessor.retrieveDeviceElement("PC");
                policy = retrievePolicy(device, "rendermode");
                assertEquals("Should have seen a different value for the policy.",
                        "wibble", policy.getAttributeValue("value"));
            }
        });
View Full Code Here

                File backupRepository = new File(repository.getPath() + ".bak");
                assertFalse("Backup repository should NOT exist",
                        backupRepository.exists());

                Element device = accessor.retrieveDeviceElement("PC");
                Element policies = device.getChild("policies", device.getNamespace());
                Element newPolicy = new Element("policy", device.getNamespace());
                newPolicy.setAttribute("name", "custom.mypolicy");
                newPolicy.setAttribute("value", "xyz");
                policies.addContent(newPolicy);
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.