org.loom.addons.recaptcha.RecaptchaAnnotationProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of loom-addons Show documentation
Show all versions of loom-addons Show documentation
Uploads all artifacts belonging to configuration ':archives'.
The newest version!
package org.loom.addons.recaptcha;
import javax.inject.Inject;
import org.loom.annotation.processor.AbstractAnnotationProcessor;
import org.loom.mapping.Event;
/**
* Processes {@link Recaptcha} annotations
*
* @author icoloma
*
*/
public class RecaptchaAnnotationProcessor extends AbstractAnnotationProcessor {
@Inject
private RecaptchaService service;
private RecaptchaInterceptor interceptor;
@Override
public void process(Event event) {
Recaptcha annotation = event.getJavaMethod().getAnnotation(Recaptcha.class);
if (annotation != null) {
event.addInterceptor(interceptor);
}
}
public void setService(RecaptchaService service) {
this.service = service;
this.interceptor = new RecaptchaInterceptor();
this.interceptor.setRecaptchaService(this.service);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy