Examples of encrypted()


Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            }
            buffer.append(StringUtil.urlEncode(param.name)).append('=');
            if (param.value != null) {
                ValidationMetadata validation = validations.get(param.name);
                String formatted = format(param.value);
                if (validation != null && validation.encrypted())
                    formatted = CryptoUtil.encrypt(formatted);
                buffer.append(StringUtil.urlEncode(formatted));
            }
        }
        return buffer.toString();
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

                if (value != null) {
                    // format (and maybe encrypt) the value as a string
                    String formatted = format(value);
                    ValidationMetadata validation = validations.get(parameter.getName());
                    if (validation != null && validation.encrypted())
                        formatted = CryptoUtil.encrypt(formatted);

                    // if after formatting we still have a value then embed it in the URI
                    if (formatted != null && formatted.length() > 0) {
                        if (nextLiteral != null) {
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            }
           
            Class<?> typeConverterClass = null;
           
            if (data != null) {
                if (data.encrypted())
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("encrypted:")
                            .append(data.encrypted());
                if (data.required())
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("required:").append(
                            data.required());
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            Class<?> typeConverterClass = null;
           
            if (data != null) {
                if (data.encrypted())
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("encrypted:")
                            .append(data.encrypted());
                if (data.required())
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("required:").append(
                            data.required());
                if (data.on() != null) {
                    fieldInfo.append(fieldInfo.length() > 0 ? "," : "").append("on:[");
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            // find the action bean class we're dealing with
            Class<? extends ActionBean> beanClass = tag.getParentFormTag().getActionBeanClass();
            if (beanClass != null) {
                ValidationMetadata validate = config.getValidationMetadataProvider()
                        .getValidationMetadata(beanClass, new ParameterName(tag.getName()));
                if (validate != null && validate.encrypted()) {
                    String[] copy = new String[value.length];
                    for (int i = 0; i < copy.length; i++) {
                        copy[i] = CryptoUtil.decrypt(value[i]);
                    }
                    value = copy;
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

        // encrypt the formatted value if required
        if (forOutput && formatted != null) {
            try {
                ValidationMetadata validate = getValidationMetadata();
                if (validate != null && validate.encrypted())
                    formatted = CryptoUtil.encrypt(formatted);
            }
            catch (JspException e) {
                throw new StripesRuntimeException(e);
            }
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            }
            buffer.append(StringUtil.urlEncode(param.name)).append('=');
            if (param.value != null) {
                ValidationMetadata validation = validations.get(param.name);
                String formatted = format(param.value);
                if (validation != null && validation.encrypted())
                    formatted = CryptoUtil.encrypt(formatted);
                buffer.append(StringUtil.urlEncode(formatted));
            }
        }
        return buffer.toString();
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

                if (value != null) {
                    // format (and maybe encrypt) the value as a string
                    String formatted = format(value);
                    ValidationMetadata validation = validations.get(parameter.getName());
                    if (validation != null && validation.encrypted())
                        formatted = CryptoUtil.encrypt(formatted);

                    // if after formatting we still have a value then embed it in the URI
                    if (formatted != null && formatted.length() > 0) {
                        if (nextLiteral != null) {
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            Class<?> typeConverterClass = null;
           
            if (data != null) {
                fieldInfo.append("required:").append(data.required())
                        .append(",ignore:").append(data.ignore())
                        .append(",encrypted:").append(data.encrypted())
                        .append(",trim:").append(data.trim());

                if (data.on() != null) {
                    fieldInfo.append(",on:[");
                    Iterator<String> it = data.on().iterator();
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            // find the action bean class we're dealing with
            Class<? extends ActionBean> beanClass = tag.getParentFormTag().getActionBeanClass();
            if (beanClass != null) {
                ValidationMetadata validate = config.getValidationMetadataProvider()
                        .getValidationMetadata(beanClass, new ParameterName(tag.getName()));
                if (validate != null && validate.encrypted()) {
                    String[] copy = new String[value.length];
                    for (int i = 0; i < copy.length; i++) {
                        copy[i] = CryptoUtil.decrypt(value[i]);
                    }
                    value = copy;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.