Package com.volantis.devrep.repository.api.devices.policy.values

Examples of com.volantis.devrep.repository.api.devices.policy.values.PolicyValueFactory


                    PolicyTypeFactory.getDefaultInstance();
            accessor.addPolicyDescriptor(null, "policyname",
                                         policyTypeFactory.createTextPolicyType());

            // Create the factory
            PolicyValueFactory factory = PolicyValueFactory.createInstance(accessor);

            Device device = context.getDevice().getDevice();
            String charset = selector.getOutputCharset(rHeaders, device);
            if (expected != null) {
                assertEquals("Expected value should match", expected, charset);
View Full Code Here


                return "Policy Value";
            }
        };

        // Create the factory
        PolicyValueFactory factory = new DefaultPolicyValueFactory(accessor);

        // Call the creation method on the factory
        PolicyValue value = factory.createPolicyValue(device, "policyname");

        // Check test outcome
        assertNotNull("Policy value should exist", value);
        assertTrue("Based on test setup expected a TextPolicyValue",
                   value instanceof TextPolicyValue);
View Full Code Here

                return null;
            }
        };

        // Create the factory
        PolicyValueFactory factory = new DefaultPolicyValueFactory(accessor);

        // Call the creation method on the factory
        PolicyValue value = factory.createPolicyValue(device, "policyname");

        // Check test outcome
        assertNull("Policy value should not exist", value);
    }
View Full Code Here

                return "item 1, item 2, item 3, item 4";
            }
        };

        // Create the factory
        PolicyValueFactory factory = new DefaultPolicyValueFactory(accessor);

        // Call the creation method on the factory
        PolicyValue value = factory.createPolicyValue(device, "policyname");

        // Check test outcome
        assertNotNull("Policy value should exist", value);
        assertTrue("Based on test setup expected a OrderedSetPolicyValue",
                   value instanceof OrderedSetPolicyValue);
View Full Code Here

        policies.put("policyname.field2", "true");
        policies.put("policyname.field3", "100");
        DefaultDevice device = new DefaultDevice(null, policies, null);

        // Create the factory
        PolicyValueFactory factory = new DefaultPolicyValueFactory(accessor);

        // Call the creation method on the factory
        PolicyValue value = factory.createPolicyValue(device, "policyname");

        // Check test outcome
        assertNotNull("Policy value should exist", value);
        assertTrue("Based on test setup expected a StructurePolicyValue",
                   value instanceof StructurePolicyValue);
View Full Code Here

                DefaultDevice device = null;
                if ("PC".equalsIgnoreCase(deviceName) ||
                        "WAP-Handset".equalsIgnoreCase(deviceName) ||
                        "Custom".equalsIgnoreCase(deviceName)) {
                    device = new DefaultDevice(deviceName, new HashMap(),
                        new PolicyValueFactory() {
                            public PolicyValue createPolicyValue(
                                DefaultDevice device, String policyName) {
                                return null;
                            }
                        });
View Full Code Here

        super.setUp();
        policies = new HashMap();
        DefaultDevice masterDevice =
            new DefaultDevice(
                "Master", policies,
                new PolicyValueFactory() {
                    public PolicyValue createPolicyValue(
                        DefaultDevice device, String policyName) {
                        return null;
                    }
                });
View Full Code Here

            DefaultDevice parent) {

        HashMap policies = new HashMap();
        policies.putAll(policyValues);
        DefaultDevice device = new DefaultDevice(name, policies,
            new PolicyValueFactory() {
                public PolicyValue createPolicyValue(
                    DefaultDevice device, String policyName) {
                    return null;
                }
            });
View Full Code Here

            DefaultDevice parent) {

        HashMap policies = new HashMap();
        policies.putAll(policyValues);
        DefaultDevice device = new DefaultDevice(name, policies,
            new PolicyValueFactory() {
                public PolicyValue createPolicyValue(
                    DefaultDevice device, String policyName) {
                    return null;
                }
            });
View Full Code Here

TOP

Related Classes of com.volantis.devrep.repository.api.devices.policy.values.PolicyValueFactory

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.