1 package org.naftulin.configmgr.parsers;
2
3 import java.net.URL;
4
5 import org.naftulin.configmgr.ConfigurationManagerException;
6 import org.naftulin.configmgr.ConfigurationManagementEntry;
7
8 /***
9 * Configuration entry parser converts configuration record into configuration management enttry.
10 * It parses the file (or resource) that the record describes, and stores the configuration
11 * as a content of an {@link org.naftulin.configmgr.ConfigurationManagementEntry entry}.
12 *
13 * @author Henry Naftulin
14 * @since 1.0
15 */
16 public interface ConfigEntryParser {
17
18 /***
19 * Retrurns a configuration managment entry by parsing the record passed in.
20 * @param key the key configuration entry will be assigned
21 * @param fileUrl the file URL to be parsed.
22 * @return a configuration managment entry by parsing the record passed in.
23 * @throws ConfigurationManagerException if an error occurs while parsing an entry.
24 */
25 ConfigurationManagementEntry getConfigurationManagementEntry(
26 String key, URL fileUrl) throws ConfigurationManagerException;
27
28 }