-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated logic for generate backfill plugin
Signed-off-by: Alexandre Flores <[email protected]>
- Loading branch information
1 parent
c9206ae
commit 50e4ffb
Showing
18 changed files
with
373 additions
and
810 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
package org.roda.core.plugins.base.maintenance.backfill; | ||
|
||
import org.roda.core.data.exceptions.AuthorizationDeniedException; | ||
import org.roda.core.data.exceptions.GenericException; | ||
import org.roda.core.data.exceptions.NotFoundException; | ||
import org.roda.core.data.exceptions.RequestNotValidException; | ||
import java.util.List; | ||
|
||
import org.roda.core.data.v2.index.IsIndexed; | ||
import org.roda.core.data.v2.ip.AIP; | ||
import org.roda.core.data.v2.ip.IndexedAIP; | ||
import org.roda.core.model.ModelService; | ||
import org.roda.core.plugins.Plugin; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Alexandre Flores <[email protected]> | ||
*/ | ||
|
@@ -22,11 +17,6 @@ protected <I extends IsIndexed> Class<I> getIndexClass() { | |
return (Class<I>) IndexedAIP.class; | ||
} | ||
|
||
@Override | ||
protected AIP retrieveModelObject(ModelService model, String id) throws AuthorizationDeniedException, NotFoundException, GenericException, RequestNotValidException { | ||
return model.retrieveAIP(id); | ||
} | ||
|
||
@Override | ||
public Plugin<AIP> cloneMe() { | ||
return new GenerateAIPBackfillPlugin(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,111 +2,28 @@ | |
|
||
import java.util.List; | ||
|
||
import org.roda.core.data.common.RodaConstants; | ||
import org.roda.core.data.v2.LiteOptionalWithCause; | ||
import org.roda.core.data.v2.Void; | ||
import org.roda.core.data.v2.index.IsIndexed; | ||
import org.roda.core.data.v2.jobs.PluginType; | ||
import org.roda.core.data.v2.jobs.Report; | ||
import org.roda.core.data.v2.log.LogEntry; | ||
import org.roda.core.index.IndexService; | ||
import org.roda.core.model.ModelService; | ||
import org.roda.core.plugins.AbstractPlugin; | ||
import org.roda.core.plugins.Plugin; | ||
import org.roda.core.plugins.PluginException; | ||
import org.roda.core.storage.StorageService; | ||
|
||
/** | ||
* @author Alexandre Flores <[email protected]> | ||
*/ | ||
public class GenerateActionLogBackfillPlugin extends AbstractPlugin<Void> { | ||
@Override | ||
public String getName() { | ||
return "Generate complete action log index backfill"; | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public RodaConstants.PreservationEventType getPreservationEventType() { | ||
return null; | ||
} | ||
public class GenerateActionLogBackfillPlugin extends GenerateRODAEntityBackfillPlugin<LogEntry> { | ||
|
||
@Override | ||
public String getPreservationEventDescription() { | ||
return ""; | ||
protected <I extends IsIndexed> Class<I> getIndexClass() { | ||
return (Class<I>) LogEntry.class; | ||
} | ||
|
||
@Override | ||
public String getPreservationEventSuccessMessage() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public String getPreservationEventFailureMessage() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public String getPreservationEventSkippedMessage() { | ||
return super.getPreservationEventSkippedMessage(); | ||
} | ||
|
||
@Override | ||
public PluginType getType() { | ||
return PluginType.MISC; | ||
} | ||
|
||
@Override | ||
public List<String> getCategories() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public Plugin<Void> cloneMe() { | ||
return new GenerateActionLogBackfillPlugin(); | ||
} | ||
|
||
@Override | ||
public boolean areParameterValuesValid() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void init() throws PluginException { | ||
|
||
} | ||
|
||
@Override | ||
public List<Class<Void>> getObjectClasses() { | ||
return List.of(Void.class); | ||
} | ||
|
||
@Override | ||
public Report beforeAllExecute(IndexService index, ModelService model, StorageService storage) throws PluginException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Report execute(IndexService index, ModelService model, StorageService storage, List<LiteOptionalWithCause> list) throws PluginException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Report afterAllExecute(IndexService index, ModelService model, StorageService storage) throws PluginException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void shutdown() { | ||
|
||
public Plugin<LogEntry> cloneMe() { | ||
return new GenerateActionLogBackfillPlugin(); | ||
} | ||
|
||
@Override | ||
public String getVersionImpl() { | ||
return ""; | ||
public List<Class<LogEntry>> getObjectClasses() { | ||
return List.of(LogEntry.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.