org.milyn.persistence.ApplicationContextObjectStore Maven / Gradle / Ivy
The newest version!
/*
Milyn - Copyright (C) 2006 - 2010
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (version 2.1) as published by the Free Software
Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details:
http://www.gnu.org/licenses/lgpl.txt
*/
package org.milyn.persistence;
import java.util.Map;
import org.milyn.container.ApplicationContext;
import org.milyn.scribe.ObjectStore;
/**
* @author [email protected]
*
*/
public class ApplicationContextObjectStore implements ObjectStore {
private ApplicationContext applicationContext;
public ApplicationContextObjectStore(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
/* (non-Javadoc)
* @see org.milyn.scribe.ObjectStore#get(java.lang.Object)
*/
public Object get(Object key) {
return applicationContext.getAttribute(key);
}
/* (non-Javadoc)
* @see org.milyn.scribe.ObjectStore#getAll()
*/
public Map