Package com.optum.sourcehawk.exec.fix
Class FixResultFactory
- java.lang.Object
-
- com.optum.sourcehawk.exec.fix.FixResultFactory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FixResulterror(String repositoryPath, String message)Create the fix result for situations where there is an error executing the fixstatic FixResultfileNotFound(FileProtocol fileProtocol)Generate a fix result for situations where the file is not foundstatic FixResultglobalError(Throwable throwable)Create the fix result for situations where there is an error executing the fixstatic FixResultnoResolver(String repositoryPath, String fileEnforcer)Create the fix result for situations when there is no resolver to fix the enforcer errorstatic FixResultresolverResult(FileProtocol fileProtocol, com.optum.sourcehawk.enforcer.ResolverResult resolverResult, boolean dryRun)Create a fix result based on the file protocol and resolver result
-
-
-
Method Detail
-
resolverResult
public static FixResult resolverResult(FileProtocol fileProtocol, com.optum.sourcehawk.enforcer.ResolverResult resolverResult, boolean dryRun)
Create a fix result based on the file protocol and resolver result- Parameters:
fileProtocol- the file protocolresolverResult- the result of the resolverdryRun- whether or not this is a dry run- Returns:
- the derived fix result
-
error
public static FixResult error(String repositoryPath, String message)
Create the fix result for situations where there is an error executing the fix- Parameters:
repositoryPath- the repository file pathmessage- the error message- Returns:
- the fix result
-
globalError
public static FixResult globalError(Throwable throwable)
Create the fix result for situations where there is an error executing the fix- Parameters:
throwable- the exception / error which occurred- Returns:
- the fix result
-
noResolver
public static FixResult noResolver(String repositoryPath, String fileEnforcer)
Create the fix result for situations when there is no resolver to fix the enforcer error- Parameters:
repositoryPath- the repository file pathfileEnforcer- the file enforcer- Returns:
- the fix result
-
fileNotFound
public static FixResult fileNotFound(FileProtocol fileProtocol)
Generate a fix result for situations where the file is not found- Parameters:
fileProtocol- the file protocol- Returns:
- the file not found fix result
-
-