Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.ProtocolException


     */
    protected void writeJavaScript(String script) throws ProtocolException {
        try {
            getCurrentJavaScriptContainer().getWriter().write(script);
        } catch (IOException e) {
            throw new ProtocolException("Error writing JavaScript", e);
        }
    }
View Full Code Here


        if( null != markerValue){
            ((DOMProtocol) protocol).getInserter().insert(markerElement, markerValue);
        } else if(null != defaultMarkerValue){
            markerElement.addText(defaultMarkerValue);
        } else {
            throw new ProtocolException("Marker has neither specified nor default value.");
            }
        return uId;
        }
View Full Code Here

        if( null != markerValue ){
            ((DOMProtocol) protocol).getInserter().insert(markerElement, markerValue);
        } else if(null != defaultMarkerValue){
            markerElement.addText(defaultMarkerValue);
        } else {
            throw new ProtocolException("Marker has neither specified nor default value.");
        }
        return uId;
    }
View Full Code Here

            throws ProtocolException {
        TableAttributes tableAttributes;
        try {
            tableAttributes = (TableAttributes) popMCSAttributes();
        } catch (EmptyStackException e) {
            throw new ProtocolException(exceptionLocalizer.format("widget-table-not-opened"),e);
        } catch (ClassCastException e) {
            throw new ProtocolException(exceptionLocalizer.format(
                    "widget-unexpected-attributes-type",
                    TableCellAttributes.class.getName()), e);
        }
        protocol.writeCloseTable(tableAttributes);
View Full Code Here

            throws ProtocolException {
        TableRowAttributes tableRowAttributes;
        try {
            tableRowAttributes = (TableRowAttributes) popMCSAttributes();
        } catch (EmptyStackException e) {
            throw new ProtocolException(exceptionLocalizer.format("widget-tr-not-opened"),e);
        } catch (ClassCastException e) {
            throw new ProtocolException(exceptionLocalizer.format(
                    "widget-unexpected-attributes-type",
                    TableCellAttributes.class.getName()), e);
        }
        protocol.writeCloseTableRow(tableRowAttributes);
    }
View Full Code Here

        TableCellAttributes tableCellAttributes;
        try {
            tableCellAttributes = (TableCellAttributes) this.attributesStack
                    .pop();
        } catch (EmptyStackException e) {
            throw new ProtocolException(exceptionLocalizer.format("widget-td-not-opened"),e);           
        } catch (ClassCastException e) {
            throw new ProtocolException(exceptionLocalizer.format(
                    "widget-unexpected-attributes-type",
                    TableCellAttributes.class.getName()), e);
           
        }
        protocol.writeCloseTableDataCell(tableCellAttributes);
View Full Code Here

       
        // Write JavaScript content to DOM.
        try {
            getJavaScriptWriter().write(scriptWriter.toString());
        } catch (IOException e) {
            throw new ProtocolException(e);
        }
    }
View Full Code Here

     */
    protected void renderJSON(VolantisProtocol protocol, String json) throws ProtocolException {
        try {
            protocol.getContentWriter().write(json);
        } catch (IOException e) {
            throw new ProtocolException("Error rendering JSON.");
        }
    }
View Full Code Here

            // Write script with item additions, in reverse order.
            for(int i = addItemScripts.size() - 1; i >= 0; i--) {
                protocol.getContentWriter().write((String) addItemScripts.get(i));
            }
        } catch (IOException e) {
            throw new ProtocolException(e);
        }

        protocol.writeCloseScript(scriptAttributes);
       
        scriptWriter = null;
View Full Code Here

     */
    private void writeScript(String content) throws ProtocolException {
        try {
            scriptWriter.write(content);
        } catch (IOException e) {
            throw new ProtocolException(e);
        }       
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.ProtocolException

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.