org.scijava.maven.plugin
Class AbstractSciJavaDependencyChecker

java.lang.Object
  extended by org.scijava.maven.plugin.AbstractSciJavaDependencyChecker
All Implemented Interfaces:
org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor, SciJavaDependencyChecker
Direct Known Subclasses:
SnapshotFinder

public abstract class AbstractSciJavaDependencyChecker
extends Object
implements SciJavaDependencyChecker

Abstract SciJavaDependencyChecker superclass, containing useful default implementations.

Author:
Mark Hiner

Constructor Summary
AbstractSciJavaDependencyChecker()
           
 
Method Summary
 void debug(String message)
           
 boolean endVisit(org.apache.maven.shared.dependency.tree.DependencyNode node)
           
 void error(String message)
           
 boolean failed()
           
 void info(String message)
           
 boolean isFailFast()
           
 boolean isRoot(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Convenience method to check if a node is a root.
 boolean matches(String groupId)
           
 void setFailed()
          Mark this checker as in a failing state.
 void setFailFast(boolean failFast)
           
 void setGroupIds(Set<String> groupIds)
           
 void setLog(org.apache.maven.plugin.logging.Log log)
           
 boolean stopVisit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scijava.maven.plugin.SciJavaDependencyChecker
makeExceptionMessage
 
Methods inherited from interface org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor
visit
 

Constructor Detail

AbstractSciJavaDependencyChecker

public AbstractSciJavaDependencyChecker()
Method Detail

setLog

public void setLog(org.apache.maven.plugin.logging.Log log)
Specified by:
setLog in interface SciJavaDependencyChecker
Parameters:
log - Log to use by the SciJavaDependencyChecker.debug(java.lang.String), SciJavaDependencyChecker.error(java.lang.String) and SciJavaDependencyChecker.info(java.lang.String) methods.

debug

public void debug(String message)
Specified by:
debug in interface SciJavaDependencyChecker
Parameters:
message - Prints to the current Log's debug output, if a log is present.

error

public void error(String message)
Specified by:
error in interface SciJavaDependencyChecker
Parameters:
message - Prints to the current Log's error output, if a log is present.

info

public void info(String message)
Specified by:
info in interface SciJavaDependencyChecker
Parameters:
message - Prints to the current Log's info output, if a log is present.

setGroupIds

public void setGroupIds(Set<String> groupIds)
Specified by:
setGroupIds in interface SciJavaDependencyChecker
Parameters:
groupIds - An optional inclusive list of Maven groupIds. If not null, implementations should only fail on artifacts whose groupIds are contained in this set.

matches

public boolean matches(String groupId)
Specified by:
matches in interface SciJavaDependencyChecker
Parameters:
groupId - Maven groupId to test.
Returns:
true if the given groupId should be considered for checker failure.

setFailFast

public void setFailFast(boolean failFast)
Specified by:
setFailFast in interface SciJavaDependencyChecker
Parameters:
failFast - Flag indicating if a checker implementation should continue after encountering its first error.

isFailFast

public boolean isFailFast()
Specified by:
isFailFast in interface SciJavaDependencyChecker
Returns:
If true, this checker should stop visiting nodes after it encounters its first error.

isRoot

public boolean isRoot(org.apache.maven.shared.dependency.tree.DependencyNode node)
Description copied from interface: SciJavaDependencyChecker
Convenience method to check if a node is a root.

Specified by:
isRoot in interface SciJavaDependencyChecker
Parameters:
node - DependencyNode to test.
Returns:
true iff the given node is a root (no parents).

setFailed

public void setFailed()
Description copied from interface: SciJavaDependencyChecker
Mark this checker as in a failing state.

Specified by:
setFailed in interface SciJavaDependencyChecker

failed

public boolean failed()
Specified by:
failed in interface SciJavaDependencyChecker
Returns:
True if this checker is in a failed state.

stopVisit

public boolean stopVisit()
Specified by:
stopVisit in interface SciJavaDependencyChecker
Returns:
true if this checker should stop visiting nodes.

endVisit

public boolean endVisit(org.apache.maven.shared.dependency.tree.DependencyNode node)
Specified by:
endVisit in interface org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor


Copyright © 2014 SciJava. All rights reserved.