Examples of PAPIException


Examples of com.volantis.mcs.papi.PAPIException

            } else if (e instanceof ProtocolException) {
                // The non-runtime exception we are expecting.
                // Create a PAPI exception to wrap it and pass up the stack.

                logger.error("rendering-error", pattributes.getTagName(), e);
                throw new PAPIException(
                        exceptionLocalizer.format("rendering-error",
                                pattributes.getTagName()),
                        e);
            } else {
                // Any other non-runtime exception is an error.
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            protocol.writeCloseAnchor(pattributes);
        } catch (ProtocolException e) {

            logger.error("rendering-error",
                    new Object[]{pattributes.getTagName()}, e);
            throw new PAPIException(
                    exceptionLocalizer.format("rendering-error",
                            pattributes.getTagName()),
                    e);
        }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            formElement = (XFFormElementImpl) enclosingElement;
        } else {
            if (allowedInline) {
                formElement = null;
            } else {
                throw new PAPIException(exceptionLocalizer.format(
                        "element-parent-not-form"));
            }
        }

        // Check to make sure that we are not working inline.
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            return PROCESS_ELEMENT_BODY;

        } catch (ProtocolException e) {

            logger.error("rendering-error", pattributes.getTagName(), e);
            throw new PAPIException(exceptionLocalizer.format(
                    "rendering-error", pattributes.getTagName()), e);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            protocol.openMontagePage(pattributes);

            return PROCESS_ELEMENT_BODY;
        } catch (IOException e) {
            logger.error("unexpected-ioexception", e);
            throw new PAPIException(e);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                    pageContext.sendRedirect(url);

                    //  redirected = true;
                    return ABORT_PROCESSING;
                } else {
                    throw new PAPIException(exceptionLocalizer.format(
                            "default-segment-missing-no-aggregation",
                            new Object[]{pageContext.getDeviceName(),
                                    deviceLayout.getName()}));
                }
            }

            pageContext.endPhase1BeginPhase2();

            protocol.closeMontagePage(pattributes);
            return CONTINUE_PROCESSING;
        } catch (IOException e) {
            logger.error("unexpected-ioexception", e);
            throw new PAPIException(e);
        } catch (ProtocolException e) {
            logger.error("unexpected-exception", e);
            throw new PAPIException(e);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                        pageContext.getRendererLocator();
                MenuRendererSelector rendererSelector =
                        rendererLocator.getMenuRendererSelector(pageContext);
                if (rendererSelector == null) {
                    logger.error("selector-rendering-error", "menu");
                    throw new PAPIException(exceptionLocalizer.format(
                            "missing-renderer-selector", "menu"));
                }

                MenuRenderer renderer =
                        rendererSelector.selectMenuRenderer(menu);

                final ShortcutProperties shortcutProperties =
                        menu.getShortcutProperties();
                if (null != shortcutProperties) {
                    // If the device cannot support mixed content in the body
                    // of a link, then update the shortcut properties so that
                    // span elements will not be used.
                    String supportsMixedContent = pageContext.
                            getDevicePolicyValue(DevicePolicyConstants.
                                    X_ELEMENT_A_SUPPORTS_MIXED_CONTENT);
                    if (DevicePolicyConstants.NO_SUPPORT_POLICY_VALUE.equals
                            (supportsMixedContent)) {
                        shortcutProperties.setSupportsSpan(false);
                    }

                    // If the device inserts line breaks before links, then
                    // shortcuts must appear in the active area or the layout
                    // will be incorrect (regardless of the value specified in
                    // the styles).
                    String insertsLineBreaks = pageContext.getDevicePolicyValue(
                            DevicePolicyConstants.X_ELEMENT_A_BREAKS_LINE);
                    if ("before".equals(insertsLineBreaks)) {
                        shortcutProperties.setActive(true);
                    }
                }

                // Process the menu
                renderer.render(menu);
            }
        } catch (BuilderException be) {
            logger.error("menu-building-error", be);
            throw new PAPIException(
                    exceptionLocalizer.format("menu-building-error"), be);
        } catch (RendererException re) {
            logger.error("rendering-error", "menu", re);
            throw new PAPIException(
                    exceptionLocalizer.format("rendering-error", "menu"),
                    re);
        }

        return CONTINUE_PROCESSING;
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            // Push this element
            pageContext.pushElement(this);

        } catch (BuilderException be) {
            logger.error("menu-building-error", be);
            throw new PAPIException(
                    exceptionLocalizer.format("menu-building-error"), be);
        }

        return PROCESS_ELEMENT_BODY;
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                        StylePropertyDetails.MCS_MENU_TEXT_STYLE,
                        MCSMenuTextStyleKeywords.NONE);
            } else {
                // This state should not happen as the type (if it exists)
                // should only be one of the above.
                throw new PAPIException(
                        exceptionLocalizer.format("menu-building-error"));

            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        }

        VolantisProtocol protocol = pageContext.getProtocol();
        buffer = protocol.getOutputBufferFactory().createOutputBuffer();
        if (buffer == null) {
            throw new PAPIException(exceptionLocalizer.format(
                    "output-buffer-allocation-failure"));
        }

        pattributes = new com.volantis.mcs.protocols.XFContentAttributes();
        pattributes.setPane(pane);
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.