# Interface ZooInspectorManager

All Superinterfaces:
  `ZooInspectorNodeManager, ZooInspectorNodeTreeManager, ZooInspectorReadOnlyManager`

All Known Implementing Classes:
  `ZooInspectorManagerImpl`

public interface ZooInspectorManager extends ZooInspectorNodeManager, ZooInspectorNodeTreeManager
A Manager for all interactions between the application and the Zookeeper instance

## Method Summary

Modifier and Type
Method
Description
`void`
`addWatchers(Collection<String> selectedNodes, NodeListener nodeListener)`
`boolean`
`connect(Properties connectionProps)`
`boolean`
`disconnect()`
`Pair<Map<String, List<String>>, Map<String,String>>`
`getConnectionPropertiesTemplate()`
`List<String>`
`getDefaultNodeViewerConfiguration()`
`Properties`
`getLastConnectionProps()`
`List<String>`
`loadNodeViewersFile(File selectedFile)`
`void`
`removeWatchers(Collection<String> selectedNodes)`
`void`
`saveDefaultConnectionFile(Properties props)`
`void`
`saveNodeViewersFile(File selectedFile, List<String> nodeViewersClassNames)`
`void`
`setDefaultNodeViewerConfiguration(List<String> nodeViewersClassNames)`
`void`
`setLastConnectionProps(Properties connectionProps)`

### Methods inherited from interface ZooInspectorNodeManager

`setData`

### Methods inherited from interface ZooInspectorNodeTreeManager

`createNode, deleteNode`

### Methods inherited from interface ZooInspectorReadOnlyManager

`getACLs, getChildren, getData, getNodeMeta, getNumChildren`

## Method Details

### connect

boolean connect(Properties connectionProps)

Parameters:
  `connectionProps` -
Returns:
  true if successfully connected

### disconnect

boolean disconnect()

Returns:
  true if successfully disconnected

### getConnectionPropertiesTemplate

Pair<Map<String, List<String>>, Map<String,String>> getConnectionPropertiesTemplate()

Returns:
  a `Pair` containing the following:
  - a `Map` of property keys to list of possible values. If the list size is 1 the value is taken to be the default value for a `JTextField`. If the list size is greater than 1, the values are taken to be the possible options to show in a `JComboBox` with the first selected as default.
  - a `Map` of property keys to the label to show on the UI

### addWatchers

void addWatchers(Collection<String> selectedNodes, NodeListener nodeListener)

Parameters:
  `selectedNodes` - - the nodes to add the watcher to
  `nodeListener` - - the node listener for this watcher

### removeWatchers

void removeWatchers(Collection<String> selectedNodes)

Parameters:
  `selectedNodes` - - the nodes to remove the watchers from

### loadNodeViewersFile

List<String> loadNodeViewersFile(File selectedFile) throws IOException

Parameters:
  `selectedFile` - - the file to load which contains the node viewers configuration
Returns:
  nodeViewers - the class names of the node viewers from the configuration
Throws:
  `IOException` - - if the configuration file cannot be loaded

### saveNodeViewersFile

void saveNodeViewersFile(File selectedFile, List<String> nodeViewersClassNames) throws IOException

Parameters:
  `selectedFile` - - the file to save the configuration to
  `nodeViewersClassNames` - - the class names of the node viewers
Throws:
  `IOException` - - if the configuration file cannot be saved

### setDefaultNodeViewerConfiguration

void setDefaultNodeViewerConfiguration(List<String> nodeViewersClassNames) throws IOException

Parameters:
  `nodeViewersClassNames` - - the class names of the node viewers
Throws:
  `IOException` - - if the default configuration file cannot be loaded

### getDefaultNodeViewerConfiguration

List<String> getDefaultNodeViewerConfiguration() throws IOException

Returns:
  nodeViewers - the class names of the node viewers from the configuration
Throws:
  `IOException` - - if the default configuration file cannot be loaded

### setLastConnectionProps

void setLastConnectionProps(Properties connectionProps)

Parameters:
  `connectionProps` - - the connection properties last used to connect to the zookeeper instance

### getLastConnectionProps

Properties getLastConnectionProps()

Returns:
  last connection Properties - the connection properties last used to connect to the zookeeper instance

### saveDefaultConnectionFile

void saveDefaultConnectionFile(Properties props) throws IOException

Parameters:
  `props` - - the properties to use as the default connection settings
Throws:
  `IOException` - - if the default configuration file cannot be saved