mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
implement new store listener api
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user