Issue #1762: Fix Service Backup regression caused by last commit under this
ticket: NullPointerException caused by missing DynamicSerialize annotation and disabled export configuration option caused by incomplete request. Former-commit-id:e96c2962a5
[formerly9fa6048f38
] [formerly881566d46b
] [formerlye96c2962a5
[formerly9fa6048f38
] [formerly881566d46b
] [formerly938f9cd7f7
[formerly881566d46b
[formerly 071f7e80fc09720a3b1763d4903eb75fb96ebcca]]]] Former-commit-id:938f9cd7f7
Former-commit-id:f22922eaca
[formerly72e808cb1c
] [formerly 148b8c40d4c89da3d04e1f5c6a0dc0ba21499d31 [formerly42f096abe8
]] Former-commit-id: 059d65f359518574a4d1fa4376a7b2dbfb491997 [formerly274ca5a740
] Former-commit-id:888a61c520
This commit is contained in:
parent
449dcca1dd
commit
380b13d352
3 changed files with 13 additions and 2 deletions
|
@ -25,6 +25,7 @@ import com.raytheon.uf.common.dataplugin.gfe.request.CheckServiceBackupPrimarySi
|
|||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
|
@ -42,6 +43,9 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
|
|||
* Nov 14, 2012 jdynina Added check for national center
|
||||
* May 02, 2013 #1762 dgilling Replace national center check with
|
||||
* a svcbu PRIMARY_SITES check.
|
||||
* Jul 22, 2013 #1762 dgilling Ensure all fields of
|
||||
* CheckServiceBackupPrimarySiteRequest are
|
||||
* filled.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -85,8 +89,10 @@ public class CheckPermissions {
|
|||
return authorized;
|
||||
}
|
||||
|
||||
public static boolean runningAsPrimary() {
|
||||
public static boolean runningAsPrimary(String siteId) {
|
||||
CheckServiceBackupPrimarySiteRequest request = new CheckServiceBackupPrimarySiteRequest();
|
||||
request.setSiteID(siteId);
|
||||
request.setWorkstationID(VizApp.getWsId());
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
ServerResponse<Boolean> sr = (ServerResponse<Boolean>) ThriftClient
|
||||
|
|
|
@ -93,6 +93,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
|||
* Mar 20, 2013 1447 dgilling Port troubleshooting mode changes
|
||||
* from A1 DR 21404, some code cleanup.
|
||||
* May 01, 2013 1762 dgilling Remove national center check.
|
||||
* Jul 22, 2013 1762 dgilling Fix running as primary check.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -168,7 +169,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
|
|||
super(parentShell);
|
||||
authorized = CheckPermissions.getAuthorization();
|
||||
this.site = LocalizationManager.getInstance().getCurrentSite();
|
||||
this.runningAsPrimary = CheckPermissions.runningAsPrimary();
|
||||
this.runningAsPrimary = CheckPermissions.runningAsPrimary(this.site);
|
||||
if (!ServiceBackupJobManager.getInstance().isRunning()) {
|
||||
ServiceBackupJobManager.getInstance().start();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.dataplugin.gfe.request;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
* Request to determine whether specified site id is one of the server's
|
||||
* configured primary sites for service backup.
|
||||
|
@ -30,6 +32,7 @@ package com.raytheon.uf.common.dataplugin.gfe.request;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 02, 2013 dgilling Initial creation
|
||||
* Jul 22, 2013 dgilling Add missing DynamicSerialize annotation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -37,6 +40,7 @@ package com.raytheon.uf.common.dataplugin.gfe.request;
|
|||
* @version 1.0
|
||||
*/
|
||||
|
||||
@DynamicSerialize
|
||||
public class CheckServiceBackupPrimarySiteRequest extends AbstractGfeRequest {
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue