}
public void setFactories(CaptchaFactory[] factories)
throws CaptchaEngineException {
if (factories == null || factories.length == 0) {
throw new CaptchaEngineException(
"impossible to set null or empty factories");
}
for (CaptchaFactory factory : factories) {
if (!ImageCaptchaFactory.class.isAssignableFrom(factory.getClass())) {
throw new CaptchaEngineException(
"This factory is not an image captcha factory "
+ factory.getClass());
}
}