Omaha #2768 removed workaround for edex localization notifications
Change-Id: I34bc85f1d7331f2a6da8d14410836634f6239a17 Former-commit-id:e5f5fb76cf
[formerly9693094664
[formerly c142ac8f463951ed58d68bed24fb966adc289c2b]] Former-commit-id:9693094664
Former-commit-id:4b9c886ab4
This commit is contained in:
parent
3439348ffa
commit
b45b3203be
2 changed files with 8 additions and 34 deletions
|
@ -31,8 +31,6 @@ import com.raytheon.edex.plugin.gfe.util.SendNotifications;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest;
|
import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.server.notify.CombinationsFileChangedNotification;
|
import com.raytheon.uf.common.dataplugin.gfe.server.notify.CombinationsFileChangedNotification;
|
||||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
|
||||||
import com.raytheon.uf.common.localization.FileUpdatedMessage.FileChangeType;
|
|
||||||
import com.raytheon.uf.common.localization.IPathManager;
|
import com.raytheon.uf.common.localization.IPathManager;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||||
|
@ -41,7 +39,6 @@ import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
import com.raytheon.uf.common.util.FileUtil;
|
import com.raytheon.uf.common.util.FileUtil;
|
||||||
import com.raytheon.uf.common.util.StringUtil;
|
import com.raytheon.uf.common.util.StringUtil;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request handler for <code>SaveCombinationsFileRequest</code>. Writes the
|
* Request handler for <code>SaveCombinationsFileRequest</code>. Writes the
|
||||||
|
@ -58,6 +55,7 @@ import com.raytheon.uf.edex.core.EDEXUtil;
|
||||||
* Dec 02, 2013 #2591 dgilling Only send notification after Writer is
|
* Dec 02, 2013 #2591 dgilling Only send notification after Writer is
|
||||||
* flushed/closed.
|
* flushed/closed.
|
||||||
* Feb 05, 2014 #2591 Added CombinationFileChangedNotification
|
* Feb 05, 2014 #2591 Added CombinationFileChangedNotification
|
||||||
|
* Jul 21, 2014 2768 bclement removed FileUpdateMessage
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -89,7 +87,6 @@ public class SaveCombinationsFileHandler implements
|
||||||
String comboName = request.getFileName();
|
String comboName = request.getFileName();
|
||||||
String fileName = FileUtil.join(COMBO_FILE_DIR, comboName) + ".py";
|
String fileName = FileUtil.join(COMBO_FILE_DIR, comboName) + ".py";
|
||||||
LocalizationFile lf = pm.getLocalizationFile(localization, fileName);
|
LocalizationFile lf = pm.getLocalizationFile(localization, fileName);
|
||||||
boolean isAdded = (!lf.exists());
|
|
||||||
|
|
||||||
Writer outWriter = null;
|
Writer outWriter = null;
|
||||||
try {
|
try {
|
||||||
|
@ -123,19 +120,12 @@ public class SaveCombinationsFileHandler implements
|
||||||
}
|
}
|
||||||
lf.save();
|
lf.save();
|
||||||
|
|
||||||
// placing the notification code here ensures we only send the
|
/*
|
||||||
// notification on a successful file write operation. Otherwise we would
|
* placing the notification code here ensures we only send the
|
||||||
// have thrown an IOException and never gotten to this portion of the
|
* notification on a successful file write operation. Otherwise we would
|
||||||
// request handler.
|
* have thrown an IOException and never gotten to this portion of the
|
||||||
|
* request handler.
|
||||||
// TODO: remove sending of FileUpdateMessage after DR #2768 is fixed
|
*/
|
||||||
FileChangeType changeType = isAdded ? FileChangeType.ADDED
|
|
||||||
: FileChangeType.UPDATED;
|
|
||||||
EDEXUtil.getMessageProducer().sendAsync(
|
|
||||||
"utilityNotify",
|
|
||||||
new FileUpdatedMessage(localization, fileName, changeType, lf
|
|
||||||
.getTimeStamp().getTime()));
|
|
||||||
|
|
||||||
CombinationsFileChangedNotification notif = new CombinationsFileChangedNotification(
|
CombinationsFileChangedNotification notif = new CombinationsFileChangedNotification(
|
||||||
comboName, request.getWorkstationID(), siteID);
|
comboName, request.getWorkstationID(), siteID);
|
||||||
SendNotifications.send(notif);
|
SendNotifications.send(notif);
|
||||||
|
|
|
@ -26,8 +26,6 @@ import com.raytheon.uf.common.activetable.ActiveTableMode;
|
||||||
import com.raytheon.uf.common.activetable.VTECChange;
|
import com.raytheon.uf.common.activetable.VTECChange;
|
||||||
import com.raytheon.uf.common.activetable.VTECTableChangeNotification;
|
import com.raytheon.uf.common.activetable.VTECTableChangeNotification;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.textproduct.DraftProduct;
|
import com.raytheon.uf.common.dataplugin.gfe.textproduct.DraftProduct;
|
||||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
|
||||||
import com.raytheon.uf.common.localization.FileUpdatedMessage.FileChangeType;
|
|
||||||
import com.raytheon.uf.common.localization.IPathManager;
|
import com.raytheon.uf.common.localization.IPathManager;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||||
|
@ -38,8 +36,6 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.common.util.FileUtil;
|
import com.raytheon.uf.common.util.FileUtil;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
|
||||||
import com.raytheon.uf.edex.core.EdexException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener to handle VTEC Table Change notifications
|
* Listener to handle VTEC Table Change notifications
|
||||||
|
@ -55,6 +51,7 @@ import com.raytheon.uf.edex.core.EdexException;
|
||||||
* Fixed to work with sites other than the EDEX site
|
* Fixed to work with sites other than the EDEX site
|
||||||
* Added work around to Localization not sending
|
* Added work around to Localization not sending
|
||||||
* FileUpdatedMessages on EDEX
|
* FileUpdatedMessages on EDEX
|
||||||
|
* Jul 21, 2014 2768 bclement removed FileUpdateMessage
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -132,19 +129,6 @@ public class VTECTableChangeListener {
|
||||||
|
|
||||||
if (markit) {
|
if (markit) {
|
||||||
markDraft(lf);
|
markDraft(lf);
|
||||||
|
|
||||||
// TODO: remove sending of FileUpdateMessage after DR #2768 is
|
|
||||||
// fixed
|
|
||||||
try {
|
|
||||||
EDEXUtil.getMessageProducer().sendAsync(
|
|
||||||
"utilityNotify",
|
|
||||||
new FileUpdatedMessage(lf.getContext(), lf
|
|
||||||
.getName(), FileChangeType.UPDATED, lf
|
|
||||||
.getTimeStamp().getTime()));
|
|
||||||
} catch (EdexException e) {
|
|
||||||
statusHandler.handle(Priority.PROBLEM,
|
|
||||||
e.getLocalizedMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue