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

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


        // check if the method is in the allowed methods list
        if (mapping.findMethod(request.getMethod())) {
            result = true;

            ConstraintField fields[] = mapping.getConstraintFields();
            // apply all the constraints
            for (int i = 0; i < fields.length; i++) {
                if (!fields[i].applyConstraints(context, request)) {
                    result = false;
                    break;
View Full Code Here


            name = fieldConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.ConstraintField.NAME);
            scope = fieldConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.ConstraintField.SCOPE);
            ConstraintField constraintField =
                                        new ConstraintField(name, scope);

            value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH);
            if (value != null)
                constraintField.setCacheOnMatch(ConfigBean.toBoolean(value));

            value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH_FAILURE);
            if (value != null)
                constraintField.setCacheOnMatchFailure(
                                    ConfigBean.toBoolean(value));


            // now set the value's and the match expressions
            for (int j = 0; j < fieldConfig.sizeValue(); j++) {
                value = fieldConfig.getValue(j).trim();
                expr = fieldConfig.getAttributeValue(
                    com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.MATCH_EXPR);
               
                ValueConstraint constraint = new ValueConstraint(value, expr);
                value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH);
                if (value != null) {
                    constraint.setCacheOnMatch(ConfigBean.toBoolean(value));
                }
                value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBean.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("added a constraint: " + constraint.toString());
                }
            }

            mapping.addConstraintField(constraintField);

            if (logger.isLoggable(Level.FINE)) {
                logger.fine("added a constraint-field name = " + name + " scope = " + scope +  " cache-on-match = " + constraintField.getCacheOnMatch() + " cache-on-match-failure = " + constraintField.getCacheOnMatchFailure());
            }
        }
    }
View Full Code Here

            name = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.NAME);
            scope = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.SCOPE);
            ConstraintField constraintField =
                                        new ConstraintField(name, scope);

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
            if (value != null)
                constraintField.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
            if (value != null)
                constraintField.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));


            // now set the value's and the match expressions
            for (int j = 0; j < fieldConfig.sizeValue(); j++) {
                value = fieldConfig.getValue(j).trim();
                expr = fieldConfig.getAttributeValue(
                        org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.MATCH_EXPR);
               
                ValueConstraint constraint = new ValueConstraint(value, expr);
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
                if (value != null) {
                    constraint.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));
                }
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, CONSTRAINT_ADDED, constraint.toString());
                }
            }

            mapping.addConstraintField(constraintField);

            if (logger.isLoggable(Level.FINE)) {
                logger.log(Level.FINE,
                        CONSTRAINT_FIELD_ADDED,
                        new Object[]{
                                name,
                                scope,
                                constraintField.getCacheOnMatch(),
                                constraintField.getCacheOnMatchFailure()});
            }
        }
    }
View Full Code Here

        // check if the method is in the allowed methods list
        if (mapping.findMethod(request.getMethod())) {
            result = true;

            ConstraintField fields[] = mapping.getConstraintFields();
            // apply all the constraints
            for (int i = 0; i < fields.length; i++) {
                if (!fields[i].applyConstraints(context, request)) {
                    result = false;
                    break;
View Full Code Here

            name = fieldConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.ConstraintField.NAME);
            scope = fieldConfig.getAttributeValue(
                com.sun.enterprise.deployment.runtime.web.ConstraintField.SCOPE);
            ConstraintField constraintField =
                                        new ConstraintField(name, scope);

            value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH);
            if (value != null)
                constraintField.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));

            value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH_FAILURE);
            if (value != null)
                constraintField.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));


            // now set the value's and the match expressions
            for (int j = 0; j < fieldConfig.sizeValue(); j++) {
                value = fieldConfig.getValue(j).trim();
                expr = fieldConfig.getAttributeValue(
                    com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.MATCH_EXPR);
               
                ValueConstraint constraint = new ValueConstraint(value, expr);
                value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH);
                if (value != null) {
                    constraint.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));
                }
                value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("added a constraint: " + constraint.toString());
                }
            }

            mapping.addConstraintField(constraintField);

            if (logger.isLoggable(Level.FINE)) {
                logger.fine("added a constraint-field name = " + name + " scope = " + scope +  " cache-on-match = " + constraintField.getCacheOnMatch() + " cache-on-match-failure = " + constraintField.getCacheOnMatchFailure());
            }
        }
    }
