org.jaudiotagger.audio.generic
Class AudioFileModificationAdapter

java.lang.Object
  extended by org.jaudiotagger.audio.generic.AudioFileModificationAdapter
All Implemented Interfaces:
AudioFileModificationListener

public class AudioFileModificationAdapter
extends java.lang.Object
implements AudioFileModificationListener

Adapter for AudioFileModificationListener.

Author:
Christian Laireiter

Constructor Summary
AudioFileModificationAdapter()
           
 
Method Summary
 void fileModified(AudioFile original, java.io.File temporary)
          (overridden)
 void fileOperationFinished(java.io.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,
                         java.io.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(org.jaudiotagger.audio.AudioFile, File)

fileOperationFinished

public void fileOperationFinished(java.io.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(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(org.jaudiotagger.audio.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(org.jaudiotagger.audio.generic.AudioFileModificationListener, org.jaudiotagger.audio.AudioFile, org.jaudiotagger.audio.exceptions.ModifyVetoException)