Examples of DefaultDevice


Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

                assertNull("No device should be found", device);

                deviceName = "Nokia-6210";
                device = repository.getDevice(deviceName);
                assertEquals("Name should match: ", deviceName, device.getName());
                DefaultDevice fallbackDevice =
                    ((DefaultDevice)device).getFallbackDevice();
                assertNotNull(fallbackDevice);
                assertEquals("Fallback name should match: ", "Nokia-Series7110",
                        fallbackDevice.getName());
            }
        });
    }
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

                new DeviceRepositoryAccessorTest() {
                    public void runTest(
                            AbstractDeviceRepositoryAccessor accessor,
                            RepositoryConnection connection)
                            throws Exception {
                        DefaultDevice device1 =
                            accessor.retrieveDevice(connection,"PC");

                        DefaultDevice device2 =
                            accessor.retrieveDevice(connection, "PC");

                        Map policies1 = new HashMap();
                        for (Iterator iter = device1.getPolicyNames();
                                iter.hasNext(); ) {
                            final String name = (String) iter.next();
                            policies1.put(name, device1.getPolicyValue(name));
                        }
                        Map policies2 = new HashMap();
                        for (Iterator iter = device2.getPolicyNames();
                                iter.hasNext(); ) {
                            final String name = (String) iter.next();
                            policies2.put(name, device2.getPolicyValue(name));
                        }

                        List keys1 = new ArrayList(policies1.keySet());
                        List keys2 = new ArrayList(policies2.keySet());
                        Collections.sort(keys1);
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

        devicesWithXWAPProfileSecondaryIDs.add("XHTML-Handset");
        devicesWithXWAPProfileSecondaryIDs.add("Samsung-SprintPCS");

        List devices = deviceRepository.getDevices("*");
        for (int i = 0; i < devices.size(); i++) {
            DefaultDevice device = (DefaultDevice) deviceRepository.getDevice(
                    (String)devices.get(i));
            if (device.getSecondaryIDHeaderName() != null) {
                if (DevicesHelper.X_WAP_PROFILE.equals(
                        device.getSecondaryIDHeaderName())) {
                    assertTrue("Secondary device ID should match",
                            devicesWithXWAPProfileSecondaryIDs.contains(
                                    device.getName()));
                 }
            }
            // The map of is keyed on the regular expression which maps to the
            // revision number. This always seems to be 0 in an XML repository.
            Map patterns = device.getPatterns();
            if (patterns != null) {
                Set keys = patterns.keySet();
                Iterator iterator = keys.iterator();
                while (iterator.hasNext()) {
                    String regularExpression = (String) iterator.next();
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

    }

    public void testOpenPaneWithContainerCell() throws Exception {
        privateSetUp();
        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice(DEVICE_NAME, new HashMap(), null)));
       
        DOMOutputBuffer dom = new DOMOutputBuffer();
        Element containerCell;

        dom.initialise();
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

        resetElement();
        context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        context.setDeviceName("PC");
        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice(DEVICE_NAME, new HashMap(), null)));
        protocol.setMarinerPageContext(context);

        // INPUT: no style class, a device name that doesn't end with 'Netscape4'.
        // EXPECTED: Should result no borderwidth and style class.
        GridAttributes attributes = new GridAttributes();
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

        context.pushRequestContext(requestContext);
        protocol.setMarinerPageContext(context);
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();
        context.setCurrentOutputBuffer(buffer);
        InternalDevice d = INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice("Netscape4", new HashMap(), null));
        context.setDevice(d);
        context.setDeviceName("Netscape4");

        // Activate the device layout.
        // Activate the device layout.
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

        buffer.initialise();
        HashMap policies = new HashMap();
        policies.put("pixelsx", "120");
        policies.put("pixelsy", "165");
        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice("mms_smil", policies, null)));
        context.setDevicePolicyValue(
            DevicePolicyConstants.CSS_MULTICLASS_SUPPORT,
            DevicePolicyConstants.CSS_MULTICLASS_SUPPORT_NONE);

View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

        buffer.initialise();
        HashMap policies = new HashMap();
        policies.put("pixelsx", "120");
        policies.put("pixelsy", "165");
        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice("mms_smil", policies, null)));
        context.setDevicePolicyValue(
            DevicePolicyConstants.CSS_MULTICLASS_SUPPORT,
            DevicePolicyConstants.CSS_MULTICLASS_SUPPORT_NONE);
    }
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

    public String getProfileDescription(String profileKey) {
       
        String description = null;
        try {
            // Retrive our device;
            DefaultDevice device = accessor.retrieveDevice(connection, profileKey);
            if (device != null) {
                // Describe our device.
                description = describe(device);
            }
       
View Full Code Here

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice

    public Profile getProfile(String profileKey) {
       
        Profile profile = null;
        try {
            // Retrive our device
            DefaultDevice device = accessor.retrieveDevice(connection, profileKey);
            if (device != null) {
                // Adapt our device into a UCP profile.
                profile = adapt(device);
            }
       
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.