NCP resource manager save/create bundle bug fix and various text edits
Former-commit-id: 65fb1170ff
This commit is contained in:
parent
0ca315be49
commit
7292dc0d70
10 changed files with 65 additions and 64 deletions
|
@ -646,7 +646,7 @@
|
|||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="WRF-NMM-West">
|
||||
<filters>Mesoscale</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="RAP-40km">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="RAP-40km">
|
||||
<filters>CONUS,NCEP</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="RAP-20km">
|
||||
|
@ -658,7 +658,7 @@
|
|||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="HRRR">
|
||||
<filters>CONUS,NCEP</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="Hawaii-WRF-NMM">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="Hawaii-WRF-NMM">
|
||||
<filters>Hawaii,NCEP</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="NAM-40km">
|
||||
|
@ -694,7 +694,7 @@
|
|||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="WRF-ARW-East">
|
||||
<filters>NCEP</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="Hawaii-WRF-ARW">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="Hawaii-WRF-ARW">
|
||||
<filters>NCEP,Hawaii</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GFSLAMPTstorm">
|
||||
|
@ -712,22 +712,22 @@
|
|||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="FNEXRAD">
|
||||
<filters>Radar</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GEFS_ENS">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="GEFS_ENS">
|
||||
<filters>Ensemble,Global</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GFS_ENS">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="GFS_ENS">
|
||||
<filters>Ensemble,Global</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="POES-NPOESS">
|
||||
<filters>GINI</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="LCI West">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="LCI West">
|
||||
<filters>GOES,GINI</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GOES 13 - GINI">
|
||||
<filters>GOES,GINI</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GINI_Composite">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="GINI_Composite">
|
||||
<filters>GINI</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="GOES 15 - GINI">
|
||||
|
@ -742,7 +742,7 @@
|
|||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="Arctic Composite">
|
||||
<filters>Standard,McIdas,GOES</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="true" rscDefnName="LCI East">
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="LCI East">
|
||||
<filters>GOES,GINI</filters>
|
||||
</ResourceDefinitionFilter>
|
||||
<ResourceDefinitionFilter isEnabled="false" rscDefnName="GINI_GOES10">
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ResourceManagerDialog extends Dialog {
|
|||
loadRbdCntrl = new LoadRbdControl( mngrTabFolder );
|
||||
|
||||
final TabItem mngrTabItem = new TabItem( mngrTabFolder, SWT.NONE );
|
||||
mngrTabItem.setText( "Load Data" );
|
||||
mngrTabItem.setText( "Create Bundle" );
|
||||
|
||||
// get the active Display and set the rbd_mngr with it
|
||||
AbstractEditor currEditor = NcDisplayMngr.getActiveNatlCntrsEditor();
|
||||
|
|
|
@ -376,8 +376,9 @@ public class CreateRbdControl extends Composite {
|
|||
//
|
||||
private void createRBDGroup() {
|
||||
|
||||
/*
|
||||
|
||||
import_lbl = new Label( rbd_grp, SWT.None );
|
||||
/*
|
||||
import_lbl.setText(ImportFromSPF);
|
||||
form_data = new FormData();
|
||||
form_data.left = new FormAttachment( import_rbd_btn, 0, SWT.LEFT );
|
||||
|
@ -394,7 +395,7 @@ public class CreateRbdControl extends Composite {
|
|||
rbd_name_txt.setLayoutData( form_data );
|
||||
|
||||
rbd_name_lbl = new Label( rbd_grp, SWT.None );
|
||||
rbd_name_lbl.setText("RBD Name");
|
||||
rbd_name_lbl.setText("Bundle Name");
|
||||
form_data = new FormData();
|
||||
form_data.width = 180;
|
||||
form_data.left = new FormAttachment( rbd_name_txt, 0, SWT.LEFT );
|
||||
|
@ -688,7 +689,7 @@ public class CreateRbdControl extends Composite {
|
|||
seld_rscs_lviewer = new ListViewer( seld_rscs_group,
|
||||
SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
|
||||
form_data = new FormData();
|
||||
form_data.top = new FormAttachment( 0, 5 );
|
||||
form_data.top = new FormAttachment( 0, 10 );
|
||||
form_data.right = new FormAttachment( 100, -5 );
|
||||
form_data.left = new FormAttachment( 0, 95);//-110 ); //80, 0 );
|
||||
form_data.bottom = new FormAttachment( 100, -40 );
|
||||
|
@ -1396,7 +1397,7 @@ public class CreateRbdControl extends Composite {
|
|||
catch (VizException e) {
|
||||
MessageDialog errDlg = new MessageDialog(
|
||||
shell, "Error", null,
|
||||
"Error Importing Rbd, "+impRbd.getRbdName()+".\n"+e.getMessage(),
|
||||
"Error Importing Bundle, "+impRbd.getRbdName()+".\n"+e.getMessage(),
|
||||
MessageDialog.ERROR, new String[]{"OK"}, 0);
|
||||
errDlg.open();
|
||||
}
|
||||
|
@ -1428,8 +1429,8 @@ public class CreateRbdControl extends Composite {
|
|||
// allow the user to change the name
|
||||
// rbd_name_txt.setEditable( false );
|
||||
// rbd_name_txt.setBackground( rbd_name_txt.getParent().getBackground() );
|
||||
import_lbl.setVisible( false );
|
||||
import_rbd_btn.setVisible( false );
|
||||
import_lbl.setVisible( true );
|
||||
import_rbd_btn.setVisible( true );
|
||||
clear_rbd_btn.setVisible( false );
|
||||
save_rbd_btn.setVisible( false );
|
||||
load_pane_btn.setVisible( false );
|
||||
|
@ -2231,7 +2232,7 @@ public class CreateRbdControl extends Composite {
|
|||
rbdBndl = AbstractRBD.clone( rbdBndl );
|
||||
|
||||
ResourceBndlLoader rbdLoader = null;
|
||||
rbdLoader = new ResourceBndlLoader("RBD Previewer");
|
||||
rbdLoader = new ResourceBndlLoader("Bundle Previewer");
|
||||
|
||||
rbdLoader.setLoadSelectedPaneOnly();
|
||||
|
||||
|
@ -2249,9 +2250,9 @@ public class CreateRbdControl extends Composite {
|
|||
if( !activeEditorName.equals( rbdName ) ) {
|
||||
MessageDialog confirmDlg = new MessageDialog(
|
||||
shell, "Confirm Load Pane", null,
|
||||
"You will first need to Load the RBD before\n"+
|
||||
"You will first need to Load the Bundle before\n"+
|
||||
"re-loading a pane. \n\n"+
|
||||
"Do you want to load the currently defined RBD?",
|
||||
"Do you want to load the currently defined Bundle?",
|
||||
MessageDialog.QUESTION, new String[]{"Yes", "No"}, 0);
|
||||
confirmDlg.open();
|
||||
|
||||
|
@ -2267,7 +2268,7 @@ public class CreateRbdControl extends Composite {
|
|||
MessageDialog msgDlg = new MessageDialog(
|
||||
shell, "Load Pane", null,
|
||||
"The pane layout of the display doesn't match the currently selected\n"+
|
||||
"RBD pane layout. You will first need to Load the RBD before\n"+
|
||||
"Bundle pane layout. You will first need to Load the Bundle before\n"+
|
||||
"changing the number of panes.",
|
||||
MessageDialog.INFORMATION, new String[]{"OK"}, 0);
|
||||
msgDlg.open();
|
||||
|
@ -2509,9 +2510,9 @@ public class CreateRbdControl extends Composite {
|
|||
VizApp.runSync(new Runnable() {
|
||||
public void run() {
|
||||
String msg = null;
|
||||
msg = new String("Bundle "+
|
||||
rbd_name_txt + " saved to Group "+
|
||||
savedSpfGroup + File.separator+ savedSpfName+".");
|
||||
msg = new String("bundle \""+
|
||||
rbd_name_txt + "\" saved to \""+
|
||||
savedSpfName+"\"");
|
||||
MessageBox mb = new MessageBox( shell, SWT.OK );
|
||||
mb.setText( "Bundle Saved" );
|
||||
mb.setMessage( msg );
|
||||
|
|
|
@ -343,7 +343,7 @@ public class SaveRbdDialog extends Dialog {
|
|||
|
||||
save_btn = new Button( shell, SWT.PUSH );
|
||||
fd = new FormData();
|
||||
save_btn.setText(" Save Bundle ");
|
||||
save_btn.setText(" Save ");
|
||||
fd.bottom = new FormAttachment( 100, -10 );
|
||||
fd.right = new FormAttachment( can_btn, -20, SWT.LEFT );
|
||||
save_btn.setLayoutData( fd );
|
||||
|
|
|
@ -192,7 +192,7 @@ public class SelectRbdsDialog extends Dialog {
|
|||
sel_rbds_grp.setLayoutData( fd );
|
||||
|
||||
selFromGrp = new Group( sel_rbds_grp, SWT.SHADOW_NONE );
|
||||
selFromGrp.setText("Select RBDs ");
|
||||
selFromGrp.setText("Select Bundles ");
|
||||
fd = new FormData();
|
||||
fd.top = new FormAttachment( 0, 20 );
|
||||
fd.left = new FormAttachment( 0, 10 );
|
||||
|
@ -202,7 +202,7 @@ public class SelectRbdsDialog extends Dialog {
|
|||
selFromGrp.setLayout( new GridLayout( 1, false ) );
|
||||
|
||||
selFromSpfsBtn = new Button( selFromGrp, SWT.RADIO );
|
||||
selFromSpfsBtn.setText( "From SPFs" );
|
||||
selFromSpfsBtn.setText( "From Group" );
|
||||
|
||||
selFromDisplaysBtn = new Button( selFromGrp, SWT.RADIO );
|
||||
selFromDisplaysBtn.setText( "From Displays" );
|
||||
|
@ -243,7 +243,7 @@ public class SelectRbdsDialog extends Dialog {
|
|||
spfNameCombo.setLayoutData( fd );
|
||||
|
||||
spf_name_lbl = new Label(sel_rbds_grp, SWT.NONE);
|
||||
spf_name_lbl.setText("SPF Name");
|
||||
spf_name_lbl.setText("Bundle Group");
|
||||
fd = new FormData();
|
||||
fd.bottom = new FormAttachment( spfNameCombo, -3, SWT.TOP );
|
||||
fd.left = new FormAttachment( spfNameCombo, 0, SWT.LEFT );
|
||||
|
@ -262,7 +262,7 @@ public class SelectRbdsDialog extends Dialog {
|
|||
rbdLviewer.getList().setLayoutData( fd );
|
||||
|
||||
Label rbd_lbl = new Label( sel_rbds_grp, SWT.NONE);
|
||||
rbd_lbl.setText("RBDs");
|
||||
rbd_lbl.setText("Bundles");
|
||||
fd = new FormData();
|
||||
fd.bottom = new FormAttachment( rbdLviewer.getList(), -3, SWT.TOP );
|
||||
fd.left = new FormAttachment( rbdLviewer.getList(), 0, SWT.LEFT );
|
||||
|
@ -418,7 +418,7 @@ public class SelectRbdsDialog extends Dialog {
|
|||
if( element instanceof AbstractRBD<?> ) {
|
||||
return ((AbstractRBD<?>)element).getRbdName();
|
||||
}
|
||||
else return "Error: bad RBD element";
|
||||
else return "Error: bad Bundle element";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class EditRbdDialog extends Dialog {
|
|||
rbdMngr = new RscBundleDisplayMngr( new NcPaneLayout(6,6), seldRbd.getDisplayType() );
|
||||
|
||||
shell = new Shell( parShell, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL );
|
||||
shell.setText( "Edit RBD "+seldRbd.getRbdName() );
|
||||
shell.setText( "Edit Bundle "+seldRbd.getRbdName() );
|
||||
|
||||
GridLayout mainLayout = new GridLayout(1, true);
|
||||
mainLayout.marginHeight = 1;
|
||||
|
|
|
@ -69,7 +69,7 @@ public class RbdViewComposite extends Composite {
|
|||
rscLviewer.getList().setBackground( parent.getBackground() );
|
||||
|
||||
rbdNameLabel = new Label( topComp, SWT.NONE);
|
||||
rbdNameLabel.setText("View RBD");
|
||||
rbdNameLabel.setText("View Bundle");
|
||||
fd = new FormData();
|
||||
fd.bottom = new FormAttachment( rscLviewer.getList(), -3, SWT.TOP );
|
||||
fd.left = new FormAttachment( rscLviewer.getList(), 0, SWT.LEFT );
|
||||
|
@ -191,7 +191,7 @@ public class RbdViewComposite extends Composite {
|
|||
rbdLocationLabel.setText("");
|
||||
}
|
||||
else {
|
||||
rbdNameLabel.setText( "RBD: " + rbd.getRbdName() );
|
||||
rbdNameLabel.setText( "Bundle: " + rbd.getRbdName() );
|
||||
|
||||
LocalizationFile lFile = rbd.getLocalizationFile();
|
||||
if( lFile == null ) {
|
||||
|
|
|
@ -473,7 +473,7 @@ public class ManageSpfControl extends Composite {
|
|||
});
|
||||
|
||||
|
||||
// ignore the imput and return the managedRbdsList
|
||||
// ignore the input and return the managedRbdsList
|
||||
seldRbdsLviewer.setContentProvider( new IStructuredContentProvider() {
|
||||
@Override
|
||||
public Object[] getElements(Object inputElement) {
|
||||
|
@ -788,7 +788,7 @@ public class ManageSpfControl extends Composite {
|
|||
if( isUserLevel ) {
|
||||
|
||||
}
|
||||
LocalizationContext cntxt = SpfsManager.getInstance().getSpfContext(seldSpfGroup, seldSpfName);
|
||||
LocalizationContext cntxt = SpfsManager.getInstance().getSpfContext("default", seldSpfName);
|
||||
spfLocationLbl.setText( "Localization="+cntxt.getLocalizationLevel().toString()+":"+
|
||||
cntxt.getContextName() );
|
||||
} catch (VizException e) {
|
||||
|
@ -1002,14 +1002,14 @@ public class ManageSpfControl extends Composite {
|
|||
|
||||
MessageBox mb = new MessageBox( shell, SWT.OK );
|
||||
mb.setText( "Group Saved" );
|
||||
mb.setMessage( "\nGroup "+ seldSpfGroup+File.separator+seldSpfName+
|
||||
" has been saved.");
|
||||
mb.setMessage( "\nGroup \""+ seldSpfName+
|
||||
"\" has been saved.");
|
||||
mb.open();
|
||||
}
|
||||
catch( VizException e ) {
|
||||
MessageDialog errDlg = new MessageDialog(
|
||||
shell, "Error", null,
|
||||
"Error Saving Group "+ seldSpfGroup+File.separator+seldSpfName+":\n\n"+
|
||||
"Error Saving group \""+ seldSpfName+"\":\n\n"+
|
||||
e.getMessage(),
|
||||
MessageDialog.ERROR, new String[]{"OK"}, 0);
|
||||
errDlg.open();
|
||||
|
@ -1023,8 +1023,8 @@ public class ManageSpfControl extends Composite {
|
|||
|
||||
MessageBox mb = new MessageBox( shell, SWT.OK );
|
||||
mb.setText( "Group Created" );
|
||||
mb.setMessage( "\nGroup "+ seldSpfGroup+File.separator+seldSpfName+
|
||||
" has been created.");
|
||||
mb.setMessage( "\nGroup \""+ seldSpfName+
|
||||
"\" has been created.");
|
||||
mb.open();
|
||||
|
||||
// reset the gui after creating the SPF
|
||||
|
@ -1036,7 +1036,7 @@ public class ManageSpfControl extends Composite {
|
|||
} catch (VizException e) {
|
||||
MessageDialog errDlg = new MessageDialog(
|
||||
shell, "Error", null,
|
||||
"Error Creating Group "+ seldSpfGroup+File.separator+seldSpfName+":\n\n"+
|
||||
"Error creating group \""+seldSpfName+"\":\n\n"+
|
||||
e.getMessage(),
|
||||
MessageDialog.ERROR, new String[]{"OK"}, 0);
|
||||
errDlg.open();
|
||||
|
@ -1049,8 +1049,8 @@ public class ManageSpfControl extends Composite {
|
|||
|
||||
MessageBox mb = new MessageBox( shell, SWT.OK );
|
||||
mb.setText( "Group Deleted" );
|
||||
mb.setMessage( "\nGroup "+ seldSpfGroup+File.separator+seldSpfName+
|
||||
" has been deleted.");
|
||||
mb.setMessage( "\nGroup \""+seldSpfName+
|
||||
"\" has been deleted.");
|
||||
mb.open();
|
||||
|
||||
currActionBtn.setSelection( false );
|
||||
|
@ -1060,7 +1060,7 @@ public class ManageSpfControl extends Composite {
|
|||
} catch (VizException e) {
|
||||
MessageDialog errDlg = new MessageDialog(
|
||||
shell, "Info", null,
|
||||
"Error Deleting Group "+ seldSpfName+":\n"+
|
||||
"Error deleting group \""+ seldSpfName+"\":\n"+
|
||||
e.getMessage(),
|
||||
MessageDialog.ERROR, new String[]{"OK"}, 0);
|
||||
errDlg.open();
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
*/
|
||||
public class RenameRbdDialog extends Dialog {
|
||||
|
||||
private String dialogTitle = "Rename Rbd";
|
||||
private String dialogTitle = "Rename Bundle";
|
||||
private Shell myShell;
|
||||
private Text newRbdNameText;
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class RenameRbdDialog extends Dialog {
|
|||
newRbdNameText.setLayoutData( fd );
|
||||
|
||||
Label newRbdNameLabel = new Label(topComp, SWT.NONE);
|
||||
newRbdNameLabel.setText("Enter New RBD Name:");
|
||||
newRbdNameLabel.setText("Enter New Bundle Name:");
|
||||
|
||||
fd = new FormData();
|
||||
fd.bottom = new FormAttachment( newRbdNameText, -3, SWT.TOP );
|
||||
|
@ -188,7 +188,7 @@ public class RenameRbdDialog extends Dialog {
|
|||
|
||||
if( !SpfsManager.getInstance().isValidRbdName( newRbdName ) ) {
|
||||
MessageBox mb = new MessageBox(myShell, SWT.ICON_ERROR);
|
||||
mb.setMessage("Invalid RBD name.");
|
||||
mb.setMessage("Invalid Bundle name.");
|
||||
mb.setText("Error");
|
||||
mb.open();
|
||||
return;
|
||||
|
|
|
@ -334,7 +334,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
// make sure the spf doesn't exist.
|
||||
if( rbdsList.isEmpty() || grpName == null || grpName.isEmpty() ||
|
||||
spfName == null || spfName.isEmpty() ) {
|
||||
throw new VizException("Error creating SPF. Null spf name or no rbds are selected." );
|
||||
throw new VizException("Error creating group. Empty group name or no bundles selected." );
|
||||
}
|
||||
|
||||
Map<String,Map<String,AbstractRBD<?>>> grpMap = spfsMap.get( grpName );
|
||||
|
@ -343,7 +343,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
Map<String,AbstractRBD<?>> sMap = grpMap.get( spfName );
|
||||
|
||||
if( sMap != null ) {
|
||||
throw new VizException("The SPF "+grpName+File.separator+spfName+" already exists." );
|
||||
throw new VizException("The group "+spfName+" already exists." );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
if( rbdsList.isEmpty() ||
|
||||
grpName == null || grpName.isEmpty() ||
|
||||
spfName == null || spfName.isEmpty() ) {
|
||||
throw new VizException("Error saving SPF. Null spf name or no rbds are selected." );
|
||||
throw new VizException("Error saving group. Empty group name or no bundles selected." );
|
||||
}
|
||||
|
||||
// get the current Rbds so we can delete those that have been removed.
|
||||
|
@ -414,7 +414,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
usrCntxt, rbdLclName );
|
||||
|
||||
if( lFile == null || lFile.getFile() == null ) {
|
||||
throw new VizException("Error creating localization file for rbd: "+rbdLclName );
|
||||
throw new VizException("Error creating localization file for bundle: "+rbdLclName );
|
||||
}
|
||||
File rbdFile = lFile.getFile();
|
||||
|
||||
|
@ -502,13 +502,13 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
NcPathConstants.SPFS_DIR + File.separator + delGroup);
|
||||
}
|
||||
else if( groupLocDir.getContext().getLocalizationLevel() != LocalizationContext.LocalizationLevel.USER ) {
|
||||
throw new VizException( "Can not delete a non-user defined SPF." );
|
||||
throw new VizException( "Can not delete a non-user defined group." );
|
||||
}
|
||||
else if( getSpfNamesForGroup( delGroup ).length > 0 ) {
|
||||
throw new VizException( "Can't delete non-empty SPF:\n"+delGroup);
|
||||
throw new VizException( "Can't delete non-empty group:\n"+delGroup);
|
||||
}
|
||||
else if( !groupLocDir.isDirectory() ) { // sanity check
|
||||
throw new VizException( "Localization File for SPF is not a directory:\n"+ delGroup );
|
||||
throw new VizException( "Localization File for group is not a directory:\n"+ delGroup );
|
||||
}
|
||||
|
||||
// Note that this will trigger the fileUpdated which will remove the group from the map
|
||||
|
@ -549,7 +549,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
System.out.println("error getting Spf Localization Dir.???");
|
||||
System.out.println("error getting group Localization Dir.???");
|
||||
// assume it hasn't been created yet
|
||||
}
|
||||
|
||||
|
@ -572,11 +572,11 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
NcPathConstants.SPFS_DIR + File.separator + spfGroup + File.separator + delSpfName );
|
||||
}
|
||||
else if( !isUserLevelSpf(spfGroup, delSpfName ) ) {
|
||||
throw new VizException("Either the SPF Localization Dir or one of the RBD " +
|
||||
throw new VizException("Either the group Localization Dir or one of the bundle " +
|
||||
"Localization Files is not in the User-Level Context.");
|
||||
}
|
||||
else if( !spfLocDir.isDirectory() ) { // sanity check
|
||||
throw new VizException( "Localization File for SPF is not a directory:\n"+
|
||||
throw new VizException( "Localization File for group is not a directory:\n"+
|
||||
spfGroup + File.separator + delSpfName );
|
||||
}
|
||||
|
||||
|
@ -613,7 +613,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
}
|
||||
else if( lFile.getContext().getLocalizationLevel() !=
|
||||
LocalizationLevel.USER ) {
|
||||
throw new VizException("Can not delete a non-USER level RBD: "+rbd.getRbdName() );
|
||||
throw new VizException("Can not delete a non-USER level Bundle: "+rbd.getRbdName() );
|
||||
}
|
||||
|
||||
// this will trigger the fileUpdated method which will
|
||||
|
@ -649,7 +649,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
Map<String,Map<String,AbstractRBD<?>>> grpMap = spfsMap.get( spfGroup );
|
||||
|
||||
if( grpMap == null ) {
|
||||
System.out.println("Could not find Group "+spfGroup+" for RBD "+
|
||||
System.out.println("Could not find \""+spfGroup+"\" for Bundle "+
|
||||
lFile.getName() );
|
||||
return;
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
//
|
||||
if( spfsMap.containsKey( spfGroup ) ) {
|
||||
if( !spfsMap.get( spfGroup ).isEmpty() ) {
|
||||
System.out.println("???deleting non-empty SPF Group: "+ spfGroup );
|
||||
System.out.println("???deleting non-empty Group: "+ spfGroup );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -674,8 +674,8 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
Map<String,AbstractRBD<?>> sMap = grpMap.get( spfName );
|
||||
|
||||
if( sMap == null ) {
|
||||
System.out.println("Could not find SPF "+spfName+" for RBD "+
|
||||
lFile.getName() );
|
||||
System.out.println("Could not find group \""+spfName+"\" for bundle \""+
|
||||
lFile.getName() + "\"" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -683,7 +683,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
if( pathCount == 2 ) {
|
||||
if( grpMap.containsKey( spfName ) ) {
|
||||
if( !grpMap.get( spfName ).isEmpty() ) {
|
||||
System.out.println("???deleting non-empty SPF : "+ spfName );
|
||||
System.out.println("???deleting non-empty group : "+ spfName );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -732,10 +732,10 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
if( chgType == FileChangeType.ADDED ) {
|
||||
//
|
||||
if( !chgFile.endsWith(".xml" ) ) {
|
||||
System.out.println("Non-xmlfile found under SPFs dir???:"+ chgFile );
|
||||
System.out.println("Non-xmlfile found under groups dir???:"+ chgFile );
|
||||
}
|
||||
else if( dirsf.length != 5 ) {
|
||||
System.out.println("xml file found in non-SPF directory? "+ chgFile );
|
||||
System.out.println("xml file found in non-group directory? "+ chgFile );
|
||||
}
|
||||
else {
|
||||
AbstractRBD<?> rbd = NcMapRBD.getRbd( lFile.getFile() );
|
||||
|
@ -755,7 +755,7 @@ public class SpfsManager implements ILocalizationFileObserver {
|
|||
}
|
||||
catch (VizException e ) {
|
||||
// log error
|
||||
System.out.println("Error unmarshalling rbd: "+ chgFile
|
||||
System.out.println("Error unmarshalling bundle: "+ chgFile
|
||||
+ "\n"+e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue