Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/server/auth/AuthenticationFactory.java @ 5818:a4ff4167be1e
Request feature info on all layers and show it as html if
the server does not return valid gml.
Non queryable layers produce an error message when the request
fails. This is good enough
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 24 Apr 2013 17:33:27 +0200 |
parents | 2e12518ff5b4 |
children |
line wrap: on
line source
package de.intevation.flys.client.server.auth; import org.apache.log4j.Logger; public class AuthenticationFactory { private static final Logger log = Logger.getLogger(AuthenticationFactory.class); public static Authenticator getInstance(String name) throws IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("Authentication type name is null"); } if (name.equalsIgnoreCase("was") || name.equalsIgnoreCase("ggina")) { log.debug("Using GGinA authenticator."); return new de.intevation.flys.client.server.auth.was.Authenticator(); } else if (name.equalsIgnoreCase("plain")) { log.debug("Using plain authenticator."); return new de.intevation.flys.client.server.auth.plain.Authenticator(); } throw new IllegalArgumentException("Unkown Authentication " + name); } }