Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Org.eclipse.higgins.configuration.common"

 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}
 
This is a project to hold implementation code that can be used across different configurable components and configuration handlers.  Currently, it only has a helper class that creates a factory object for a configurable component.
 
This is a project to hold implementation code that can be used across different configurable components and configuration handlers.  Currently, it only has a helper class that creates a factory object for a configurable component.
  
== Details ==
+
 
* Status: Available M0.8
+
* Language: Java
+
* Packaging: JAR
+
  
 
== Plans ==
 
== Plans ==
Line 27: Line 25:
  
  
== Links ==  
+
=== PropertyFileConfigurationHandler ===
* [http://eclipse.org/higgins Higgins Home]    
+
 
** [[Architecture]]    
+
* Implements IConfigurationHandler
** [[Components]]
+
* Reads property file (setConfigurationBase, setFileName)
*** [[Configuration API]]
+
** Map holds one entry per property
 +
** Key and value are both strings
 +
 
 +
<code><pre>
 +
public class PropertyFileConfigurationHandler
 +
{
 +
  //constructor #1: no file or directory set
 +
  public PropertyFileConfigurationHandler() {...} 
 +
 
 +
  //constructor #2: set file, but not dir
 +
  public PropertyFileConfigurationHandler(String fileName) {...}
 +
 
 +
  //constructor #3: set directory and file
 +
   public PropertyFileConfigurationHandler(String configDir, String fileName) {...}
 +
 
 +
   public java.util.Map getSettings() throws Exception {...}
 +
 
 +
  public synchronized boolean configure(Map mapConfigurationSettings)
 +
throws Exception {...}
 +
 
 +
  public void setConfigurationBase(String dirName) {...}
 +
  public void setFileName(String fileName) {...}
 +
}
 +
</pre></code>
 +
 
 +
 
 +
 
 +
[[Category:Higgins Components]]

Latest revision as of 10:35, 15 December 2008

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}} This is a project to hold implementation code that can be used across different configurable components and configuration handlers. Currently, it only has a helper class that creates a factory object for a configurable component.


Plans

  • No currently planned features.

Service

ConfigurableComponentFactoryHelper

public class ConfigurableComponentFactoryHelper
{
   static public IConfigurableComponent 
        getSingletonFromFactory(final String factoryClassName)
		throws Exception {...}

   static public IConfigurableComponent 
        getFromFactory(final String factoryClassName)
		throws Exception {...}
}


PropertyFileConfigurationHandler

  • Implements IConfigurationHandler
  • Reads property file (setConfigurationBase, setFileName)
    • Map holds one entry per property
    • Key and value are both strings
public class PropertyFileConfigurationHandler
{
  //constructor #1: no file or directory set
  public PropertyFileConfigurationHandler() {...}  

  //constructor #2: set file, but not dir
  public PropertyFileConfigurationHandler(String fileName) {...}

  //constructor #3: set directory and file
  public PropertyFileConfigurationHandler(String configDir, String fileName) {...}

  public java.util.Map getSettings() throws Exception {...}

  public synchronized boolean configure(Map mapConfigurationSettings) 
				throws Exception {...}

  public void setConfigurationBase(String dirName) {...}
  public void setFileName(String fileName) {...}
}

Back to the top