use of net.geoprism.registry.ws.GlobalNotificationMessage in project geoprism-registry by terraframe.
the class MasterList method publishFrequencyVersions.
@Transaction
public void publishFrequencyVersions() {
if (!this.isValid()) {
throw new InvalidMasterListException();
}
NotificationFacade.queue(new GlobalNotificationMessage(MessageType.PUBLISH_JOB_CHANGE, null));
try {
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
final ServerGeoObjectType objectType = this.getGeoObjectType();
Pair<Date, Date> range = this.getDateRange(objectType);
if (range != null) {
Date endDate = range.getSecond();
if (endDate.after(new Date())) {
endDate = new Date();
}
List<Date> dates = this.getFrequencyDates(range.getFirst(), range.getSecond());
for (Date date : dates) {
MasterListVersion version = this.getOrCreateVersion(date, MasterListVersion.PUBLISHED);
((Session) Session.getCurrentSession()).reloadPermissions();
version.publish();
}
} else {
throw new EmptyListException();
}
} finally {
Thread.currentThread().setPriority(Thread.NORM_PRIORITY);
}
}
use of net.geoprism.registry.ws.GlobalNotificationMessage in project geoprism-registry by terraframe.
the class ListCurationJob method createNewHistory.
@Override
protected JobHistory createNewHistory() {
ListCurationHistory history = new ListCurationHistory();
history.setStartTime(new Date());
history.addStatus(AllJobStatus.NEW);
history.apply();
NotificationFacade.queue(new GlobalNotificationMessage(MessageType.CURATION_JOB_CHANGE, null));
return history;
}
use of net.geoprism.registry.ws.GlobalNotificationMessage in project geoprism-registry by terraframe.
the class FhirExportJob method execute.
@Override
public void execute(ExecutionContext executionContext) throws Throwable {
NotificationFacade.queue(new GlobalNotificationMessage(MessageType.PUBLISH_JOB_CHANGE, null));
FhirExternalSystem system = this.getExternalSystem();
// this.getVersion().exportToFhir(system, this.getImplementation());
}
use of net.geoprism.registry.ws.GlobalNotificationMessage in project geoprism-registry by terraframe.
the class PublishListTypeVersionJob method afterJobExecute.
@Override
public void afterJobExecute(JobHistory history) {
super.afterJobExecute(history);
NotificationFacade.queue(new GlobalNotificationMessage(MessageType.PUBLISH_JOB_CHANGE, null));
}
use of net.geoprism.registry.ws.GlobalNotificationMessage in project geoprism-registry by terraframe.
the class PublishShapefileJob method execute.
@Override
public void execute(ExecutionContext executionContext) throws Throwable {
NotificationFacade.queue(new GlobalNotificationMessage(MessageType.PUBLISH_JOB_CHANGE, null));
this.getVersion().generateShapefile();
}
Aggregations