[Major] moved ObserverHandler to StrolchRealm - no component anymore
Now the ObserverHandler is not a StrolchComponent anymore, and can be retrieved from the StrolchRealm. This makes the observer model be part of the realm, not global of the agent.
This commit is contained in:
parent
7696a366a2
commit
e2629c8f3f
|
@ -34,7 +34,6 @@ import li.strolch.persistence.xml.model.AuditContextFactory;
|
|||
import li.strolch.persistence.xml.model.OrderContextFactory;
|
||||
import li.strolch.persistence.xml.model.ResourceContextFactory;
|
||||
import li.strolch.runtime.configuration.ComponentConfiguration;
|
||||
import li.strolch.runtime.observer.ObserverHandler;
|
||||
import ch.eitchnet.privilege.model.Certificate;
|
||||
import ch.eitchnet.xmlpers.api.IoMode;
|
||||
import ch.eitchnet.xmlpers.api.PersistenceConstants;
|
||||
|
@ -81,11 +80,7 @@ public class XmlPersistenceHandler extends StrolchComponent implements Persisten
|
|||
@Override
|
||||
public StrolchTransaction openTx(StrolchRealm realm, Certificate certificate, String action) {
|
||||
PersistenceTransaction tx = this.persistenceManager.openTx(realm.getRealm());
|
||||
XmlStrolchTransaction strolchTx = new XmlStrolchTransaction(realm, certificate, action, tx, this);
|
||||
if (getContainer().hasComponent(ObserverHandler.class)) {
|
||||
strolchTx.setObserverHandler(getContainer().getComponent(ObserverHandler.class));
|
||||
}
|
||||
return strolchTx;
|
||||
return new XmlStrolchTransaction(realm, certificate, action, tx, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,6 +25,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import li.strolch.agent.api.Observer;
|
||||
import li.strolch.agent.api.ObserverHandler;
|
||||
import li.strolch.model.Order;
|
||||
import li.strolch.model.Resource;
|
||||
import li.strolch.model.State;
|
||||
|
@ -32,8 +34,6 @@ import li.strolch.model.StrolchRootElement;
|
|||
import li.strolch.model.Tags;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.runtime.StrolchConstants;
|
||||
import li.strolch.runtime.observer.Observer;
|
||||
import li.strolch.runtime.observer.ObserverHandler;
|
||||
import li.strolch.runtime.privilege.PrivilegeHandler;
|
||||
import li.strolch.testbase.runtime.RuntimeMock;
|
||||
|
||||
|
|
|
@ -34,10 +34,5 @@
|
|||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>ObserverHandler</name>
|
||||
<api>li.strolch.runtime.observer.ObserverHandler</api>
|
||||
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
|
||||
</Component>
|
||||
</env>
|
||||
</StrolchConfiguration>
|
|
@ -33,10 +33,5 @@
|
|||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>ObserverHandler</name>
|
||||
<api>li.strolch.runtime.observer.ObserverHandler</api>
|
||||
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
|
||||
</Component>
|
||||
</env>
|
||||
</StrolchConfiguration>
|
|
@ -34,10 +34,5 @@
|
|||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>ObserverHandler</name>
|
||||
<api>li.strolch.runtime.observer.ObserverHandler</api>
|
||||
<impl>li.strolch.runtime.observer.DefaultObserverHandler</impl>
|
||||
</Component>
|
||||
</env>
|
||||
</StrolchConfiguration>
|
Loading…
Reference in New Issue