/** Fires event */ protected final void fileAttributeChanged0(FileAttributeEvent fileattributeevent) { super.fireFileAttributeChangedEvent(listeners(), fileattributeevent); if (fileattributeevent.getFile().equals(this) && (parent != null)) { FileAttributeEvent ev = new FileAttributeEvent( parent, fileattributeevent.getFile(), fileattributeevent.getName(), fileattributeevent.getOldValue(), fileattributeevent.getNewValue(), fileattributeevent.isExpected() ); try { ev.inheritPostNotify(fileattributeevent); parent.fileAttributeChanged0(ev); } finally { ev.setPostNotify(null); } } }
/** refreshes children recursively.*/ private void refreshChildren(AbstractFolder fo, ResourceElem resElem) { if (fo.isRoot()) { initializeReference(rootRef = new FileObjRef<AbstractFolder>(fo), resElem); } java.util.List<String> nameList = resElem.getChildren(); String[] names = new String[nameList.size()]; ResourceElem[] children = new ResourceElem[names.length]; nameList.toArray(names); for (int i = 0; i < names.length; i++) children[i] = resElem.getChild(names[i]); fo.refresh(null, null, true, true, names); for (int i = 0; i < children.length; i++) { AbstractFolder fo2 = (AbstractFolder) fo.getFileObject(names[i]); FileObjRef currentRef = (FileObjRef) findReference(fo2.getPath()); int diff = initializeReference(currentRef, children[i]); fo2.lastModified(); if (fo2.isFolder()) { refreshChildren(fo2, children[i]); } else { if ((diff & 0x01) != 0) { fo2.fileChanged0(new FileEvent(fo2)); } else { if ((diff & 0x02) != 0) { fo2.fileAttributeChanged0(new FileAttributeEvent(fo2, null, null, null)); } } } } }
/** Fires event */ protected final void fileAttributeChanged0 (FileAttributeEvent fileattributeevent) { super.fireFileAttributeChangedEvent(listeners (), fileattributeevent); if(fileattributeevent.getFile().equals(this) && parent != null) { FileAttributeEvent ev = new FileAttributeEvent( parent, fileattributeevent.getFile(), fileattributeevent.getName(), fileattributeevent.getOldValue(), fileattributeevent.getNewValue(), fileattributeevent.isExpected () ); parent.fileAttributeChanged0 (ev); } }
/** Fires event */ protected final void fileAttributeChanged0 (FileAttributeEvent fileattributeevent) { super.fireFileAttributeChangedEvent(listeners (), fileattributeevent); if(fileattributeevent.getFile().equals(this) && parent != null) { FileAttributeEvent ev = new FileAttributeEvent( parent, fileattributeevent.getFile(), fileattributeevent.getName(), fileattributeevent.getOldValue(), fileattributeevent.getNewValue(), fileattributeevent.isExpected () ); parent.fileAttributeChanged0 (ev); } }