org.glassfish.web.deployment.runtime.CacheMapping.NAME);
scope = mapConfig.getAttributeValue(
org.glassfish.web.deployment.runtime.CacheMapping.TIMEOUT,
org.glassfish.web.deployment.runtime.CacheMapping.SCOPE);
if (name != null && scope != null)
mapping.setTimeoutField(new Field(name, scope));
}
/**
* <refresh-field name="refreshNow" scope="request.attribute" />
*/
name = mapConfig.getAttributeValue(
org.glassfish.web.deployment.runtime.CacheMapping.REFRESH_FIELD,
org.glassfish.web.deployment.runtime.CacheMapping.NAME);
scope = mapConfig.getAttributeValue(
org.glassfish.web.deployment.runtime.CacheMapping.REFRESH_FIELD,
org.glassfish.web.deployment.runtime.CacheMapping.SCOPE);
if (name != null && scope != null) {
Field refreshField = new Field(name, scope);
mapping.setRefreshField(refreshField);
}
/** <http-method> GET </http-method>
* <http-method> POST </http-method>
*/
if (mapConfig.sizeHttpMethod() > 0) {
mapping.setMethods(mapConfig.getHttpMethod());
}
/**
* <key-field name="foo" scope="request.parameter"/>
*/
for (int i = 0; i < mapConfig.sizeKeyField(); i++) {
name = mapConfig.getAttributeValue(
org.glassfish.web.deployment.runtime.CacheMapping.KEY_FIELD,
i, org.glassfish.web.deployment.runtime.CacheMapping.NAME);
scope = mapConfig.getAttributeValue(
org.glassfish.web.deployment.runtime.CacheMapping.KEY_FIELD,
i, org.glassfish.web.deployment.runtime.CacheMapping.SCOPE);
if (name != null && scope != null) {
mapping.addKeyField(new Field(name, scope));
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, KEY_FIELD_ADDED, new Object[]{name, scope});
}
}