implement new store listener api

This commit is contained in:
Sebastian Sdorra
2012-05-19 10:52:10 +02:00
parent 9c49a6a2d7
commit 0b9c1673d2
4 changed files with 14 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ import javax.xml.bind.Marshaller;
*
* @param <T>
*/
public class JAXBStore<T> implements Store<T>
public class JAXBStore<T> extends AbstractListenableStore<T>
{
/** the logger for JAXBStore */
@@ -149,6 +149,8 @@ public class JAXBStore<T> implements Store<T>
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(object, configFile);
fireEvent(object);
}
catch (JAXBException ex)
{

View File

@@ -53,7 +53,7 @@ import java.io.IOException;
* @author Sebastian Sdorra
*/
@Singleton
public class JAXBStoreFactory implements StoreFactory
public class JAXBStoreFactory implements ListenableStoreFactory
{
/** Field description */
@@ -108,7 +108,7 @@ public class JAXBStoreFactory implements StoreFactory
* @return
*/
@Override
public <T> Store<T> getStore(Class<T> type, String name)
public <T> JAXBStore<T> getStore(Class<T> type, String name)
{
File configFile = new File(configDirectory, name.concat(FILE_EXTENSION));