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);