de.surethingies.properties
Class ParameterFactory

java.lang.Object
  extended by de.surethingies.properties.ParameterFactory

public class ParameterFactory
extends Object


Method Summary
static void addDefaultParameters(String group, SortedSet<Parameter> params)
          Add a Parameter which could be used to translate Settings in TypedParameters
 void addParameter(TypedParameter parameter)
          Add a TypedParameters
 void addParameters(Set<TypedParameter> typedParameters)
          Add a List of TypedParameters
 List<TypedParameter> get(Parameter parameter)
           
 TypedParameter get(Parameter parameter, String identifier)
           
 List<TypedParameter> get(String group)
          Get a Parameter identified
 List<TypedParameter> get(String group, String identifier)
          Get a Parameter identified
 List<String> getGroups()
           
static void init(File propertyFile)
           
static ParameterFactory instance()
           
 void loadProperties()
          Load all Properties from File properties into this Factory
 void loadProperties(File propertyFile)
          Load all Properties from File properties into this Factory
protected  Parameters parameters()
           
static void reset()
           
 void saveProperties()
           
 void saveProperties(File propertyFile)
          Safe the current Properties to the given File
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static ParameterFactory instance()
Returns:
an instance of this Factory

init

public static void init(File propertyFile)

reset

public static void reset()

get

public List<TypedParameter> get(String group)
Get a Parameter identified

Parameters:
group - by the Settings group
Returns:

get

public List<TypedParameter> get(String group,
                                String identifier)
Get a Parameter identified

Parameters:
group - by the Settings group
identifier - and a unique Identifier
Returns:

get

public List<TypedParameter> get(Parameter parameter)

get

public TypedParameter get(Parameter parameter,
                          String identifier)

getGroups

public List<String> getGroups()
Returns:
get a List of the managed Groups

addDefaultParameters

public static void addDefaultParameters(String group,
                                        SortedSet<Parameter> params)
Add a Parameter which could be used to translate Settings in TypedParameters

Parameters:
group - The Property Group
params -

addParameter

public void addParameter(TypedParameter parameter)
Add a TypedParameters

Parameters:
parameter -

addParameters

public void addParameters(Set<TypedParameter> typedParameters)
Add a List of TypedParameters

Parameters:
typedParameters -

loadProperties

public void loadProperties()
                    throws Exception
Load all Properties from File properties into this Factory

Parameters:
propertyFile - the File to load the Properties from
Throws:
Exception

loadProperties

public void loadProperties(File propertyFile)
                    throws Exception
Load all Properties from File properties into this Factory

Parameters:
propertyFile - the File to load the Properties from
Throws:
Exception

saveProperties

public void saveProperties()
                    throws Exception
Throws:
Exception

saveProperties

public void saveProperties(File propertyFile)
                    throws Exception
Safe the current Properties to the given File

Parameters:
propertyFile - the File to safe the Properties to
Throws:
Exception - Errors while safing

parameters

protected Parameters parameters()


Copyright © 2007. All Rights Reserved.