Examples of PAPIException


Examples of com.volantis.mcs.papi.PAPIException

                try {
                    TimedRefreshInfo tri =
                            new TimedRefreshInfo(attributes.getContent());
                    protocol.writeTimedRefresh(tri);
                } catch (NumberFormatException nfe) {
                    throw new PAPIException(EXCEPTION_LOCALIZER.format(
                            "invalid-attribute", new Object[]{
                            "mcs-" + TimedRefreshInfo.NAME,
                            pattributes.getContent()}), nfe);
                } catch (ProtocolException e) {
                    throw new PAPIException(EXCEPTION_LOCALIZER.format(
                            "invalid-attribute", new Object[]{
                            "mcs-" + TimedRefreshInfo.NAME,
                            pattributes.getContent()}), e);
                }
            } else if (name.equals(CACHE_AUTO)) {
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                Date httpDate = HttpDateParser.parse(content);
                if (httpDate == null) {
                    // If string didn't parse to long property, throw an exception
                    // reusing existing localised message, saying that Time was
                    // expected, but String was encountered.
                    throw new PAPIException(EXCEPTION_LOCALIZER.format(
                            "invalid-meta-content-type", new Object[]{
                            Time.class.getName(), String.class.getName()}));
                }

                Time expires = Time.inMilliSeconds(httpDate.getTime());
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                cachingDirectives.enable();
            } catch (NumberFormatException e) {
                // If string didn't parse to long property, throw an exception
                // reusing existing localised message, saying that Period was
                // expected, but String was encountered.
                throw new PAPIException(EXCEPTION_LOCALIZER.format(
                        "invalid-meta-content-type", new Object[]{
                        Period.class.getName(), String.class.getName()}));
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        SelectState state = null;

        try {
            state = pageContext.peekSelectState();
        } catch (EmptyStackException e) {
            throw new PAPIException(
                    exceptionLocalizer.format("select-markup-missing"), e);
        }

        if (state.isOtherwiseExecuted()) {
            throw new PAPIException(
                    exceptionLocalizer.format("too-many-otherwises"));
        } else if (!state.isMatched()) {
            // There have been no when statement matches so this otherwise
            // should be executed
            result = PROCESS_ELEMENT_BODY;
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        // Do the rest of the field processing.
        try {
            doField(pageContext, attributes, pattributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", pattributes.getTagName(), e);
            throw new PAPIException(
                    exceptionLocalizer.format("rendering-error",
                            pattributes.getTagName()),
                    e);
        }
        pattributes.setInsertAfterCaptionPaneNode(
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            String accessKey = attributes.getAccessKey();
            String shortcut = attributes.getShortcut();

            if (shortcut != null) {
                if (accessKey != null) {
                    throw new PAPIException(exceptionLocalizer.
                            format(
                            "menu-building-shortcut-and-accesskey-error"));
                }
            } else {
                shortcut = accessKey;
            }

            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Process the shortcut
            TextAssetReference shortcutObj =
                    resolver.resolveQuotedTextExpression(shortcut);
            builder.setShortcut(shortcutObj);

            //Process the href as a mariner expression
            LinkAssetReference href = resolver.resolveQuotedLinkExpression(
                    attributes.getHref(), PageURLType.MENU_ITEM);
            builder.setHref(href);

            // Process the prompt as a mariner expression
            TextAssetReference prompt = resolver.resolveQuotedTextExpression(
                    attributes.getPrompt());
            builder.setPrompt(prompt);

            // Set the title.
            builder.setTitle(attributes.getTitle());

        } 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

        try {
            // End the existing menu item
            builder.endMenuItem();
        } catch (BuilderException be) {
            logger.error("menu-building-error", be);
            throw new PAPIException(
                    exceptionLocalizer.format("menu-building-error"), be);
        }

        return CONTINUE_PROCESSING;
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            builder.endText();

            // Complete the label
            builder.endLabel();
        } catch (BuilderException e) {
            throw new PAPIException(e);
        }

        return PROCESS_ELEMENT_BODY;
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

    protected int exprElementEnd(
            MarinerRequestContext context,
            PAPIAttributes papiAttributes)
            throws PAPIException {
        if (content == null) {
            throw new PAPIException(
                    exceptionLocalizer.format("label-requires-content"));
        } else {
            MarinerPageContext pageContext =
                    ContextInternals.getMarinerPageContext(context);
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        }
        try {
            protocol.writeOpenTableDataCell(pattributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", pattributes.getTagName(), e);
            throw new PAPIException(
                    exceptionLocalizer.format("rendering-error",
                            pattributes.getTagName()),
                    e);
        }
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.