/*
 * Copyright 2012-2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.boot.autoconfigure.groovy.template;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.autoconfigure.template.AbstractViewResolverProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * {@link ConfigurationProperties} for configuring Groovy templates.
 *
 * @author Dave Syer
 * @since 1.1.0
 */
@ConfigurationProperties(prefix = "spring.groovy.template", ignoreUnknownFields = false)
public class GroovyTemplateProperties extends AbstractViewResolverProperties {

	public static final String DEFAULT_PREFIX = "classpath:/templates/";

	public static final String DEFAULT_SUFFIX = ".tpl";

	/**
	 * Prefix that gets prepended to view names when building a URL.
	 */
	private String prefix = DEFAULT_PREFIX;

	/**
	 * Suffix that gets appended to view names when building a URL.
	 */
	private String suffix = DEFAULT_SUFFIX;

	/**
	 * Configuration to pass to TemplateConfiguration.
	 */
	private Map<String, Object> configuration = new HashMap<String, Object>();

	public String getPrefix() {
		return this.prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}

	public String getSuffix() {
		return this.suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}

	public void setConfiguration(Map<String, Object> configuration) {
		this.configuration = configuration;
	}

	public Map<String, Object> getConfiguration() {
		return this.configuration;
	}

}

@@ -21,9 +21,9 @@
 -201
-4
+5
  the
@@ -684,57 +684,8 @@
 e;%0A%0A
-import java.util.HashMap;%0Aimport java.util.Map;%0A%0A
 impo
@@ -1494,147 +1494,8 @@
 X;%0A%0A
-%09/**%0A%09 * Configuration to pass to TemplateConfiguration.%0A%09 */%0A%09private Map%3CString, Object%3E configuration = new HashMap%3CString, Object%3E();%0A%0A
 %09pub
@@ -1704,24 +1704,24 @@
 g suffix) %7B%0A
+
 %09%09this.suffi
@@ -1740,197 +1740,6 @@
 %09%7D%0A%0A
-%09public void setConfiguration(Map%3CString, Object%3E configuration) %7B%0A%09%09this.configuration = configuration;%0A%09%7D%0A%0A%09public Map%3CString, Object%3E getConfiguration() %7B%0A%09%09return this.configuration;%0A%09%7D%0A%0A
 %7D%0A

Remove unused configuration map