View Full Code Here

        // check if the method is in the allowed methods list
        if (mapping.findMethod(request.getMethod())) {
            result = true;

            ConstraintField fields[] = mapping.getConstraintFields();
            // apply all the constraints
            for (int i = 0; i < fields.length; i++) {
                if (!fields[i].applyConstraints(context, request)) {
                    result = false;
                    break;
View Full Code Here

            name = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.NAME);
            scope = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.SCOPE);
            ConstraintField constraintField =
                                        new ConstraintField(name, scope);

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
            if (value != null)
                constraintField.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
            if (value != null)
                constraintField.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));


            // now set the value's and the match expressions
            for (int j = 0; j < fieldConfig.sizeValue(); j++) {
                value = fieldConfig.getValue(j).trim();
                expr = fieldConfig.getAttributeValue(
                        org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.MATCH_EXPR);
               
                ValueConstraint constraint = new ValueConstraint(value, expr);
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
                if (value != null) {
                    constraint.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));
                }
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, CONSTRAINT_ADDED, constraint.toString());
                }
            }

            mapping.addConstraintField(constraintField);

            if (logger.isLoggable(Level.FINE)) {
                logger.log(Level.FINE,
                        CONSTRAINT_FIELD_ADDED,
                        new Object[]{
                                name,
                                scope,
                                constraintField.getCacheOnMatch(),
                                constraintField.getCacheOnMatchFailure()});
            }
        }
    }
View Full Code Here

        // check if the method is in the allowed methods list
        if (mapping.findMethod(request.getMethod())) {
            result = true;

            ConstraintField fields[] = mapping.getConstraintFields();
            // apply all the constraints
            for (int i = 0; i < fields.length; i++) {
                if (!fields[i].applyConstraints(context, request)) {
                    result = false;
                    break;
View Full Code Here

            name = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.NAME);
            scope = fieldConfig.getAttributeValue(
                    org.glassfish.web.deployment.runtime.ConstraintField.SCOPE);
            ConstraintField constraintField =
                                        new ConstraintField(name, scope);

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
            if (value != null)
                constraintField.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));

            value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
            if (value != null)
                constraintField.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));


            // now set the value's and the match expressions
            for (int j = 0; j < fieldConfig.sizeValue(); j++) {
                value = fieldConfig.getValue(j).trim();
                expr = fieldConfig.getAttributeValue(
                        org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.MATCH_EXPR);
               
                ValueConstraint constraint = new ValueConstraint(value, expr);
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH);
                if (value != null) {
                    constraint.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value));
                }
                value = fieldConfig.getAttributeValue(org.glassfish.web.deployment.runtime.ConstraintField.VALUE, j, org.glassfish.web.deployment.runtime.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBeansUtilities.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, CONSTRAINT_ADDED, constraint.toString());
                }
            }

            mapping.addConstraintField(constraintField);

            if (logger.isLoggable(Level.FINE)) {
                logger.log(Level.FINE,
                        CONSTRAINT_FIELD_ADDED,
                        new Object[]{
                                name,
                                scope,
                                constraintField.getCacheOnMatch(),
                                constraintField.getCacheOnMatchFailure()});
            }
        }
    }
View Full Code Here

        // check if the method is in the allowed methods list
        if (mapping.findMethod(request.getMethod())) {
            result = true;

            ConstraintField fields[] = mapping.getConstraintFields();
            // apply all the constraints
            for (int i = 0; i < fields.length; i++) {
                if (!fields[i].applyConstraints(context, request)) {
                    result = false;
                    break;
View Full Code Here

TOP

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

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.