Package com.sun.appserv.web.cache.mapping

Examples of com.sun.appserv.web.cache.mapping.Field


    public boolean isRefreshNeeded(HttpServletRequest request) {
        boolean result = false;

        // cache mapping associated with the request
        CacheMapping mapping = lookupCacheMapping(request);
        Field field = mapping.getRefreshField();
        if (field != null) {
            Object value = field.getValue(context, request);
            // the field's string representation must be "true" or "false"
            if (value != null && "true".equals(value.toString())) {
                result = true;
            }
        }
View Full Code Here


        // get the statically configured value, if any
        int result = mapping.getTimeout();

        // if the field is not defined, return the configured value
        Field field = mapping.getTimeoutField();
        if (field != null) {
            Object value = field.getValue(context, request);
            if (value != null) {
                try {
                    // Integer type timeout object
                    Integer timeoutAttr = Integer.valueOf(value.toString());
                    result = timeoutAttr.intValue();
View Full Code Here

                com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
            scope = mapConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.TIMEOUT,
                com.sun.enterprise.deployment.runtime.web.CacheMapping.SCOPE);
            if (name != null && scope != null)
                mapping.setTimeoutField(new Field(name, scope));
        }

        /**
         * <refresh-field name="refreshNow" scope="request.attribute" />
         */

        name = mapConfig.getAttributeValue(
            com.sun.enterprise.deployment.runtime.web.CacheMapping.REFRESH_FIELD,
            com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
        scope = mapConfig.getAttributeValue(
            com.sun.enterprise.deployment.runtime.web.CacheMapping.REFRESH_FIELD,
            com.sun.enterprise.deployment.runtime.web.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(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.KEY_FIELD,
                i, com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
            scope = mapConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.KEY_FIELD,
                i, com.sun.enterprise.deployment.runtime.web.CacheMapping.SCOPE);
            if (name != null && scope != null) {           
                mapping.addKeyField(new Field(name, scope));

                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("added a key-field : name = " + name
                                + " scope = " + scope);
                }
View Full Code Here

                    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});
                }
            }
View Full Code Here

    public boolean isRefreshNeeded(HttpServletRequest request) {
        boolean result = false;

        // cache mapping associated with the request
        CacheMapping mapping = lookupCacheMapping(request);
        Field field = mapping.getRefreshField();
        if (field != null) {
            Object value = field.getValue(context, request);
            // the field's string representation must be "true" or "false"
            if (value != null && "true".equals(value.toString())) {
                result = true;
            }
        }
View Full Code Here

        // get the statically configured value, if any
        int result = mapping.getTimeout();

        // if the field is not defined, return the configured value
        Field field = mapping.getTimeoutField();
        if (field != null) {
            Object value = field.getValue(context, request);
            if (value != null) {
                try {
                    // Integer type timeout object
                    Integer timeoutAttr = Integer.valueOf(value.toString());
                    result = timeoutAttr.intValue();
View Full Code Here

                com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
            scope = mapConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.TIMEOUT,
                com.sun.enterprise.deployment.runtime.web.CacheMapping.SCOPE);
            if (name != null && scope != null)
                mapping.setTimeoutField(new Field(name, scope));
        }

        /**
         * <refresh-field name="refreshNow" scope="request.attribute" />
         */

        name = mapConfig.getAttributeValue(
            com.sun.enterprise.deployment.runtime.web.CacheMapping.REFRESH_FIELD,
            com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
        scope = mapConfig.getAttributeValue(
            com.sun.enterprise.deployment.runtime.web.CacheMapping.REFRESH_FIELD,
            com.sun.enterprise.deployment.runtime.web.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(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.KEY_FIELD,
                i, com.sun.enterprise.deployment.runtime.web.CacheMapping.NAME);
            scope = mapConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.CacheMapping.KEY_FIELD,
                i, com.sun.enterprise.deployment.runtime.web.CacheMapping.SCOPE);
            if (name != null && scope != null) {           
                mapping.addKeyField(new Field(name, scope));

                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("added a key-field : name = " + name
                                + " scope = " + scope);
                }
View Full Code Here

    public boolean isRefreshNeeded(HttpServletRequest request) {
        boolean result = false;

        // cache mapping associated with the request
        CacheMapping mapping = lookupCacheMapping(request);
        Field field = mapping.getRefreshField();
        if (field != null) {
            Object value = field.getValue(context, request);
            // the field's string representation must be "true" or "false"
            if (value != null && "true".equals(value.toString())) {
                result = true;
            }
        }
View Full Code Here

        // get the statically configured value, if any
        int result = mapping.getTimeout();

        // if the field is not defined, return the configured value
        Field field = mapping.getTimeoutField();
        if (field != null) {
            Object value = field.getValue(context, request);
            if (value != null) {
                try {
                    // Integer type timeout object
                    Integer timeoutAttr = Integer.valueOf(value.toString());
                    result = timeoutAttr.intValue();
View Full Code Here

                    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});
                }
            }
View Full Code Here

TOP

Related Classes of com.sun.appserv.web.cache.mapping.Field

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.