Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.ProtocolException


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


                    renderer = (WidgetRenderer)rendererClass.newInstance();
                    renderersMap.put(attributesClass, renderer);
                    // If we are unable to instantiate a renderer, we report a protocol error
                    // as this is not something that we expect to happen in normal circumastances.
                } catch (InstantiationException e) {
                    throw new ProtocolException(e);
                } catch (IllegalAccessException e) {
                    throw new ProtocolException(e);
                }
            }
        }
        return renderer;
    }
View Full Code Here

        StringWriter scriptWriter = new StringWriter();
           
        try {
            factory.writeOrderedJavaScript(scriptWriter);
        } catch (IOException e) {
            throw new ProtocolException("Error rendering JavaScript.", e);
        } catch (OrderException e) {
            throw new ProtocolException("Cyclic dependency found between widgets.");
        }
       
        String script = scriptWriter.toString();
       
        // Now, if script is not empty, render it into the page.
        if (script.length() > 0) {
            // Open <script> element
            com.volantis.mcs.protocols.ScriptAttributes scriptAttributes =
                new com.volantis.mcs.protocols.ScriptAttributes();
           
            scriptAttributes.setType("text/javascript");
           
            protocol.writeOpenScript(scriptAttributes);
   
            try {
                protocol.getContentWriter().write(script);
            } catch (IOException e) {
                throw new ProtocolException("Error rendering JavaScript.", e);
            }
   
            // Close script element.
            protocol.writeCloseScript(scriptAttributes);
        }
View Full Code Here

                    renderer = (ElementRenderer)rendererClass.newInstance();
                    renderersMap.put(attributesClass, renderer);
                    // If we are unable to instantiate a renderer, we report a protocol error
                    // as this is not something that we expect to happen in normal circumastances.
                } catch (InstantiationException e) {
                    throw new ProtocolException(e);
                } catch (IllegalAccessException e) {
                    throw new ProtocolException(e);
                }
            }
        }
       
        return renderer;
View Full Code Here

                    renderer = (ElementRenderer)rendererClass.newInstance();
                    renderersMap.put(attributesClass, renderer);
                    // If we are unable to instantiate a renderer, we report a protocol error
                    // as this is not something that we expect to happen in normal circumastances.
                } catch (InstantiationException e) {
                    throw new ProtocolException(e);
                } catch (IllegalAccessException e) {
                    throw new ProtocolException(e);
                }
            }
        }
       
        return renderer;
View Full Code Here

            return;
        }
       
        setImageSize(getMapWidth(protocol, attributes));
        if (this.containsMapView) {
            throw new ProtocolException("More than one widget:map-view "
                    + "element inside widget:maps element.");
        }
        this.containsMapView = true;
        this.mainAreaImagesIdList.clear();
        this.movableAreaImagesIdList.clear();
View Full Code Here

        if (!isWidgetSupported(protocol)) {
            return;
        }
       
        if (!this.containsMapView) {
            throw new ProtocolException("Missed widget:map-view element.");
        }
        this.containsMapView = false;
       
        MapAttributes mapAttributes = (MapAttributes) attributes;
       
View Full Code Here

        icsParameters = icsParameters.substring(imageNameStart  +GEN_IMAGE_NAME.length() + 1);
       
        Map transcoderParamsMap = getTranscoderParamsMap(icsParameters);
        if(transcoderParamsMap == null){
            logger.error("ics-server-not-configured");
            throw new ProtocolException();
        }

        String mapHostPrefix;
        String mapParameters;
       
View Full Code Here

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

        RuntimePolicyReference reference;
        try {
            reference = WidgetHelper.loadImageReference(policyURL,
                    protocol.getMarinerPageContext());
        } catch (MarinerContextException e) {
            throw new ProtocolException(e);
        }

        // TODO: factor together with AbstractImageElement
        MarinerPageContext pageContext = protocol.getMarinerPageContext();
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.