Package com.volantis.mcs.devices

Examples of com.volantis.mcs.devices.InternalDevice


        Volantis volantis = new Volantis();
        TestMarinerPageContext pageContext = new TestMarinerPageContext();
        pageContext.setVolantis(volantis);
        // Initialise the device.
        pageContext.setDeviceName("Unknown Device");
        InternalDevice device = InternalDeviceTestHelper.createTestDevice();
        pageContext.setDevice(device);

        pageContext.setProtocol(protocol);
        // Set the protocols configuration
        ProtocolsConfiguration config = new ProtocolsConfiguration();
View Full Code Here


     *
     * @return an instance of the class that is being tested.
     */
    private TransformingVisitor createVisitor() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        ProtocolBuilder builder = new ProtocolBuilder();
        TestDOMProtocol protocol = (TestDOMProtocol) builder.build(
                new TestProtocolRegistry.TestDOMProtocolFactory(),
                internalDevice);
View Full Code Here

    // Javadoc inherited from superclass
    protected void setUp() throws Exception {
        super.setUp();

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        setDOMProtocol(createDOMProtocol(internalDevice));

        helper = new StrictStyledDOMHelper(null);
View Full Code Here

        if (deviceWidth != 0) {
            dev.setPolicyValue("pixelsx",
                    StringConvertor.valueOf(deviceWidth));
        }

        final InternalDevice internalDevice =
            INTERNAL_DEVICE_FACTORY.createInternalDevice(dev);
        appContext.setDevice(internalDevice);
        pageContext.setDevice(internalDevice);

        ProtocolBuilder builder = new ProtocolBuilder();
View Full Code Here

     */
    protected InternalDevice resolveDevice(Volantis volantisBean,
                                           MarinerRequestContext requestContext)
            throws RepositoryException {

        InternalDevice device = null;
        MarinerSessionContext sessionContext =
                ContextInternals.getEnvironmentContext(requestContext)
                .getSessionContext();

        // We only want to resolve the device once per session.
View Full Code Here

            throw new IllegalStateException
                    ("Volantis bean has not been initialised");
        }

        // Resolve the device (once for this session).
        InternalDevice device = resolveDevice(
                volantisBean,
                requestContext);

        // Create the application context
        ApplicationContext applicationContext =
View Full Code Here

        helper = new StrictStyledDOMHelper(null);
    }

    public void testOptimization() throws Exception {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        ProtocolBuilder builder = new ProtocolBuilder();
        DOMProtocol protocol = (DOMProtocol) builder.build(
                new TestProtocolRegistry.TestXHTMLFullFactory(),
                internalDevice);
View Full Code Here

    protected void writeMenuItem(
            DOMOutputBuffer outputBuffer,
            MenuItem menuItem)
            throws ProtocolException {

        InternalDevice device = pageContext.getDevice();
        boolean isAccesskeyPrefixKeyNeeded =
                !device.getBooleanPolicyValue(DevicePolicyConstants.
                                              SUPPORTS_WML_ACCESSKEY_AUTOMAGIC_NUMBER_DISPLAY);

        // Extract the href from the menu item.
        LinkAssetReference reference = menuItem.getHref();
        String href = reference.getURL();
View Full Code Here

        final DefaultDevice defaultDevice =
            new DefaultDevice("Test Device", new HashMap(), null);
        defaultDevice.setPolicyValue(
            DevicePolicyConstants.SUPPORTS_JAVASCRIPT, "true");
        InternalDevice device =
            INTERNAL_DEVICE_FACTORY.createInternalDevice(defaultDevice);

        return (DOMProtocol)builder.build(
            new ProtocolRegistry.HTMLVersion4_0Factory(), device);
    }
View Full Code Here

                    ContextInternals.getApplicationContext(requestContext);
            // If we don't have a session context device yet then get it from the
            // applicationContext.

            MarinerSessionContext sessionContext = environmentContext.getSessionContext();
            InternalDevice device = sessionContext.getDevice();
            if (device == null) {
                device = applicationContext.getDevice();
                sessionContext.setDevice(device);
            }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.devices.InternalDevice

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.