Skip to content

Commit

Permalink
Add missing classes in Services.java; fix file id in EditFileFormat…
Browse files Browse the repository at this point in the history
… report (#3268)

Signed-off-by: sugarylump <[email protected]>
  • Loading branch information
SugaryLump authored Jul 30, 2024
1 parent ba16950 commit cb3aa16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.roda.core.plugins.orchestrate.JobPluginInfo;
import org.roda.core.storage.DirectResourceAccess;
import org.roda.core.storage.StorageService;
import org.roda.core.util.IdUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -144,7 +145,7 @@ private void processFiles(IndexService index, ModelService model, StorageService
Report parametersReport = validateParameters();

for (File file : files) {
Report reportItem = PluginHelper.initPluginReportItem(this, file.getId(), File.class);
Report reportItem = PluginHelper.initPluginReportItem(this, IdUtils.getFileId(file), File.class);
PluginHelper.updatePartialJobReport(this, model, reportItem, false, cachedJob);
if (parametersReport.getPluginState().equals(PluginState.SUCCESS)) {
if (file.isDirectory()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import org.roda.core.data.exceptions.RODAException;
import org.roda.core.data.v2.disposal.confirmation.DisposalConfirmation;
import org.roda.core.data.v2.index.IsIndexed;
import org.roda.core.data.v2.ip.AIP;
import org.roda.core.data.v2.ip.DIPFile;
import org.roda.core.data.v2.ip.File;
import org.roda.core.data.v2.ip.IndexedAIP;
import org.roda.core.data.v2.ip.IndexedDIP;
import org.roda.core.data.v2.ip.IndexedFile;
Expand Down Expand Up @@ -124,7 +126,7 @@ private <S extends RODAEntityRestService<O>, O extends IsIndexed, T> Completable
service = GWT.create(TransferredResourceRestService.class);
} else if (Notification.class.getName().equals(objectClassString)) {
service = GWT.create(NotificationRestService.class);
} else if (IndexedAIP.class.getName().equals(objectClassString)) {
} else if (IndexedAIP.class.getName().equals(objectClassString) || AIP.class.getName().equals(objectClassString)) {
service = GWT.create(AIPRestService.class);
} else if (DisposalConfirmation.class.getName().equals(objectClassString)) {
service = GWT.create(DisposalConfirmationRestService.class);
Expand All @@ -148,7 +150,8 @@ private <S extends RODAEntityRestService<O>, O extends IsIndexed, T> Completable
service = GWT.create(DIPRestService.class);
} else if (IndexedRepresentation.class.getName().equals(objectClassString)) {
service = GWT.create(RepresentationRestService.class);
} else if (IndexedFile.class.getName().equals(objectClassString)) {
} else if (IndexedFile.class.getName().equals(objectClassString)
|| File.class.getName().equals(objectClassString)) {
service = GWT.create(FileRestService.class);
} else if (LogEntry.class.getName().equals(objectClassString)) {
service = GWT.create(AuditLogRestService.class);
Expand Down

0 comments on commit cb3aa16

Please sign in to comment.