Loads the configuration file and configuration properties. In the case below, the
inputStream
contains the adapters.txt file and the
properties
holds the init-params. The init params should be used to specialize the repository configuration. The example below shows that you can add new properties to
MyRepository
but not delete them.
<registry-config> <repositories> <repository> <repository-name>adapter</repository-name> <repository-class>org.jvending.sample.MyRepository</repository-class> <repository-config>${basedir}/adapters.txt</repository-config> <init-param> <param-name>add</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>delete</param-name> <param-value>false</param-value> </init-param> </repository> </repositories> </registry-config>
Since this method uses an
InputStream
parameter, the configuration file can be loaded off of the local file system or from a specific URL located at an HTTP address.
@param inputStream the configuration file
@param properties the properties used to configure the repository
@throws NPandayRepositoryException thrown on interrupted I/O. Implementing class may also use this exception to throwother exceptions like invalid properties.