Package com.volantis.devrep.device.api.xml.policy

Examples of com.volantis.devrep.device.api.xml.policy.PolicySet


    private ResourceJiBXTester tester = new ResourceJiBXTester(
            PolicyTestCase.class);

    public void testUnmarshall() throws JiBXException, IOException {

        PolicySet policySet = (PolicySet) tester.unmarshall(PolicySet.class,
                "PolicyTest.xml");

        StringBuffer output = new StringBuffer();
        dumpPolicySet(policySet, output);

        Iterator i =policySet.entries();
          while (i.hasNext())
          {
             PolicyEntry test = (PolicyEntry)i.next();
             if ("testinherit".equals(test.getName())) {
                 assertNotNull(test.getInherit());
View Full Code Here


        // First add all the standard policies to the device.
        String standardDeviceFileName = getXMLFilePath(
                DeviceRepositoryConstants.STANDARD_DEVICE_DIRECTORY,
                deviceName);
        PolicySet standardPolicySet =
            (PolicySet) loadZipObject(standardDeviceFileName, PolicySet.class);
        if (standardPolicySet == null) {
            // No standard device. This is bad since this is mandatory.
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                    "device-definition-missing", deviceName));
        }
        addPolicySetToDevice(standardPolicySet, device);

        // Then add any custom policies to the device.
        String customDeviceFileName = getXMLFilePath(
                DeviceRepositoryConstants.CUSTOM_DEVICE_DIRECTORY,
                deviceName);
        PolicySet customPolicySet =
            (PolicySet) loadZipObject(customDeviceFileName, PolicySet.class);
        if (customPolicySet != null) {
            // we had some custom polices, add them too.
            addPolicySetToDevice(customPolicySet, device);
        }
View Full Code Here

TOP

Related Classes of com.volantis.devrep.device.api.xml.policy.PolicySet

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.