Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package org.litesoft.configuration;

public interface ConfigDataAccessor
{
    public enum Level
    {
        RUN, USER, MACHINE
    }

    /**
     * @return !null
     */
    public String[] getAllKeys();

    /**
     * @param pKey not null or empty
     *
     * @return null if not found or value associated with key
     */
    public String getString( String pKey );

    /**
     * @return !null - source of Config data.
     */
    public String loadedFrom();

    /**
     * @return null if from ResourceAsStream or full directory path where relative config file path was loaded from.
     */
    public String loadedFromDirectory();

    /**
     * All implementations MUST support RUN level, but may not support other levels
     *
     * @return an array with at least 1 (RUN) entry
     */
    public Level[] getSetableSupportedLevels();

    /**
     * All implementations MUST support RUN level, but may not support other levels
     *
     * @param pLevel null interpreted as RUN
     * @param pKey   not null or empty
     * @param pValue null means remove
     *
     * @throws UnsupportedOperationException if requested level not supported
     */
    public void setKeyValue( Level pLevel, String pKey, String pValue )
            throws UnsupportedOperationException;
}

Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/configuration/ConfigDataAccessor.java

Diff revisions: vs.
Revision Author Commited Message
2 GeorgeS picture GeorgeS Sun 07 Feb, 2010 12:50:58 +0000