[Task 70911] applied feedback to the Scripts and Processes functionality

This commit is contained in:
Raf Ponsaerts
2020-05-18 14:48:39 +02:00
parent 026c2308ec
commit fa741eb188
15 changed files with 155 additions and 50 deletions

View File

@@ -136,7 +136,7 @@ public class ProcessServiceImpl implements ProcessService {
Bitstream bitstream = bitstreamService.create(context, is);
bitstream.setName(context, fileName);
bitstreamService.setFormat(context, bitstream, bitstreamFormatService.guessFormat(context, bitstream));
bitstreamService.addMetadata(context, bitstream, "process", "type", null, null, type);
bitstreamService.addMetadata(context, bitstream, "dspace", "process", "type", null, type);
authorizeService.addPolicy(context, bitstream, Constants.READ, context.getCurrentUser());
authorizeService.addPolicy(context, bitstream, Constants.WRITE, context.getCurrentUser());
authorizeService.addPolicy(context, bitstream, Constants.DELETE, context.getCurrentUser());
@@ -197,7 +197,7 @@ public class ProcessServiceImpl implements ProcessService {
} else {
List<Bitstream> filteredBitstreams = new ArrayList<>();
for (Bitstream bitstream : allBitstreams) {
if (StringUtils.equals(bitstreamService.getMetadata(bitstream, "process.type"), type)) {
if (StringUtils.equals(bitstreamService.getMetadata(bitstream, "dspace.process.type"), type)) {
filteredBitstreams.add(bitstream);
}
}