Skip to content

Commit

Permalink
update java doc and update index
Browse files Browse the repository at this point in the history
wangf1122 committed Dec 21, 2023
1 parent 01a7f2f commit 8a49652
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -69,7 +69,10 @@ public interface IMetadataStatus {
MetadataStatus setStatusExt(ServiceContext context, int id, int status, ISODate changeDate, String changeMessage) throws Exception;

/**
* Set status of metadata id and do not reindex metadata id afterwards.
* Set status of metadata id and reindex metadata id afterwards based on updateIndex flag
*
* @param status metadata status to set
* @param updateIndex index update flag
*
* @return the saved status entity object
*/
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ private void changeToApproved(AbstractMetadata md, MetadataStatus previousStatus
status.setChangeDate(new ISODate());
status.setUserId(ServiceContext.get().getUserSession().getUserIdAsInt());

metadataStatus.setStatusExt(status, true);
metadataStatus.setStatusExt(status, false);

Log.trace(Geonet.DATA_MANAGER, "Metadata with id " + md.getId() + " automatically approved due to publishing.");
}
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ private AbstractMetadata approveWithDraft(MetadataStatusChanged event) throws Nu
status.setChangeDate(new ISODate());
status.setUserId(event.getUser());

metadataStatus.setStatusExt(status, true);
metadataStatus.setStatusExt(status, false);

} else if (md instanceof Metadata) {
draft = null; //metadataDraftRepository.findOneByUuid(md.getUuid());

0 comments on commit 8a49652

Please sign in to comment.