Omaha #2768 removed workaround for edex localization notifications

Change-Id: I34bc85f1d7331f2a6da8d14410836634f6239a17

Former-commit-id: 4b9c886ab4 [formerly 9693094664] [formerly 4b9c886ab4 [formerly 9693094664] [formerly e5f5fb76cf [formerly c142ac8f463951ed58d68bed24fb966adc289c2b]]]
Former-commit-id: e5f5fb76cf
Former-commit-id: 5a091ca2bb [formerly c29be3e09e]
Former-commit-id: 8c286d5547
This commit is contained in:
Brian Clements 2014-07-21 09:53:34 -05:00
parent 0e4a0fd1d3
commit 0a1f74fc79
2 changed files with 8 additions and 34 deletions

View file

@ -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.server.message.ServerResponse;
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.LocalizationContext;
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.util.FileUtil;
import com.raytheon.uf.common.util.StringUtil;
import com.raytheon.uf.edex.core.EDEXUtil;
/**
* 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
* flushed/closed.
* Feb 05, 2014 #2591 Added CombinationFileChangedNotification
* Jul 21, 2014 2768 bclement removed FileUpdateMessage
*
* </pre>
*
@ -89,7 +87,6 @@ public class SaveCombinationsFileHandler implements
String comboName = request.getFileName();
String fileName = FileUtil.join(COMBO_FILE_DIR, comboName) + ".py";
LocalizationFile lf = pm.getLocalizationFile(localization, fileName);
boolean isAdded = (!lf.exists());
Writer outWriter = null;
try {
@ -123,19 +120,12 @@ public class SaveCombinationsFileHandler implements
}
lf.save();
// placing the notification code here ensures we only send the
// notification on a successful file write operation. Otherwise we would
// 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()));
/*
* placing the notification code here ensures we only send the
* notification on a successful file write operation. Otherwise we would
* have thrown an IOException and never gotten to this portion of the
* request handler.
*/
CombinationsFileChangedNotification notif = new CombinationsFileChangedNotification(
comboName, request.getWorkstationID(), siteID);
SendNotifications.send(notif);

View file

@ -26,8 +26,6 @@ import com.raytheon.uf.common.activetable.ActiveTableMode;
import com.raytheon.uf.common.activetable.VTECChange;
import com.raytheon.uf.common.activetable.VTECTableChangeNotification;
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.LocalizationContext;
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.Priority;
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
@ -55,6 +51,7 @@ import com.raytheon.uf.edex.core.EdexException;
* Fixed to work with sites other than the EDEX site
* Added work around to Localization not sending
* FileUpdatedMessages on EDEX
* Jul 21, 2014 2768 bclement removed FileUpdateMessage
*
* </pre>
*
@ -132,19 +129,6 @@ public class VTECTableChangeListener {
if (markit) {
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);
}
}
}
}