remove dissemination of official user product

This commit is contained in:
Michael James 2016-10-29 14:49:51 -05:00
parent de13364174
commit d2783195c3
3 changed files with 2 additions and 136 deletions

View file

@ -125,10 +125,6 @@ import com.raytheon.uf.common.dataplugin.text.request.RemoteRetrievalRequest;
import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest;
import com.raytheon.uf.common.dataplugin.text.request.TextProductInfoCreateRequest;
import com.raytheon.uf.common.dataplugin.text.util.AFOSParser;
import com.raytheon.uf.common.dissemination.OUPRequest;
import com.raytheon.uf.common.dissemination.OUPResponse;
import com.raytheon.uf.common.dissemination.OUPTestRequest;
import com.raytheon.uf.common.dissemination.OfficialUserProduct;
import com.raytheon.uf.common.jms.notification.INotificationObserver;
import com.raytheon.uf.common.jms.notification.NotificationException;
import com.raytheon.uf.common.jms.notification.NotificationMessage;
@ -5112,26 +5108,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
inEditMode = false;
}
if (!resend) {
OUPTestRequest testReq = new OUPTestRequest();
testReq.setOupRequest(createOUPRequest(prod,
prod.getProduct()));
try {
OUPResponse checkResponse = (OUPResponse) ThriftClient
.sendRequest(testReq);
if (checkResponse.hasFailure()) {
statusHandler.handle(Priority.PROBLEM,
"Error during text product transmission check: "
+ checkResponse.getMessage());
inEditMode = true;
return;
}
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Error during text product transmission check",
e);
inEditMode = true;
return;
}
/*
* Update the vtec string in the message. It looks wrong to
@ -5152,15 +5128,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
textEditor.setText(prod.getProduct());
}
String product = prod.getProduct();
OUPRequest req = createOUPRequest(prod, product);
if (notify != null) {
notify.add(product);
}
// Code in Run statement goes here!
new Thread(new ThriftClientRunnable(req)).start();
//new Thread(new ThriftClientRunnable(req)).start();
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Error transmitting text product", e);
@ -5256,36 +5225,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
return result;
}
private OUPRequest createOUPRequest(StdTextProduct prod, String text) {
OUPRequest req = new OUPRequest();
OfficialUserProduct oup = new OfficialUserProduct();
String awipsWanPil = prod.getSite() + prod.getNnnid() + prod.getXxxid();
String awipsID = prod.getNnnid() + prod.getXxxid();
oup.setAwipsWanPil(awipsWanPil);
oup.setNeedsWmoHeader(false);
oup.setProductText(text);
oup.setSource("TextWS");
oup.setWmoType(fixNOR(prod.getBbbid()));
oup.setUserDateTimeStamp(prod.getHdrtime());
StringBuilder fileName = new StringBuilder();
// The .wan extension followed by the 10 digit epoch seconds
// of simulated time is used in EDEX's WarningDecoder to
// determine the base time.
fileName.append(awipsID).append(".wan")
.append(TimeUtil.getUnixTime(TimeUtil.newDate()));
oup.setFilename(fileName.toString());
oup.setAddress(addressee);
if (attachedFile != null && attachedFilename != null) {
oup.setAttachedFile(attachedFile);
oup.setAttachedFilename(attachedFilename);
}
req.setCheckBBB(true);
req.setProduct(oup);
req.setUser(UserController.getUserObject());
return req;
}
/**
* Recreates the original message by combining the header and the body from
@ -7819,65 +7758,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
}
}
/*
* This class handles sending a request to a Thrift Client.
*/
private class ThriftClientRunnable implements Runnable {
private final OUPRequest request;
public ThriftClientRunnable(OUPRequest request) {
this.request = request;
}
@Override
public void run() {
try {
final OUPResponse response = (OUPResponse) ThriftClient
.sendRequest(request);
// if (response.isAcknowledged()) {
if (response.hasFailure()) {
Priority p = Priority.EVENTA;
if (!response.isAttempted()) {
// if was never attempted to send or store even locally
p = Priority.CRITICAL;
} else if (!response.isSendLocalSuccess()) {
// if send/store locally failed
p = Priority.CRITICAL;
} else if (!response.isSendWANSuccess()) {
// if send to WAN failed
if (response.getNeedAcknowledgment()) {
// if ack was needed, if it never sent then no ack
// was recieved
p = Priority.CRITICAL;
} else {
// if no ack was needed
p = Priority.EVENTA;
}
} else if (response.getNeedAcknowledgment()
&& !response.isAcknowledged()) {
// if sent but not acknowledged when acknowledgement is
// needed
p = Priority.CRITICAL;
}
statusHandler.handle(p, response.getMessage());
} else {
// no failure
// As of DR 15418, nothing is done with
// response.getChangedBBB()
}
Thread.interrupted();
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Error transmitting text product", e);
}
}
}
/*
* (non-Javadoc)
*

View file

@ -49,13 +49,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.dissemination"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.menus"
download-size="0"

View file

@ -22,13 +22,6 @@
<import feature="com.raytheon.uf.edex.archive.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
id="com.raytheon.uf.edex.dissemination"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.text"
download-size="0"