Examples of supports()


Examples of org.springframework.security.web.access.channel.SecureChannelProcessor.supports()

        }
    }

    public void testSupports() {
        SecureChannelProcessor processor = new SecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_SECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}

Examples of org.springframework.security.web.access.channel.SecureChannelProcessor.supports()

    }

    public void testSupports() {
        SecureChannelProcessor processor = new SecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_SECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}

Examples of org.springframework.security.web.access.channel.SecureChannelProcessor.supports()

    public void testSupports() {
        SecureChannelProcessor processor = new SecureChannelProcessor();
        assertTrue(processor.supports(new SecurityConfig("REQUIRES_SECURE_CHANNEL")));
        assertFalse(processor.supports(null));
        assertFalse(processor.supports(new SecurityConfig("NOT_SUPPORTED")));
    }
}

Examples of org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider.supports()

    }

    @Test
    public final void supportsArbitraryObject() throws Exception {
        PreAuthenticatedAuthenticationProvider provider = getProvider(null);
        assertFalse(provider.supports(Authentication.class));
    }

    @Test
    public final void supportsPreAuthenticatedAuthenticationToken() throws Exception {
        PreAuthenticatedAuthenticationProvider provider = getProvider(null);

Examples of org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider.supports()

    }

    @Test
    public final void supportsPreAuthenticatedAuthenticationToken() throws Exception {
        PreAuthenticatedAuthenticationProvider provider = getProvider(null);
        assertTrue(provider.supports(PreAuthenticatedAuthenticationToken.class));
    }

    @Test
    public void getSetOrder() throws Exception {
        PreAuthenticatedAuthenticationProvider provider = getProvider(null);

Examples of org.springframework.validation.Validator.supports()

     * @param errors The {@link Errors} instance where all validation errors will be registered.
     */
    protected void applyCustomValidator(BeanValidationConfiguration configuration, Object obj, Errors errors) {
        Validator validator = configuration.getCustomValidator();
        if (validator != null) {
            if (validator.supports(obj.getClass())) {
                validator.validate(obj, errors);
            } else {
                if (logger.isWarnEnabled()) {
                    logger.warn("Validator: " + validator + " was extracted from the configuration of object: " +
                        obj + " but it is not applied for it does not support this object type: " +

Examples of org.springframework.validation.Validator.supports()

     * @param errors The {@link Errors} instance where all validation errors will be registered.
     */
    protected void applyCustomValidator(BeanValidationConfiguration configuration, Object obj, Errors errors) {
        Validator validator = configuration.getCustomValidator();
        if (validator != null) {
            if (validator.supports(obj.getClass())) {
                validator.validate(obj, errors);
            }
        }
    }

Examples of org.springframework.validation.Validator.supports()

     * @see Validator#supports(Class)
     */
    public boolean supports(Class clazz) {
        for (Iterator i = validators.iterator(); i.hasNext();) {
            Validator validator = (Validator) i.next();
            if (validator.supports(clazz)) {
                return true;
            }
        }
        return false;
    }

Examples of org.springframework.validation.Validator.supports()

     * @see Validator#validate(Object, org.springframework.validation.Errors)
     */
    public void validate(Object obj, Errors errors) {
        for (Iterator i = validators.iterator(); i.hasNext();) {
            Validator validator = (Validator) i.next();
            if (validator.supports(obj.getClass())) {
                validator.validate(obj, errors);
            }
        }
    }

Examples of org.springframework.validation.Validator.supports()

     * @return Whether this validator supports the given class.
     */
    public boolean supports(Class clazz) {
        for (Iterator i = validators.iterator(); i.hasNext();) {
            Validator validator = (Validator)i.next();
            if (validator.supports(clazz)) {
                return true;
            }
        }
        return false;
    }
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.