PageRenderTime 26ms CodeModel.GetById 23ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/webportal/src/main/java/au/org/emii/portal/config/ConfigurationFile.java

http://alageospatialportal.googlecode.com/
Java | 40 lines | 7 code | 7 blank | 26 comment | 0 complexity | 8fe99deedc815c8e45d5f801feee88ae MD5 | raw file
 1/*
 2 * To change this template, choose Tools | Templates
 3 * and open the template in the editor.
 4 */
 5
 6package au.org.emii.portal.config;
 7
 8/**
 9 *
10 * @author geoff
11 */
12public interface ConfigurationFile {
13
14    /**
15     * Read and validate the configuration file, then return it as a string
16     * if it validated.
17     * @return Contents of config file as string if valid, otherwise null
18     */
19    String configurationFileContents();
20
21    /**
22     * Save the content string inside the config file.  Make sure you've validated
23     * the content before attempting to save (use validateConfigFileContents())
24     * @param content XML string to save as config file contents
25     * @return true on success, otherwise false
26     */
27    boolean saveAsConfigFile(String content);
28
29    boolean validateConfigFileContents(String content, boolean quiet);
30
31    /**
32     * Validate contents of config file to schema
33     *
34     * File contents must be UTF-8!
35     * @param content
36     * @return
37     */
38    boolean validateConfigFileContents(String content);
39
40}