Package org.jboss.set.pull.processor
Class AbstractProcessor
- java.lang.Object
-
- org.jboss.set.pull.processor.AbstractProcessor
-
- All Implemented Interfaces:
Processor
- Direct Known Subclasses:
OpenPRProcessor
public abstract class AbstractProcessor extends Object implements Processor
Abstract class. Base for processors. Provide basic code to allow simpler processor dev.- Author:
- baranowb
-
-
Field Summary
Fields Modifier and Type Field Description protected static LoggerLOGGERprotected ProcessorConfigprocessorConfigprotected StringsimpleName
-
Constructor Summary
Constructors Constructor Description AbstractProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<PullRequestReference>fetchPullRequestsRaw()Processor can fetch PRs based on any criteria it sees fit and by any means.abstract ProcessorPhasegetPhase()Returh phase for which implementation will work.voidinit(ProcessorConfig processorConfig)protected voidlog(Level level, String msg)protected voidlog(Level level, String msg, Throwable t)voidprocess()
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
-
processorConfig
protected ProcessorConfig processorConfig
-
simpleName
protected final String simpleName
-
-
Method Detail
-
init
public void init(ProcessorConfig processorConfig)
-
getPhase
public abstract ProcessorPhase getPhase()
Returh phase for which implementation will work. This is used to pick proper evaluators and actions
-
fetchPullRequestsRaw
protected abstract List<PullRequestReference> fetchPullRequestsRaw()
Processor can fetch PRs based on any criteria it sees fit and by any means.fetchPullRequests()will call it and perform some filtering.- Returns:
-
process
public void process() throws ProcessorException- Specified by:
processin interfaceProcessor- Throws:
ProcessorException
-
-