use of com.ramussoft.common.event.AttributeEvent in project ramus by Vitaliy-Yakovchuk.
the class DeleteAttributeCommand method undo.
@Override
public void undo(IEngine iEngine) {
Attribute old = iEngine.createAttribute(attribute.getId(), attribute.getAttributeType());
iEngine.setBinaryAttribute(-1, attribute.getId(), properties);
AttributeEvent event = new AttributeEvent(engine, null, attribute, null, attribute, true);
engine.attributeCreated(event);
iEngine.updateAttribute(attribute);
event = new AttributeEvent(engine, null, attribute, old, attribute, true);
engine.attributeChanged(event);
}
use of com.ramussoft.common.event.AttributeEvent in project ramus by Vitaliy-Yakovchuk.
the class DeleteAttributeCommand method redo.
@Override
public void redo(IEngine iEngine) {
AttributeEvent event = new AttributeEvent(engine, null, attribute, attribute, null, true);
engine.beforeAttributeDeleted(event);
iEngine.deleteAttribute(attribute.getId());
engine.attributeDeleted(event);
}
use of com.ramussoft.common.event.AttributeEvent 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);
}
}
use of com.ramussoft.common.event.AttributeEvent in project ramus by Vitaliy-Yakovchuk.
the class CreateAttributeCommand method redo.
@Override
public void redo(IEngine iEngine) {
Attribute attr = iEngine.createAttribute(attribute.getId(), attribute.getAttributeType());
AttributeEvent event = new AttributeEvent(engine, null, attr, null, attr, true);
engine.attributeCreated(event);
}
use of com.ramussoft.common.event.AttributeEvent in project ramus by Vitaliy-Yakovchuk.
the class CreateAttributeCommand method undo.
@Override
public void undo(IEngine iEngine) {
iEngine.deleteAttribute(attribute.getId());
AttributeEvent event = new AttributeEvent(engine, null, attribute, attribute, null, true);
engine.attributeDeleted(event);
}
Aggregations