com.togethersoft.openapi.ide.config
Interface IdeConfigManager


public interface IdeConfigManager
extends IPropertiesRO

Provides methods for getting the IdeConfig instances and working with ConfigEditors.


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


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
Since: Together 3.0
See Also: IdeConfigManagerAccess.getConfigManager(), IdeConfig, IdeConfigEditor, IdeConfigLevel

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

Method Summary
 IdeModuleConfigcreateModuleConfig(Class moduleClass, String configPath)
          Returns previously existing module config or creates new one.
 IdeConfiggetConfig(String level)
          Returns the IdeConfig instance for the specified level.
 IdeConfigEditorgetConfigEditor(String level, String selectedPage, boolean onePage)
          Returns IdeConfigEditor instance with the specific content and configuration.
 IdeModuleConfiggetModuleConfig(Class moduleClass)
          Returns previously existing module config file or null.
 StringEnumerationlevelNames()
          Returns an enumeration of the strings with the names of all configuration levels.
 EnumerationmoduleConfigs()
          Returns enumeration of all existing module configs.
 EnumerationpropertyNames(String prefix)
          Returns an enumeration of all the keys in this property list, that starting from the specified prefix.
 booleanshowConfigEditor(Component parent, String level, String selectedPage, boolean onePage)
          Shows the IdeConfigEditor in the specified component.
 booleanshowConfigEditor(Component parent, String level, String selectedPage, boolean onePage, String initialLevel, int mode)
          Shows the IdeConfigEditor in the specified component.
 booleanshowConfigEditor(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.
Since:
Together 4.0

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
Since:
Together 4.0
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.
Since:
Together 4.0

propertyNames

public Enumeration propertyNames(String prefix)
Returns an enumeration of all the keys in this property list, that starting from the specified prefix.
Returns: an enumeration of all the keys in this property list, that starting from the specified prefix.
Since:
Together 6.0

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)