1 19 package org.openide.filesystems; 20 21 22 26 public class FileAttributeEvent extends FileEvent { 27 28 static final long serialVersionUID = -8601944809928093922L; 29 30 31 private String name; 32 33 34 private Object oldValue; 35 36 37 private Object newValue; 38 39 46 public FileAttributeEvent(FileObject src, String name, Object oldValue, Object newValue) { 47 this(src, src, name, oldValue, newValue); 48 } 49 50 57 public FileAttributeEvent(FileObject src, FileObject file, String name, Object oldValue, Object newValue) { 58 this(src, file, name, oldValue, newValue, false); 59 } 60 61 69 public FileAttributeEvent( 70 FileObject src, FileObject file, String name, Object oldValue, Object newValue, boolean expected 71 ) { 72 super(src, file, expected); 73 this.name = name; 74 this.oldValue = oldValue; 75 this.newValue = newValue; 76 } 77 78 81 public String getName() { 82 return name; 83 } 84 85 88 public Object getOldValue() { 89 return oldValue; 90 } 91 92 95 public Object getNewValue() { 96 return newValue; 97 } 98 99 @Override 100 void insertIntoToString(StringBuilder b) { 101 b.append(",name="); 102 b.append(name); 103 b.append(",oldValue="); 104 b.append(oldValue); 105 b.append(",newValue="); 106 b.append(newValue); 107 } 108 109 } 110 | Popular Tags |