-
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.
- Loading branch information
1 parent
14a05f6
commit c9206ae
Showing
19 changed files
with
1,504 additions
and
8 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
12 changes: 12 additions & 0 deletions
12
roda-common/roda-common-data/src/main/resources/backfill/delete_document_ids.xsd
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" ?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<xs:element name="delete"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="id" minOccurs="0" maxOccurs="unbounded" type="xs:string"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
</xs:schema> |
12 changes: 11 additions & 1 deletion
12
.../main/java/org/roda/core/plugins/base/maintenance/backfill/GenerateAIPBackfillPlugin.java
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,22 +1,32 @@ | ||
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 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]> | ||
*/ | ||
public class GenerateAIPBackfillPlugin extends GenerateBackfillPlugin<AIP> { | ||
public class GenerateAIPBackfillPlugin extends GenerateRODAEntityBackfillPlugin<AIP> { | ||
|
||
@Override | ||
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(); | ||
|
112 changes: 112 additions & 0 deletions
112
...java/org/roda/core/plugins/base/maintenance/backfill/GenerateActionLogBackfillPlugin.java
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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
package org.roda.core.plugins.base.maintenance.backfill; | ||
|
||
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; | ||
} | ||
|
||
@Override | ||
public String getPreservationEventDescription() { | ||
return ""; | ||
} | ||
|
||
@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() { | ||
|
||
} | ||
|
||
@Override | ||
public String getVersionImpl() { | ||
return ""; | ||
} | ||
} |
Oops, something went wrong.