Package com.volantis.mcs.papi

Examples of com.volantis.mcs.papi.MetaAttributes


        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);
        VolantisProtocol protocol = pageContext.getProtocol();

        MetaAttributes attributes = (MetaAttributes) papiAttributes;
        // Copy the attributes.
        pattributes.setName(attributes.getName());
        pattributes.setHttpEquiv(attributes.getHttpEquiv());
        pattributes.setLang(attributes.getLang());
        pattributes.setContent(attributes.getContent());

        String name = pattributes.getName();

        if (null != name) {
            if (name.equals("mcs-" + TimedRefreshInfo.NAME)) {
                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)) {
                applyCacheAuto(context);
            } else if (name.equals(NO_CACHE)) {
                applyNoCache(context);
            } else if (name.equals(CACHE_MAX_AGE)) {
                applyCacheMaxAge(context, attributes.getContent());
            } else if (name.equals(CACHE_EXPIRES)) {
                applyCacheExpires(context, attributes.getContent());
            } else {
                protocol.writeMeta(pattributes);
            }
        } else {
            protocol.writeMeta(pattributes);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.papi.MetaAttributes

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.