de.espirit.firstspirit.module
Interface Configuration<E extends ServerEnvironment>


public interface Configuration<E extends ServerEnvironment>

Interface for configurable components.

Since:
4.1

Method Summary
 E getEnvironment()
          Returns ComponentEnvironment
 JComponent getGui(Frame masterFrame)
          Returns the configuration gui.
 String getParameter(String name)
          Returns a specific parameter or null if it's not available.
 Set<String> getParameterNames()
          Returns all parameter names.
 boolean hasGui()
          Returns true if this component has a gui to show and change it's configuration.
 void init(String moduleName, String componentName, E env)
          Initializes this component with the given environment.
 void load()
          Loads the current configuration from appropriate conf directory.
 void store()
          Stores the current configuration.
 

Method Detail

hasGui

boolean hasGui()
Returns true if this component has a gui to show and change it's configuration.

Returns:
true if this component has a gui to show and change it's configuration.
Since:
4.1

getGui

@Nullable
JComponent getGui(Frame masterFrame)
Returns the configuration gui.

Parameters:
masterFrame - basic frame component, for creating new windows
Returns:
configuration gui or null.
Since:
4.1

load

void load()
Loads the current configuration from appropriate conf directory.

Since:
4.1

store

void store()
Stores the current configuration.

Since:
4.1

getParameterNames

Set<String> getParameterNames()
Returns all parameter names.

Returns:
all parameter names.
Since:
4.1

getParameter

@Nullable
String getParameter(String name)
Returns a specific parameter or null if it's not available.

Parameters:
name - parameter name.
Returns:
parameter or null.
Since:
4.1

init

void init(String moduleName,
          String componentName,
          E env)
Initializes this component with the given environment. This method is called before the instance is used.

Parameters:
moduleName - module name
componentName - component name
env - useful environment information for this component.
Since:
4.1

getEnvironment

E getEnvironment()
Returns ComponentEnvironment

Returns:
ComponentEnvironment
Since:
4.1


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480