/* (c) 2014 Open Source Geospatial Foundation - all rights reserved * (c) 2001 - 2013 OpenPlans * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ package org.geoserver.security.impl; import java.io.IOException; import org.geoserver.config.util.XStreamPersister; import org.geoserver.security.GeoServerRoleService; import org.geoserver.security.GeoServerSecurityManager; import org.geoserver.security.GeoServerSecurityProvider; import org.geoserver.security.config.J2eeRoleServiceConfig; import org.geoserver.security.config.SecurityNamedServiceConfig; import org.geoserver.security.validation.SecurityConfigValidator; /** * Security provider for J2EE security implementations. * * @author christian */ public class J2eeSecurityProvider extends GeoServerSecurityProvider { @Override public void configure(XStreamPersister xp) { super.configure(xp); xp.getXStream().alias("j2eeRoleService", J2eeRoleServiceConfig.class); } @Override public Class<? extends GeoServerRoleService> getRoleServiceClass() { return GeoServerJ2eeRoleService.class; } @Override public GeoServerRoleService createRoleService(SecurityNamedServiceConfig config) throws IOException { return new GeoServerJ2eeRoleService(); } @Override public SecurityConfigValidator createConfigurationValidator(GeoServerSecurityManager securityManager) { return new SecurityConfigValidator(securityManager); } }