Fix dspace-api module per new code style

This commit is contained in:
Tim Donohue
2018-02-14 10:53:46 -06:00
parent 8ffc97f7f9
commit 8a48f782ea
1051 changed files with 53347 additions and 63373 deletions

View File

@@ -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
}
}