Merge "Omaha #2768 removed workaround for edex localization notifications" into omaha_14.4.1
Former-commit-id:0b67b02c61
[formerlyacba540802
] [formerly4e94590075
] [formerly3b23caee5d
[formerly4e94590075
[formerly 7f3040fd6aefbae1af344a3177bf2fd7f7ad48fb]]] Former-commit-id:3b23caee5d
Former-commit-id: a1e00fc2f447002a406254cfec4d2b123e4d5fe7 [formerly9f7f79fbc5
] Former-commit-id:aafdff4f97
This commit is contained in:
commit
21bc9efb27
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.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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue