/*
 *  Copyright 2011 Eric F. Savage, code@efsavage.com
 *
 *   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 com.ajah.spring.util;

/**
 * High-level utilities for Spring.
 * 
 * @author <a href="http://efsavage.com">Eric F. Savage</a>, <a
 *         href="mailto:code@efsavage.com">code@efsavage.com</a>.
 * 
 */
public class SpringUtils {
	// Empty
}

@@ -681,234 +681,1170 @@
 %0D%0A%0D%0A
-/**%0D%0A * High-level utilities for Spring.%0D%0A * %0D%0A * @author %3Ca href=%22http://efsavage.com%22%3EEric F. Savage%3C/a%3E, %3Ca%0D%0A *         href=%22mailto:code@efsavage.com%22%3Ecode@efsavage.com%3C/a%3E.%0D%0A * %0D%0A */%0D%0Apublic class SpringUtils %7B%0D%0A%09// Empty
+import java.util.ArrayList;%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport org.springframework.cache.Cache;%0D%0Aimport org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean;%0D%0Aimport org.springframework.cache.support.SimpleCacheManager;%0D%0A%0D%0A/**%0D%0A * High-level utilities for Spring.%0D%0A * %0D%0A * @author %3Ca href=%22http://efsavage.com%22%3EEric F. Savage%3C/a%3E, %3Ca%0D%0A *         href=%22mailto:code@efsavage.com%22%3Ecode@efsavage.com%3C/a%3E.%0D%0A * %0D%0A */%0D%0Apublic class SpringUtils %7B%0D%0A%0D%0A%09/**%0D%0A%09 * Creates a %7B@link SimpleCacheManager%7D and a set of named%0D%0A%09 * %7B@link ConcurrentMapCacheFactoryBean%7Ds.%0D%0A%09 * %0D%0A%09 * @param cacheNames%0D%0A%09 *            The names of the caches, must include at least one.%0D%0A%09 * @return A new cache manager with new caches.%0D%0A%09 */%0D%0A%09public SimpleCacheManager getSimpleCache(String... cacheNames) %7B%0D%0A%09%09List%3CCache%3E caches = new ArrayList%3C%3E();%0D%0A%09%09for (String cacheName : cacheNames) %7B%0D%0A%09%09%09ConcurrentMapCacheFactoryBean cache = new ConcurrentMapCacheFactoryBean();%0D%0A%09%09%09cache.setName(cacheName);%0D%0A%09%09%09caches.add(cache.getObject());%0D%0A%09%09%7D%0D%0A%09%09SimpleCacheManager simpleCacheManager = new SimpleCacheManager();%0D%0A%09%09simpleCacheManager.setCaches(caches);%0D%0A%09%09return simpleCacheManager;%0D%0A%09%7D
 %0D%0A%7D%0D

Add getSimpleCache()