use of com.ramussoft.common.event.AttributeListener in project ramus by Vitaliy-Yakovchuk.
the class UpdateAttributeCommand method redo.
@Override
public void redo(IEngine iEngine) {
iEngine.updateAttribute(newAttribute);
AttributeEvent event = new AttributeEvent(engine, null, newAttribute, oldAttribute, newAttribute, true);
for (AttributeListener l : engine.getAttributeListeners()) {
l.attributeUpdated(event);
}
}
use of com.ramussoft.common.event.AttributeListener in project ramus by Vitaliy-Yakovchuk.
the class JournaledEngine method updateAttribute.
@Override
public void updateAttribute(Attribute attribute) {
Attribute old = getAttribute(attribute.getId());
deligate.updateAttribute(attribute);
synchronized (swithJournalLock) {
journal.store(new UpdateAttributeCommand(this, old, attribute));
}
AttributeEvent event = new AttributeEvent(this, null, attribute, old, attribute);
for (AttributeListener listener : attributeListeners) {
listener.attributeUpdated(event);
}
}
use of com.ramussoft.common.event.AttributeListener in project ramus by Vitaliy-Yakovchuk.
the class UpdateAttributeCommand method undo.
@Override
public void undo(IEngine iEngine) {
iEngine.updateAttribute(oldAttribute);
AttributeEvent event = new AttributeEvent(engine, null, oldAttribute, newAttribute, oldAttribute, true);
for (AttributeListener l : engine.getAttributeListeners()) {
l.attributeUpdated(event);
}
}
Aggregations