1 4 package com.tc.config.schema; 5 6 import com.tc.config.schema.dynamic.ConfigItem; 7 8 11 public class MockIllegalConfigurationChangeHandler implements IllegalConfigurationChangeHandler { 12 13 private int numChangeFaileds; 14 private ConfigItem lastItem; 15 private Object lastOldValue; 16 private Object lastNewValue; 17 18 public MockIllegalConfigurationChangeHandler() { 19 reset(); 20 } 21 22 public void reset() { 23 this.numChangeFaileds = 0; 24 this.lastItem = null; 25 this.lastOldValue = null; 26 this.lastNewValue = null; 27 } 28 29 public void changeFailed(ConfigItem item, Object oldValue, Object newValue) { 30 ++this.numChangeFaileds; 31 this.lastItem = item; 32 this.lastOldValue = oldValue; 33 this.lastNewValue = newValue; 34 } 35 36 public ConfigItem getLastItem() { 37 return lastItem; 38 } 39 40 public Object getLastNewValue() { 41 return lastNewValue; 42 } 43 44 public Object getLastOldValue() { 45 return lastOldValue; 46 } 47 48 public int getNumChangeFaileds() { 49 return numChangeFaileds; 50 } 51 52 } 53 | Popular Tags |