mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 04:23:13 +00:00
Fix dspace-api module per new code style
This commit is contained in:
@@ -22,67 +22,66 @@ import org.dspace.event.Event;
|
||||
*
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class CheckerConsumer implements Consumer
|
||||
{
|
||||
/** log4j logger */
|
||||
public class CheckerConsumer implements Consumer {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(CheckerConsumer.class);
|
||||
|
||||
protected ChecksumHistoryService checksumHistoryService = CheckerServiceFactory.getInstance().getChecksumHistoryService();
|
||||
|
||||
protected ChecksumHistoryService checksumHistoryService = CheckerServiceFactory.getInstance()
|
||||
.getChecksumHistoryService();
|
||||
protected BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
|
||||
|
||||
|
||||
/**
|
||||
* Initialize - allocate any resources required to operate.
|
||||
* Called at the start of ANY sequence of event consume() calls.
|
||||
*
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public void initialize() throws Exception
|
||||
{
|
||||
// no-op
|
||||
public void initialize() throws Exception {
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Consume an event
|
||||
*
|
||||
* @param ctx the execution context object
|
||||
*
|
||||
* @param ctx the execution context object
|
||||
* @param event the content event
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public void consume(Context ctx, Event event) throws Exception
|
||||
{
|
||||
|
||||
if (event.getEventType() == Event.DELETE)
|
||||
{
|
||||
public void consume(Context ctx, Event event) throws Exception {
|
||||
|
||||
if (event.getEventType() == Event.DELETE) {
|
||||
Bitstream bitstream = bitstreamService.find(ctx, event.getSubjectID());
|
||||
log.debug("Attempting to remove Checker Info");
|
||||
checksumHistoryService.deleteByBitstream(ctx, bitstream);
|
||||
log.debug("Completed removing Checker Info");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Signal that there are no more events queued in this
|
||||
* event stream.
|
||||
*
|
||||
* @param ctx Context
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public void end(Context ctx) throws Exception
|
||||
{
|
||||
// no-op
|
||||
public void end(Context ctx) throws Exception {
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finish - free any allocated resources.
|
||||
* Called when consumer is being released
|
||||
*
|
||||
* @param ctx Context
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public void finish(Context ctx) throws Exception
|
||||
{
|
||||
// no-op
|
||||
public void finish(Context ctx) throws Exception {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user