Omaha #4860 - Fixed TAF editor Store to DB option.
Former-commit-id: ce07a97d87a549406c7bb8407d79b761f2d4e61a
This commit is contained in:
parent
eaeca53e49
commit
df92008e48
4 changed files with 36 additions and 55 deletions
|
@ -350,6 +350,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
|||
* 8Jul2015 DR 15044 dhuffman Implemented tabbing and tabs to spaces.
|
||||
* Aug 31, 2015 4749 njensen Changed setCloseCallback to addCloseCallback
|
||||
* Sep 02, 2015 4781 dgilling Used different constructor for SpellCheckDlg.
|
||||
* Sep 30, 2015 4860 skorolev Corrected misspelling.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -5370,30 +5371,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
|
||||
storedProduct.setProduct(productText.trim());
|
||||
|
||||
/*
|
||||
* if (storedProduct == null) { tdmInst.setStdTextProduct(token,
|
||||
* currentWmoId, currentSiteId, currentWsfoId, currentProdCategory,
|
||||
* currentProdDesignator, currentDate, currentBbbId,
|
||||
* System.currentTimeMillis(), "HELLO AWIPS!"); storedProduct =
|
||||
* tdmInst.getStdTextProduct(token); } else {
|
||||
* tdmInst.setStdTextProduct(token, currentWmoId, currentSiteId,
|
||||
* currentWsfoId, currentProdCategory, currentProdDesignator,
|
||||
* currentDate, currentBbbId, storedProduct.getCreatetime(),
|
||||
* storedProduct .getProduct()); storedProduct =
|
||||
* tdmInst.getStdTextProduct(token); }
|
||||
*
|
||||
* tmpProd = new StdTextProduct(storedProduct);
|
||||
* tmpProd.setProduct(currentText); } else { if (storedProduct == null)
|
||||
* { tmpProd = new StdTextProduct(currentWmoId, currentSiteId,
|
||||
* currentWsfoId, "TEX", "T0" + token, currentDate, currentBbbId,
|
||||
* System.currentTimeMillis(), currentHeader + "\n" + tmpStr + "@@TEXT0"
|
||||
* + token + "@@" + currentProdCategory + currentProdDesignator); } else
|
||||
* { tmpProd = new StdTextProduct(currentWmoId, currentSiteId,
|
||||
* currentWsfoId, "TEX", "T0" + token, currentDate, currentBbbId,
|
||||
* storedProduct.getCreatetime(), currentHeader + "\n" + tmpStr +
|
||||
* "@@TEXT0" + token + "@@" + currentProdCategory +
|
||||
* currentProdDesignator); } }
|
||||
*/
|
||||
if (isAutoSave) {
|
||||
autoSave.saveProduct(storedProduct);
|
||||
} else if (isOperationalSend || resend) {
|
||||
|
@ -5592,7 +5569,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
CAVEMode mode = CAVEMode.getMode();
|
||||
boolean result = (CAVEMode.OPERATIONAL.equals(mode)
|
||||
|| CAVEMode.TEST.equals(mode) ? true : false);
|
||||
request.setOpertionalFlag(result);
|
||||
request.setOperationalFlag(result);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.raytheon.uf.common.time.SimulatedTime;
|
|||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
import com.raytheon.viz.texteditor.msgs.IAviationObserver;
|
||||
|
||||
/**
|
||||
|
@ -39,15 +40,15 @@ import com.raytheon.viz.texteditor.msgs.IAviationObserver;
|
|||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 15, 2008 1119 grichard Initial creation.
|
||||
* Date Ticket# Engineer Description
|
||||
* ----------- ------- --------- --------------------------
|
||||
* May 15, 2008 1119 grichard Initial creation.
|
||||
* 07/28/2009 2610 rjpeter Moved error handling to alert viz.
|
||||
* 04/14/2010 4734 mhuang Corrected StdTextProduct import
|
||||
* dependency
|
||||
* 05/10/2010 2187 cjeanbap Added StdTextProductFactory
|
||||
* functionality.
|
||||
* 04/14/2010 4734 mhuang Corrected StdTextProduct import dependency
|
||||
* 05/10/2010 2187 cjeanbap Added StdTextProductFactory functionality.
|
||||
* 09/11/2013 2277 mschenke Removed unused function
|
||||
* Sep 28, 2015 4860 skorolev Added CAVE mode.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author grichard
|
||||
|
@ -83,7 +84,6 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
String siteWmoId = "FTUS43";
|
||||
String currentHeader = getHeaderTextField(siteWmoId, siteName,
|
||||
currentDate, "\n", "WRK" + "TAF");
|
||||
// System.out.println("Current header: " + currentHeader);
|
||||
|
||||
StdTextProductServerRequest request = new StdTextProductServerRequest();
|
||||
request.setWmoid(siteWmoId);
|
||||
|
@ -95,7 +95,7 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
request.setBbbid("NOR");
|
||||
request.setCreatetime(System.currentTimeMillis());
|
||||
request.setProduct(currentHeader + "\n" + tmpStr);
|
||||
|
||||
request.setOperationalFlag(CAVEMode.getMode() != CAVEMode.PRACTICE);
|
||||
try {
|
||||
ThriftClient.sendRequest(request);
|
||||
} catch (VizException e1) {
|
||||
|
|
|
@ -25,15 +25,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
import com.raytheon.uf.common.serialization.comm.IServerRequest;
|
||||
|
||||
/**
|
||||
* Standard Text Product Server Request class to be used in a thrift
|
||||
* service.
|
||||
* Standard Text Product Server Request class to be used in a thrift service.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 19May2010 cjeanbap Initial creation
|
||||
* May 19, 2010 cjeanbap Initial creation
|
||||
* Sep 30, 2015 4860 skorolev Corrected misspelling.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,7 +81,7 @@ public class StdTextProductServerRequest implements IServerRequest {
|
|||
private String product;
|
||||
|
||||
@DynamicSerializeElement
|
||||
private boolean opertionalFlag;
|
||||
private boolean operationalFlag;
|
||||
|
||||
public StdTextProductServerRequest() {
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ public class StdTextProductServerRequest implements IServerRequest {
|
|||
*/
|
||||
public StdTextProductServerRequest(String wmoid, String site, String cccid,
|
||||
String nnnid, String xxxid, String hdrtime, String bbbid,
|
||||
Long dataCrc, Long createTime, String product, boolean opertionalFlag) {
|
||||
Long dataCrc, Long createTime, String product,
|
||||
boolean operationalFlag) {
|
||||
this.wmoid = wmoid;
|
||||
this.site = site;
|
||||
this.cccid = cccid;
|
||||
|
@ -102,7 +103,7 @@ public class StdTextProductServerRequest implements IServerRequest {
|
|||
this.dataCrc = dataCrc;
|
||||
this.createTime = createTime;
|
||||
this.product = product;
|
||||
this.opertionalFlag = opertionalFlag;
|
||||
this.operationalFlag = operationalFlag;
|
||||
}
|
||||
|
||||
public String getBbbid() {
|
||||
|
@ -185,11 +186,12 @@ public class StdTextProductServerRequest implements IServerRequest {
|
|||
this.dataCrc = dataCrc;
|
||||
}
|
||||
|
||||
public boolean isOpertionalFlag() {
|
||||
return opertionalFlag;
|
||||
public boolean isOperationalFlag() {
|
||||
return operationalFlag;
|
||||
}
|
||||
|
||||
public void setOpertionalFlag(boolean opertionalFlag) {
|
||||
this.opertionalFlag = opertionalFlag;
|
||||
public void setOperationalFlag(boolean operationalFlag) {
|
||||
this.operationalFlag = operationalFlag;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.uf.edex.plugin.text.dbsrv.impl.AlarmAlertUtil;
|
|||
* 02Aug2010 2187 cjeanbap Move AlarmAlertUtil.sendProductAlarmAlert()
|
||||
* outside of if-statement.
|
||||
* May 12, 2014 2536 bclement removed unused import
|
||||
* Sep 30, 2015 4860 skorolev Corrected misspelling.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,11 +60,12 @@ import com.raytheon.uf.edex.plugin.text.dbsrv.impl.AlarmAlertUtil;
|
|||
|
||||
public class StdTextProductRequestHandler implements
|
||||
IRequestHandler<StdTextProductServerRequest> {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(StdTextProductRequestHandler.class);
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(StdTextProductRequestHandler.class);
|
||||
|
||||
private static final String WATCH_WARN_QUEUE = "ldadWatchWarnDirect";
|
||||
|
||||
private TextDB dao;
|
||||
private final TextDB dao;
|
||||
|
||||
public StdTextProductRequestHandler() {
|
||||
dao = new TextDB();
|
||||
|
@ -82,7 +84,7 @@ public class StdTextProductRequestHandler implements
|
|||
String bbbid = request.getBbbid();
|
||||
Long createtime = request.getCreatetime();
|
||||
String product = request.getProduct();
|
||||
boolean operationalFlag = request.isOpertionalFlag();
|
||||
boolean operationalFlag = request.isOperationalFlag();
|
||||
|
||||
StdTextProduct text = (operationalFlag ? new OperationalStdTextProduct()
|
||||
: new PracticeStdTextProduct());
|
||||
|
@ -127,7 +129,7 @@ public class StdTextProductRequestHandler implements
|
|||
EDEXUtil.getMessageProducer().sendAsync(queue, message);
|
||||
} catch (EdexException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Unable to send product '"
|
||||
+ message + "' to queue '" + queue + "'", e);
|
||||
+ message + "' to queue '" + queue + "'", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue