+ protected void setMock(String[][] mocks)
+ {
+ if (mocks == null)
+ {
+ mockQueries = null;
+ return;
+ }
+ mockQueries = new HashMap<String, String>();
+ for (String[] mock : mocks)
+ {
+ mockQueries.put(mock[0], mock[1]);
+ }
+ }
+
+ protected boolean isMocked()
+ {
+ return mockQueries != null;
+ }
+
+ @Override
+ public String[] getPreferencesColumnsFor(PreferenceSource source)
+ {
+ String[] columnNames = null;
+ switch (source)
+ {
+ case SEARCH_SUMMARY:
+ columnNames = new String[] { "", "Display", "Group" };
+ break;
+ default:
+ // non structure sources don't return any other kind of preferences
+ // columns
+ break;
+ }
+ return columnNames;
+ }