Lib.resource.checkEditPrivilege(context, id);
GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
DataManager dataMan = gc.getBean(DataManager.class);
ThumbnailMaker thumbnailMaker = gc.getBean(ThumbnailMaker.class);
//--- check if the metadata has been modified from last time
if (version != null && !dataMan.getVersion(id).equals(version)) {
throw new ConcurrentUpdateEx(id);
}
File thumbnailFile = thumbnailMaker.generateThumbnail(
jsonConfig,
rotationAngle);
//--- create destination directory
String dataDir = Lib.resource.getDir(context, Params.Access.PUBLIC, id);