001/* 002 * Copyright 2002-2007 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.web.servlet.theme; 018 019import org.springframework.web.servlet.ThemeResolver; 020 021/** 022 * Abstract base class for {@link ThemeResolver} implementations. 023 * Provides support for a default theme name. 024 * 025 * @author Juergen Hoeller 026 * @author Jean-Pierre Pawlak 027 * @since 17.06.2003 028 */ 029public abstract class AbstractThemeResolver implements ThemeResolver { 030 031 /** 032 * Out-of-the-box value for the default theme name: "theme". 033 */ 034 public final static String ORIGINAL_DEFAULT_THEME_NAME = "theme"; 035 036 private String defaultThemeName = ORIGINAL_DEFAULT_THEME_NAME; 037 038 039 /** 040 * Set the name of the default theme. 041 * Out-of-the-box value is "theme". 042 */ 043 public void setDefaultThemeName(String defaultThemeName) { 044 this.defaultThemeName = defaultThemeName; 045 } 046 047 /** 048 * Return the name of the default theme. 049 */ 050 public String getDefaultThemeName() { 051 return this.defaultThemeName; 052 } 053 054}