1 20 21 package org.apache.directory.ldapstudio.browser.core.events; 22 23 24 import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages; 25 import org.apache.directory.ldapstudio.browser.core.model.IAttribute; 26 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 27 import org.apache.directory.ldapstudio.browser.core.model.IEntry; 28 import org.apache.directory.ldapstudio.browser.core.model.IValue; 29 30 31 37 public class ValueModifiedEvent extends EntryModificationEvent 38 { 39 40 41 private IAttribute modifiedAttribute; 42 43 44 private IValue oldValue; 45 46 47 private IValue newValue; 48 49 50 59 public ValueModifiedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute, 60 IValue oldValue, IValue newValue ) 61 { 62 super( connection, modifiedEntry ); 63 this.modifiedAttribute = modifiedAttribute; 64 this.oldValue = oldValue; 65 this.newValue = newValue; 66 } 67 68 69 74 public IAttribute getModifiedAttribute() 75 { 76 return modifiedAttribute; 77 } 78 79 80 85 public IValue getOldValue() 86 { 87 return oldValue; 88 } 89 90 91 96 public IValue getNewValue() 97 { 98 return newValue; 99 } 100 101 102 105 public String toString() 106 { 107 return BrowserCoreMessages.bind( BrowserCoreMessages.event__replaced_oldval_by_newval_at_att_at_dn, 108 new String [] 109 { getOldValue().getStringValue(), getNewValue().getStringValue(), 110 getModifiedAttribute().getDescription(), getModifiedEntry().getDn().toString() } ); 111 } 112 113 } 114 | Popular Tags |