1 29 30 package nextapp.echo2.webrender; 31 32 import java.io.Serializable ; 33 import java.util.HashSet ; 34 import java.util.Set ; 35 36 40 public class UserInstanceUpdateManager 41 implements Serializable { 42 43 private static final String [] EMPTY_STRING_ARRAY = new String [0]; 44 private Set updatedPropertyNames = new HashSet (); 45 46 53 public String [] getPropertyUpdateNames() { 54 int size = updatedPropertyNames.size(); 55 if (size == 0) { 56 return EMPTY_STRING_ARRAY; 57 } 58 return (String []) updatedPropertyNames.toArray(new String [size]); 59 } 60 61 67 void processPropertyUpdate(String name) { 68 updatedPropertyNames.add(name); 69 } 70 71 76 public void purge() { 77 updatedPropertyNames.clear(); 78 } 79 } 80 | Popular Tags |