@@ -0,0 +1,1803 @@
+/*%0A * Copyright 2005 The JA-SIG Collaborative. All rights reserved. See license%0A * distributed with this file and available online at%0A * http://www.uportal.org/license.html%0A */%0Apackage org.jasig.cas.services.web;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport org.jasig.cas.services.RegisteredService;%0Aimport org.jasig.cas.services.ServiceRegistry;%0Aimport org.springframework.web.servlet.theme.AbstractThemeResolver;%0A%0A/**%0A * ThemeResolver to determine the theme for CAS based on the service provided.%0A * If the Service is not found, the ThemeResolver will return the default theme.%0A * %0A * @author Scott Battaglia%0A * @version $Revision$ $Date$%0A * @since 3.0%0A */%0Apublic final class ServiceThemeResolver extends AbstractThemeResolver %7B%0A%0A    /** Constant to define where we look for the service id in the request. */%0A    public static final String SERVICE_THEME_KEY = %22service%22;%0A%0A    /** The ServiceRegistry to look up the service. */%0A    private ServiceRegistry serviceRegistry;%0A%0A    public String resolveThemeName(final HttpServletRequest request) %7B%0A        if (this.serviceRegistry == null) %7B%0A            return getDefaultThemeName();%0A        %7D%0A%0A        final String serviceId = request.getParameter(SERVICE_THEME_KEY);%0A        final RegisteredService service = this.serviceRegistry%0A            .getService(serviceId);%0A%0A        return service != null && service.getTheme() != null ? service%0A            .getTheme() : getDefaultThemeName();%0A    %7D%0A%0A    public void setThemeName(final HttpServletRequest request,%0A        final HttpServletResponse response, final String themeName) %7B%0A        // nothing to do here%0A    %7D%0A%0A    public void setServiceRegistry(final ServiceRegistry serviceRegistry) %7B%0A        this.serviceRegistry = serviceRegistry;%0A    %7D%0A%7D%0A

move to services.web