Issue #1520 - Change delete notifications to hide.
Remove accelerators Change-Id: I2954c1324cbdf1bc4e5577925dbcd10e5faa6156 Former-commit-id:bbc998d372
[formerlyddcd0f8222
] [formerlybbc998d372
[formerlyddcd0f8222
] [formerly8efd37da79
[formerly 0378ff80cc3592379ec3d49efc895adafa05109a]]] Former-commit-id:8efd37da79
Former-commit-id:14bfeb0732
[formerly243c1e15e9
] Former-commit-id:ad1c7c604d
This commit is contained in:
parent
4cec3d4356
commit
a14438b10a
3 changed files with 80 additions and 75 deletions
|
@ -95,6 +95,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Oct 22, 2012 1284 mpduff Code Cleanup.
|
||||
* Dec 03, 2012 1285 bgonzale Added implementation of the tableLock method.
|
||||
* Update title bar text when paused.
|
||||
* Jan 22, 2013 1520 mpduff Change delete menus to hide.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -272,7 +273,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem setDefaultMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(setDefaultMI);
|
||||
setDefaultMI.setText("&Set as Default");
|
||||
setDefaultMI.setText("Set as Default");
|
||||
setDefaultMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -282,7 +283,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem loadConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(loadConfigMI);
|
||||
loadConfigMI.setText("&Load Configuration...");
|
||||
loadConfigMI.setText("Load Configuration...");
|
||||
loadConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -298,7 +299,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem saveConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(saveConfigMI);
|
||||
saveConfigMI.setText("&Save Configuration");
|
||||
saveConfigMI.setText("Save Configuration");
|
||||
saveConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -308,7 +309,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem saveConfigAsMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(saveConfigAsMI);
|
||||
saveConfigAsMI.setText("&Save Configuration As...");
|
||||
saveConfigAsMI.setText("Save Configuration As...");
|
||||
saveConfigAsMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -318,7 +319,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem deleteConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteConfigMI);
|
||||
deleteConfigMI.setText("&Delete Configuration...");
|
||||
deleteConfigMI.setText("Delete Configuration...");
|
||||
deleteConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
|
@ -330,7 +331,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||
|
||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
exitMI.setText("&Exit");
|
||||
exitMI.setText("Exit");
|
||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -348,7 +349,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
// Find Menu
|
||||
MenuItem findMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(findMI);
|
||||
findMI.setText("&Find...");
|
||||
findMI.setText("Find...");
|
||||
findMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -356,10 +357,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
}
|
||||
});
|
||||
|
||||
MenuItem delPriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(delPriorityMI);
|
||||
delPriorityMI.setText("&Delete by Priority");
|
||||
delPriorityMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hidePriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(hidePriorityMI);
|
||||
hidePriorityMI.setText("Hide by Priority");
|
||||
hidePriorityMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
||||
|
@ -367,14 +368,14 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
});
|
||||
|
||||
Menu subMenu = new Menu(menuBar);
|
||||
delPriorityMI.setMenu(subMenu);
|
||||
hidePriorityMI.setMenu(subMenu);
|
||||
|
||||
createPriorityMenus(subMenu);
|
||||
|
||||
MenuItem deleteOlderMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteOlderMI);
|
||||
deleteOlderMI.setText("&Delete Older Than Selected");
|
||||
deleteOlderMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hideOlderMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(hideOlderMI);
|
||||
hideOlderMI.setText("Hide Older Than Selected");
|
||||
hideOlderMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
tableComp.handleDeleteOlderThan();
|
||||
|
@ -382,10 +383,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
});
|
||||
|
||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteMI);
|
||||
deleteMI.setText("&Delete Notification(s)");
|
||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hideMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(hideMI);
|
||||
hideMI.setText("Hide Notification(s)");
|
||||
hideMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
tableComp.handleDeleteNotification();
|
||||
|
@ -401,7 +402,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
lockableMenuItems.add(configureMI);
|
||||
configureMI.setText("&Configure Table...");
|
||||
configureMI.setText("Configure Table...");
|
||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -411,7 +412,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem filterMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
lockableMenuItems.add(filterMI);
|
||||
filterMI.setText("&Filter Table...");
|
||||
filterMI.setText("Filter Table...");
|
||||
filterMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -420,7 +421,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
});
|
||||
|
||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||
tooltipMI.setText("&Tooltips");
|
||||
tooltipMI.setText("Tooltips");
|
||||
tooltipMI.setSelection(false);
|
||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -438,7 +439,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
helpMenuItem.setMenu(helpMenu);
|
||||
|
||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||
helpNotTableMI.setText("&About Notification Center...");
|
||||
helpNotTableMI.setText("About Notification Center...");
|
||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
|
|
@ -75,7 +75,7 @@ import com.raytheon.uf.viz.datadelivery.utils.NotificationHandler;
|
|||
* Sep 06, 2012 687 mpduff Call the table selection method of the ITableChanged interface.
|
||||
* Oct 22, 2012 1284 mpduff Fix the start/end index for pagination of new records, code cleanup.
|
||||
* Nov 29, 2012 1285 bgonzale Added a refresh pause button to the Notification Center Dialog.
|
||||
*
|
||||
* Jan 22, 2013 1520 mpduff Update javadoc.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -197,12 +197,12 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* Note: For the super class we are passing in a false for the notification
|
||||
* flag. This is turned off because the notification dialog is using the
|
||||
* NotificationHandler and it contains the necessary code that needs to be
|
||||
* executed.
|
||||
*
|
||||
*
|
||||
* @param parent
|
||||
* @param tableConfig
|
||||
* @param callback
|
||||
|
@ -287,6 +287,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
+ " not refresh, re-sort, or allow user modification"
|
||||
+ " until unchecked.");
|
||||
pauseButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
boolean isLocked = pauseButton.getSelection();
|
||||
|
||||
|
@ -320,7 +321,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the entire table list.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public TableDataManager<NotificationRowData> getMasterTableList() {
|
||||
|
@ -329,7 +330,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table list with filters applied.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public TableDataManager<NotificationRowData> getFilteredTableList() {
|
||||
|
@ -338,7 +339,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table list for display.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public ArrayList<NotificationRowData> getVisibleTableList() {
|
||||
|
@ -347,7 +348,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the rows of data to display.
|
||||
*
|
||||
*
|
||||
* @return list of Notification Row Data objects
|
||||
*/
|
||||
private ArrayList<NotificationRowData> getTableRows() {
|
||||
|
@ -359,7 +360,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
// Recalculate start/end indices for visible page
|
||||
if (numRows > endIndex && endIndex - startIndex < pageConfig) {
|
||||
endIndex = startIndex + pageConfig - 1;//numRows -1;
|
||||
endIndex = startIndex + pageConfig - 1;// numRows -1;
|
||||
if (endIndex - startIndex > pageConfig - 1) {
|
||||
startIndex = ((pageConfig * selectedPage) - (pageConfig - 1)) - 1;
|
||||
}
|
||||
|
@ -390,7 +391,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Delete table rows.
|
||||
*
|
||||
*
|
||||
* @param deleteRecordIds
|
||||
*/
|
||||
public void deleteTableDataRows(ArrayList<Integer> deleteRecordIds) {
|
||||
|
@ -408,7 +409,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table obj.
|
||||
*
|
||||
*
|
||||
* @return the table obj.
|
||||
*/
|
||||
public Table getTable() {
|
||||
|
@ -432,7 +433,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken when deleting a notification.
|
||||
* Action taken when deleting a notification from view.
|
||||
*/
|
||||
public void handleDeleteNotification() {
|
||||
|
||||
|
@ -472,7 +473,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Action taken when tool tip is selected.
|
||||
*
|
||||
*
|
||||
* @param showToolTips
|
||||
* true when tooltips are on
|
||||
*/
|
||||
|
@ -612,7 +613,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken when deleted notifications by time.
|
||||
* Action taken when deleted notifications from view by time.
|
||||
*/
|
||||
public void handleDeleteOlderThan() {
|
||||
|
||||
|
@ -689,8 +690,8 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken to delete notifications by priority.
|
||||
*
|
||||
* Action taken to delete notifications from view by priority.
|
||||
*
|
||||
* @param priority
|
||||
* priority indicator
|
||||
*/
|
||||
|
@ -726,7 +727,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the start index.
|
||||
*
|
||||
*
|
||||
* @return start index
|
||||
*/
|
||||
public int getStartIndex() {
|
||||
|
@ -735,7 +736,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the end index.
|
||||
*
|
||||
*
|
||||
* @return end index
|
||||
*/
|
||||
public int getEndIndex() {
|
||||
|
@ -744,7 +745,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the selected index.
|
||||
*
|
||||
*
|
||||
* @return selected index
|
||||
*/
|
||||
public int getSelectedIndex() {
|
||||
|
@ -753,7 +754,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table cell text.
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* The column name
|
||||
* @param rd
|
||||
|
@ -782,7 +783,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Populate the NotificationRowData objects
|
||||
*
|
||||
*
|
||||
* @param notificationRecords
|
||||
* list of notification records
|
||||
*/
|
||||
|
@ -857,7 +858,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Pass filter information.
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* user name table data
|
||||
* @param priority
|
||||
|
@ -915,11 +916,11 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Pass filter information.
|
||||
*
|
||||
*
|
||||
* @param records
|
||||
* Notification record
|
||||
* @return boolean true if passes filter
|
||||
*
|
||||
*
|
||||
*/
|
||||
public boolean passesFilter(List<NotificationRecord> records) {
|
||||
for (NotificationRecord record : records) {
|
||||
|
@ -933,10 +934,10 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the column data.
|
||||
*
|
||||
*
|
||||
* @param colName
|
||||
* The column name of interest
|
||||
*
|
||||
*
|
||||
* @return The populated ColumnXML object
|
||||
*/
|
||||
private ColumnXML getColumnData(String colName) {
|
||||
|
@ -1144,7 +1145,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.datadelivery.common.ui.TableComp#handleTableMouseClick
|
||||
* (org.eclipse.swt.events.MouseEvent)
|
||||
|
@ -1156,7 +1157,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.uf.viz.datadelivery.common.ui.TableComp#
|
||||
* handleTableSelectionChange(org.eclipse.swt.events.SelectionEvent)
|
||||
*/
|
||||
|
@ -1169,7 +1170,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.notification.INotificationObserver#
|
||||
* notificationArrived
|
||||
* (com.raytheon.uf.viz.core.notification.NotificationMessage[])
|
||||
|
|
|
@ -114,6 +114,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* and SubscriptionConfigurationManager.
|
||||
* Jan 21, 2013 1501 djohnson Only send notification if subscription was actually activated/deactivated,
|
||||
* remove race condition of GUI thread updating the table after notification.
|
||||
* Jan 22, 2013 1520 mpduff Removed menu accelerators.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -317,7 +318,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
fileMenuItem.setMenu(fileMenu);
|
||||
|
||||
MenuItem newMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
newMI.setText("&New Subscription...");
|
||||
newMI.setText("New Subscription...");
|
||||
newMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -326,7 +327,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem groupMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
groupMI.setText("&New Group...");
|
||||
groupMI.setText("New Group...");
|
||||
groupMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -358,7 +359,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||
|
||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
exitMI.setText("&Exit");
|
||||
exitMI.setText("Exit");
|
||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -376,7 +377,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
settingsMenuItem.setMenu(settingsMenu);
|
||||
|
||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
configureMI.setText("&Configure Table...");
|
||||
configureMI.setText("Configure Table...");
|
||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -385,7 +386,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||
tooltipMI.setText("&Tooltips");
|
||||
tooltipMI.setText("Tooltips");
|
||||
tooltipMI.setSelection(false);
|
||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -403,7 +404,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
helpMenuItem.setMenu(helpMenu);
|
||||
|
||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||
helpNotTableMI.setText("&About Subscription Manager...");
|
||||
helpNotTableMI.setText("About Subscription Manager...");
|
||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -423,7 +424,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
editMenuItem.setMenu(editMenu);
|
||||
|
||||
MenuItem editMI = new MenuItem(editMenu, SWT.NONE);
|
||||
editMI.setText("&Edit Subscription...");
|
||||
editMI.setText("Edit Subscription...");
|
||||
editMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -432,7 +433,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem copyMI = new MenuItem(editMenu, SWT.NONE);
|
||||
copyMI.setText("&Copy Subscription...");
|
||||
copyMI.setText("Copy Subscription...");
|
||||
copyMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -441,7 +442,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
||||
deleteMI.setText("&Delete Subscription");
|
||||
deleteMI.setText("Delete Subscription");
|
||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -591,8 +592,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
String msg = user.uniqueId()
|
||||
+ " is not authorized to create subscriptions";
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
DataBrowserAction action = new DataBrowserAction();
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
ExecutionEvent ee = new ExecutionEvent(null, params, null, null);
|
||||
|
@ -622,8 +623,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
if (create) {
|
||||
if (createGroupDlg == null) {
|
||||
createGroupDlg = new CreateGroupDefinitionDlg(
|
||||
|
@ -744,8 +745,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
String message = null;
|
||||
|
||||
if (selectionCount > 1) {
|
||||
|
@ -831,8 +832,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ " Subscriptions\nPermission: " + permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
final List<Subscription> updatedList = new ArrayList<Subscription>();
|
||||
|
||||
int count = tableComp.getTable().getSelectionCount();
|
||||
|
@ -1055,10 +1056,12 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
String msg = user.uniqueId()
|
||||
+ " is not authorized to access Subscription Approval";
|
||||
|
||||
return DataDeliveryServices.getPermissionsService().checkPermissions(user, msg,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
||||
return DataDeliveryServices
|
||||
.getPermissionsService()
|
||||
.checkPermissions(user, msg,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
||||
.isAuthorized();
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
|
@ -1088,8 +1091,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
|
||||
for (Subscription subscription : subscriptions) {
|
||||
subscriptionNotificationService
|
||||
.sendDeletedSubscriptionNotification(
|
||||
subscription, username);
|
||||
.sendDeletedSubscriptionNotification(subscription,
|
||||
username);
|
||||
}
|
||||
} catch (RegistryHandlerException e) {
|
||||
exceptions.add(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue