Package com.tagtraum.beatunes.inspection
Class IgnoreIssueSolution<T extends Issue>
- java.lang.Object
-
- com.tagtraum.beatunes.inspection.IgnoreIssueSolution<T>
-
- All Implemented Interfaces:
Solution<T>
- Direct Known Subclasses:
CorrectSortNameSolution
,IgnoreMissingTrackCountSolution
,IgnoreRareGenreSolution
,MultiAlbumArtistSolution
,MultiGenreArtistSolution
,MultiLanguageArtistSolution
,MultiYearAlbumSolution
,NotMiscapitalizedSolution
,NoTypoSolution
public abstract class IgnoreIssueSolution<T extends Issue> extends Object implements Solution<T>
Superclass for all solutions that effectively ignore the issue. Inheriting from this class makes sure that the solutions are properly grouped in the UI.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description IgnoreIssueSolution(T issue, String description, String processMessage, IssueDescriptor... issueDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CallableSolution
createCallable(Collection<AudioSong> songs, boolean allowUserInteraction)
Creates aCallableSolution
that may be called later to actually apply this solution.BeaTunes
getApplication()
String
getClassDescription()
Returns a common description for this class of solution.String
getClassId()
Id for a class of solutions.String
getDescription()
Description of this solution.String
getId()
Unique id for this solution instance.T
getIssue()
Return issue this is a solution to.Collection<IssueDescriptor>
getIssueDescriptors(List<Long> selectedSongIds)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.tagtraum.beatunes.inspection.Solution
isPreferred
-
-
-
-
Constructor Detail
-
IgnoreIssueSolution
public IgnoreIssueSolution(T issue, String description, String processMessage, IssueDescriptor... issueDescriptor)
-
-
Method Detail
-
getApplication
public BeaTunes getApplication()
-
getIssue
public T getIssue()
Description copied from interface:Solution
Return issue this is a solution to.
-
createCallable
public CallableSolution createCallable(Collection<AudioSong> songs, boolean allowUserInteraction)
Description copied from interface:Solution
Creates a
CallableSolution
that may be called later to actually apply this solution. You may returnnull
to signal, that the callable could not be created, perhaps because the user cancelled some interaction.This method is typically called on the EDT to allow potential user interaction, so it must execute quickly.
- Specified by:
createCallable
in interfaceSolution<T extends Issue>
- Parameters:
songs
- songs this solution should be applied to, i.e. the songs the user selected in the UIallowUserInteraction
- if set to true the solution may show a dialog asking for confirmation or some other form of visual user interaction. If set to false, the solution has to be applied silently.- Returns:
- a callable, if the problem can be solved,
null
, if the user cancelled or some other problem occurred
-
getIssueDescriptors
public Collection<IssueDescriptor> getIssueDescriptors(List<Long> selectedSongIds)
- Parameters:
selectedSongIds
- typically the ids of songs specified in a priorcreateCallable(Collection, boolean)
call- Returns:
- issue descriptors
-
getDescription
public String getDescription()
Description copied from interface:Solution
Description of this solution. You may use HTML, but no enclosing <html> tags. E.g.:My <em>super</em> solution.
- Specified by:
getDescription
in interfaceSolution<T extends Issue>
- Returns:
- description
- See Also:
Solution.getClassDescription()
-
getId
public String getId()
Description copied from interface:Solution
Unique id for this solution instance. May be used in hyperlinks.- Specified by:
getId
in interfaceSolution<T extends Issue>
- Returns:
- unique id for this issue, which can be used in hyperlinks
- See Also:
Solution.getClassId()
-
getClassDescription
public final String getClassDescription()
Description copied from interface:Solution
Returns a common description for this class of solution. This is used when the same kind (or class) of solution should be used for a collection of issues. In other words, the user selects multiple issues and wants them all solved in the same way. This implies, that there cannot be any user interaction.
If this solution does not make any sense as a class solution, this method must returnnull
.- Specified by:
getClassDescription
in interfaceSolution<T extends Issue>
- Returns:
- description contains description for a whole collection of issues, not an individual one or null, if this solution cannot be applied to multiple issues at once (because it is too specific for a given issue)
- See Also:
Solution.getDescription()
,Solution.getClassId()
-
getClassId
public final String getClassId()
Description copied from interface:Solution
Id for a class of solutions. If this solutions cannot be applied for multiple issues at once, this method must returnnull
.- Specified by:
getClassId
in interfaceSolution<T extends Issue>
- Returns:
- id for this solution's class - typically unique per solutions class. Default value (if used) should be the actual class name, i.e. solution.getClass().getName()
- See Also:
Solution.getClassDescription()
-
-