Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.config
Interface IdeConfigManager

public interface IdeConfigManager
extends IPropertiesRO

Provides methods for getting the `IdeConfig` instances and working with `ConfigEditor`s.

All configs have a so-called "level" which defines a set of the properties and their values:

- At the top level there are "default" level configs which define properties for all projects.
- The "project" level configs contain all properties defined in the "default" level config, but may change them or add other properties specific for a certain project.
- The "diagram" level configs contain all properties defined in the "project" and the "default" level configs, but may change them or add other properties specific for a certain diagram.

Some of the level names are defined in `IdeConfigLevel` interface.

`IdeConfig` object corresponding to the configuration at the specific level can be obtained via `getConfig` method.

`getConfigEditor` method returns `IdeConfigEditor` object for the specific level, allowing to add custom pages to config dialog, set visibility of pages in it etc.

Current `IdeConfigManager` can be obtained via `IdeConfigManagerAccess.getConfigManager` method.

Author:
  TogetherSoft
See Also: IdeConfigManagerAccess.getConfigManager(), IdeConfig, IdeConfigEditor, IdeConfigLevel

Fields inherited from interface com.togethersoft.openapi.util.properties.IPropertiesRO
`NULL`

Method Summary
`IdeModuleConfig` | `createModuleConfig(Class moduleClass, String configPath)` Returns previously existing module config or creates new one.
`IdeConfig` | `getConfig(String level)` Returns the `IdeConfig` instance for the specified `level`.
`IdeConfigEditor` | `getConfigEditor(String level, String selectedPage, boolean onePage)` Returns `IdeConfigEditor` instance with the specific content and configuration.
`IdeModuleConfig` | `getModuleConfig(Class moduleClass)` Returns previously existing module config file or null.
`StringEnumeration` | `levelNames()` Returns an enumeration of the strings with the names of all configuration levels.
`Enumeration` | `moduleConfigs()` Returns enumeration of all existing module configs.
`boolean` | `showConfigEditor(Component parent, String level, String selectedPage, boolean onePage)` Shows the `IdeConfigEditor` in the specified component.
`boolean` | `showConfigEditor(Component parent, String level, String selectedPage, boolean onePage, String initialLevel, int mode)` Shows the `IdeConfigEditor` in the specified component.
`boolean` | `showConfigEditor(Component parent, IdeConfigEditor editor, String initialLevel, int mode)` Shows the specified `IdeConfigEditor`.

Methods inherited from interface com.togethersoft.openapi.util.properties.IPropertiesRO
`addPropertyChangeListener, getProperty, propertyNames, removePropertyChangeListener`

Method Detail

### createModuleConfig

    public IdeModuleConfig createModuleConfig(Class moduleClass, String configPath)

  Returns previously existing module config or creates new one.

### getConfig

    public IdeConfig getConfig(String level)

  Returns the `IdeConfig` instance for the specified `level`. The returned `IdeConfig` object can be used for inquiring the values of properties at this level.
  Parameters:
    level - `String` name of the level of the required config. The predefined values are stored in the `IdeConfigLevel` interface.
  Returns: the `IdeConfig` instance
  See Also:
    IdeConfigLevel

### getConfigEditor

    public IdeConfigEditor getConfigEditor(String level, String selectedPage, boolean onePage)

  Returns `IdeConfigEditor` instance with the specific content and configuration.
  Parameters:
    level - `String` name of the level of the required config. The predefined values are stored in the `IdeConfigLevel` interface
    selectedPage - `String` name of the page in this config
    onePage - `boolean` flag. If `true` then returned `IdeConfigEditor` will contain specified page only; if `false` then returns all pages defined in the config.
  Returns: `IdeConfigEditor` instance with the specific content and configuration
  See Also:
    IdeConfigLevel

### getModuleConfig

    public IdeModuleConfig getModuleConfig(Class moduleClass)

  Returns previously existing module config file or null. Currently `IdeModuleConfig` is associated with the package of the passed class.
  Parameters:
    moduleClass - `Class` of the associated module
  See Also:
    createModuleConfig(java.lang.Class,java.lang.String)

### levelNames

    public StringEnumeration levelNames()

  Returns an enumeration of the strings with the names of all configuration levels.
  Returns: an enumeration of the strings with the names of all levels of configs
  See Also:
    StringEnumeration

### moduleConfigs

    public Enumeration moduleConfigs()

  Returns enumeration of all existing module configs.

### showConfigEditor

    public boolean showConfigEditor(Component parent, String level, String selectedPage, boolean onePage)

  Shows the `IdeConfigEditor` in the specified component.
  Parameters:
    parent - `Component` where this config editor will be shown
    level - `String` name of the level of the required config. The predefined values are in the `IdeConfigLevel` interface
    selectedPage - `String` with the name of the config page
    onePage - `boolean` flag. If `true` then returned `IdeConfigEditor` will contain specified page only, otherwise returns all pages defined in the config.
  Returns: `true` if the user clicked "Okay" button, `false` otherwise
  See Also:
    IdeConfigEditor, IdeConfigLevel

### showConfigEditor

    public boolean showConfigEditor(Component parent, String level, String selectedPage, boolean onePage, String initialLevel, int mode)

  Shows the `IdeConfigEditor` in the specified component.
  Parameters:
    parent - `Component` where this config editor will be shown
    level - `string` name of the level of the required config. The predefined values are in the `IdeConfigLevel` interface
    selectedPage - `String` name of the page in this config
    onePage - `boolean` flag. If `true` then returned `IdeConfigEditor` will contain specified page only, otherwise returns all pages defined in the config.
    initialLevel - `String` name of the level which should be initially selected for editing. The predefined values are stored in the `IdeConfigLevel` interface
    mode - `integer` type of update for the values of changed properties. The constants for this parameter are defined in the `IdeConfigEditorMode` interface. Apply button needs non-blocking call.
  Returns: `true` if the user clicked "Okay" button, `false` otherwise
  See Also:
    IdeConfigEditor, IdeConfigLevel, IdeConfigEditorMode

### showConfigEditor

    public boolean showConfigEditor(Component parent, IdeConfigEditor editor, String initialLevel, int mode)

  Shows the specified `IdeConfigEditor`.
  Parameters:
    parent - the `Component` object
    The - `IdeConfigEditor` object. See `getConfigEditor` method.
    initialLevel - `String` name of the level which should be initially selected for editing. The predefined values are stored in the `IdeConfigLevel` interface
    mode - `integer` type of update for the values of changed properties. The constants for this parameter are defined in the `IdeConfigEditorMode` interface. Apply button needs non-blocking call.
  See Also:
    getConfigEditor(java.lang.String,java.lang.String,boolean)

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD