if (this.cutRequested && this.copyRequested) {
throw new IllegalStateException("The object cannot request cut and copy operations all at once.");
}
if (this.cutRequested) {
for (Iterator it = this.selectedFolders.iterator(); it.hasNext(); ){
ViewFolder viewFolder = (ViewFolder) it.next();
Folder cutFolder = viewFolder.getFolder();
folderDao.cutTo(cutFolder, destinationCollection);
this.cutRequested = false;
}
} else if (this.copyRequested) {
for (Iterator it = this.selectedFolders.iterator(); it.hasNext(); ){
ViewFolder viewFolder = (ViewFolder) it.next();
Folder copiedFolder = viewFolder.getFolder();
folderDao.copyTo(copiedFolder, destinationCollection);
this.copyRequested = false;
}
} else {
//All false: nothing to do