uk.co.jcp.util.properties
Interface JCPPropertyFactoryRegistry


public interface JCPPropertyFactoryRegistry

Interface for the PropertyFactoryRegistry. Maintains a list of resource string to factory mappings.


Method Summary
 JCPProperties getInstance(java.lang.String source)
          Get an instance of JCPProperties from the default provider
 JCPProperties getInstance(java.lang.String source, JCPProperties parentProperties)
          Get an instance of JCPProperties from the default provider
 JCPProperties getInstance(java.lang.String resource, java.lang.String source)
          Get an instance of JCPProperties from a specific provider
 JCPProperties getInstance(java.lang.String resource, java.lang.String source, JCPProperties parentProperties)
          Get an instance of JCPProperties from a specific provider
 boolean isRegistered(java.lang.String resource)
          Determine if the property factory for the named rsource has been registered
 void registerPropertyFactory(JCPPropertyFactory factory)
          Register a property factory
 void setDefaultPropertyFactory(JCPPropertyFactory factory)
          Set the default property factory.
 

Method Detail

getInstance

public JCPProperties getInstance(java.lang.String source)
                          throws PropertyException
Get an instance of JCPProperties from the default provider
Parameters:
source - the identifier for the property source (e.g. a filename)
Returns:
an instance of JCPProperties
Throws:
PropertyException - if the instance couple not be created

getInstance

public JCPProperties getInstance(java.lang.String source,
                                 JCPProperties parentProperties)
                          throws PropertyException
Get an instance of JCPProperties from the default provider
Parameters:
source - the identifier for the property source (e.g. a filename)
parentProperties - another properties object from which the new object will inherit values
Returns:
an instance of JCPProperties
Throws:
PropertyException - if the instance couple not be created

getInstance

public JCPProperties getInstance(java.lang.String resource,
                                 java.lang.String source)
                          throws PropertyException
Get an instance of JCPProperties from a specific provider
Parameters:
resource - the identifier for the property resource (e.g. "INI")
source - the identifier for the property source (e.g. a filename)
Returns:
an instance of JCPProperties
Throws:
PropertyException - if the instance couple not be created

getInstance

public JCPProperties getInstance(java.lang.String resource,
                                 java.lang.String source,
                                 JCPProperties parentProperties)
                          throws PropertyException
Get an instance of JCPProperties from a specific provider
Parameters:
resource - the identifier for the property resource (e.g. "INI")
source - the identifier for the property source (e.g. a filename)
parentProperties - another properties object from which the new object will inherit values
Returns:
an instance of JCPProperties
Throws:
PropertyException - if the instance couple not be created

registerPropertyFactory

public void registerPropertyFactory(JCPPropertyFactory factory)
Register a property factory
Parameters:
factory - the factory to register

isRegistered

public boolean isRegistered(java.lang.String resource)
Determine if the property factory for the named rsource has been registered
Parameters:
resource - the name of the resource
Returns:
true if the resource factory has been registered

setDefaultPropertyFactory

public void setDefaultPropertyFactory(JCPPropertyFactory factory)
                               throws PropertyException
Set the default property factory. Can only be set once.
Parameters:
factory - the factory to register
Throws:
PropertyException - if the default has already been set