Examples of InternalDevice


Examples of com.volantis.mcs.devices.InternalDevice

     * Setup the unit test framework by creating some classes ensuring that each
     * test case starts off with a clean slate to work from
     */
    public void setUp() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        ProtocolBuilder builder = new ProtocolBuilder();
        protocol = (HTMLParagon) builder.build(
                new ProtocolRegistry.HTMLParagonFactory(), internalDevice);
    }
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

        assertEquals(expectedAsString, domAsString);
    }

    private HTML_iMode createProtocol() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

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

Examples of com.volantis.mcs.devices.InternalDevice

     * @param input the markup (including real and pseudo markup)
     * @param expected the expected VDXML markup
     */
    protected void doTest(String input, String expected) throws Exception {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

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

Examples of com.volantis.mcs.devices.InternalDevice

     * Factory method for creating a <code>DOMProtocol</code>
     * @return a DOMProtocol instance
     */
    protected DOMProtocol createProtocol() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

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

Examples of com.volantis.mcs.devices.InternalDevice

    }

    public VDXMLBlockTestCase() {

        InternalDevice internalDevice = InternalDeviceTestHelper.createTestDevice();

        buffer = new TestDOMOutputBuffer();
        buffer.clear();
        vdStyleFactory = new VDXMLStyleFactory();
        writer = new CharArrayWriter();
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

        }

        DeviceReader deviceReader = volantisBean.getDeviceReader();
        String channel = null;
        try {
            InternalDevice device = deviceReader.getDevice(deviceName);
            channel = device.getPolicyValue("preferredmessageprotocol");
        } catch (RepositoryException e) {
        }

        return channel;
    }
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

        String deviceName = internalRequest.getDeviceName();
        if (logger.isDebugEnabled()) {
            logger.debug("Mariner-DeviceName=" + deviceName);
        }

        InternalDevice device = deviceReader.getDevice(deviceName);
        if (device == null) {
            throw new RepositoryException(exceptionLocalizer.format(
                    "unknown-device-exception",
                    deviceName));
        }
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

            throws RepositoryException {

        HttpServletRequest httpRequest =
                ((MarinerServletRequestContext) requestContext).getHttpRequest();

        InternalDevice device = resolveSessionDevice(httpRequest);

        if (device != null) {
            if (logger.isDebugEnabled()) {
                logger.debug(
                    "Retrieved device " + device + " from the session");
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

     */
    protected InternalDevice
            resolveSessionDevice(HttpServletRequest httpRequest) {
        // Get the session if one exists.
        HttpSession session = httpRequest.getSession(false);
        InternalDevice device = null;

        // Get to see if MarinerServletApplication#getDevice has put a device
        // in the session.
        if (session != null) {
            DefaultDevice defaultDevice =
View Full Code Here

Examples of com.volantis.mcs.devices.InternalDevice

        DefaultDevice dev = new DefaultDevice(null, null, null);
        dev.setName("myDevice");
        dev.setPolicyValue("protocol", "XHTMLBasic");
        MarinerSessionContext session = envContext.getSessionContext();
        InternalDevice internalDevice =
            INTERNAL_DEVICE_FACTORY.createInternalDevice(dev);
        session.setDevice(internalDevice);
        pageContext.setDevice(session.getDevice());

        // Create an expression context for the environment context.
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.