entagged.audioformats.generic
Class AudioFileModificationAdapter

java.lang.Object
  extended by entagged.audioformats.generic.AudioFileModificationAdapter
All Implemented Interfaces:
AudioFileModificationListener

public class AudioFileModificationAdapter
extends Object
implements AudioFileModificationListener

Adapter for AudioFileModificationListener.

Author:
Christian Laireiter

Constructor Summary
AudioFileModificationAdapter()
           
 
Method Summary
 void fileModified(AudioFile original, File temporary)
          (overridden)
 void fileOperationFinished(File result)
          (overridden)
 void fileWillBeModified(AudioFile file, boolean delete)
          (overridden)
 void vetoThrown(AudioFileModificationListener cause, AudioFile original, ModifyVetoException veto)
          (overridden)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioFileModificationAdapter

public AudioFileModificationAdapter()
Method Detail

fileModified

public void fileModified(AudioFile original,
                         File temporary)
                  throws ModifyVetoException
(overridden)

Specified by:
fileModified in interface AudioFileModificationListener
Parameters:
original - The original file on which the operation was started.
temporary - The modified copy. (It may be of zero size if the original was modified)
Throws:
ModifyVetoException - If the Results doesn't fit the expectations of the listener, it can prevent the replacement of the original by temporary.
If the original is already modified, this exception results in nothing.
See Also:
AudioFileModificationListener.fileModified(entagged.audioformats.AudioFile, java.io.File)

fileOperationFinished

public void fileOperationFinished(File result)
(overridden)

Specified by:
fileOperationFinished in interface AudioFileModificationListener
Parameters:
result - The remaining file. It's not of AudioFile since it may be possible that a new file was created. In that case the audiolibs would need to parse the file again, which leads to long and unnecessary operation time, if the tag data is not needed any more.
See Also:
AudioFileModificationListener.fileOperationFinished(java.io.File)

fileWillBeModified

public void fileWillBeModified(AudioFile file,
                               boolean delete)
                        throws ModifyVetoException
(overridden)

Specified by:
fileWillBeModified in interface AudioFileModificationListener
Parameters:
file - The file that will be modified.
delete - true if the deletion of tag data will be performed.
Throws:
ModifyVetoException - Thrown if the listener wants to prevent the process.
See Also:
AudioFileModificationListener.fileWillBeModified(entagged.audioformats.AudioFile, boolean)

vetoThrown

public void vetoThrown(AudioFileModificationListener cause,
                       AudioFile original,
                       ModifyVetoException veto)
(overridden)

Specified by:
vetoThrown in interface AudioFileModificationListener
Parameters:
cause - The instance which caused the veto.
original - The original file, that was about to be modified.
veto - The thrown exception.
See Also:
AudioFileModificationListener.vetoThrown(entagged.audioformats.generic.AudioFileModificationListener, entagged.audioformats.AudioFile, entagged.audioformats.exceptions.ModifyVetoException)


Copyright © 2007-2008. All Rights Reserved.