/** * Checks whether the file's type has changed, and fires the appropriate events. * * @param oldType The old FileType. * @throws Exception if an error occurs. */ private void maybeTypeChanged(final FileType oldType) throws Exception { final FileType newType = doGetType(); if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY) { handleCreate(newType); } else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY) { handleDelete(); } }
/** * Checks whether the file's type has changed, and fires the appropriate events. * * @param oldType The old FileType. * @throws Exception if an error occurs. */ private void maybeTypeChanged(final FileType oldType) throws Exception { final FileType newType = doGetType(); if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY) { handleCreate(newType); } else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY) { handleDelete(); } }
/** * Attaches or detaches the target file. * * @param file The FileObject. * @throws Exception if an error occurs. */ public void setFile(final FileObject file) throws Exception { final FileType oldType = doGetType(); if (file != null) { WeakRefFileListener.installListener(file, this); } this.file = file; maybeTypeChanged(oldType); }
/** * Attaches or detaches the target file. * * @param file The FileObject. * @throws Exception if an error occurs. */ public void setFile(final FileObject file) throws Exception { final FileType oldType = doGetType(); if (file != null) { WeakRefFileListener.installListener(file, this); } this.file = file; maybeTypeChanged(oldType); }
/** * Attaches or detaches the target file. * * @param file The FileObject. * @throws Exception if an error occurs. */ public void setFile(final FileObject file) throws Exception { final FileType oldType = doGetType(); if (file != null) { WeakRefFileListener.installListener(file, this); } this.file = file; maybeTypeChanged(oldType); }
/** * Checks whether the file's type has changed, and fires the appropriate events. * * @param oldType The old FileType. * @throws Exception if an error occurs. */ private void maybeTypeChanged(final FileType oldType) throws Exception { final FileType newType = doGetType(); if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY) { handleCreate(newType); } else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY) { handleDelete(); } }
/** * Attaches or detaches the target file. * @param file The FileObject. * @throws Exception if an error occurs. */ public void setFile(final FileObject file) throws Exception { final FileType oldType = doGetType(); if (file != null) { WeakRefFileListener.installListener(file, this); } this.file = file; maybeTypeChanged(oldType); }
/** * Adds a child to this file. * * @param baseName The base FileName. * @param type The FileType. * @throws Exception if an error occurs. */ public void attachChild(final FileName baseName, final FileType type) throws Exception { final FileType oldType = doGetType(); if (children.add(baseName.getBaseName())) { childrenChanged(baseName, type); } maybeTypeChanged(oldType); }
/** * Adds a child to this file. * * @param baseName The base FileName. * @param type The FileType. * @throws Exception if an error occurs. */ public void attachChild(final FileName baseName, final FileType type) throws Exception { final FileType oldType = doGetType(); if (children.add(baseName.getBaseName())) { childrenChanged(baseName, type); } maybeTypeChanged(oldType); }
/** * Adds a child to this file. * * @param baseName The base FileName. * @param type The FileType. * @throws Exception if an error occurs. */ public void attachChild(final FileName baseName, final FileType type) throws Exception { final FileType oldType = doGetType(); if (children.add(baseName.getBaseName())) { childrenChanged(baseName, type); } maybeTypeChanged(oldType); }
/** * Checks whether the file's type has changed, and fires the appropriate * events. * @param oldType The old FileType. * @throws Exception if an error occurs. */ private void maybeTypeChanged(final FileType oldType) throws Exception { final FileType newType = doGetType(); if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY) { handleCreate(newType); } else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY) { handleDelete(); } }
/** * Adds a child to this file. * @param baseName The base FileName. * @param type The FileType. * @throws Exception if an error occurs. */ public void attachChild(final FileName baseName, final FileType type) throws Exception { final FileType oldType = doGetType(); if (children.add(baseName.getBaseName())) { childrenChanged(baseName, type); } maybeTypeChanged(oldType); }