Subversion Repository Public Repository

litesoft

Diff Revisions 2 vs 48 for /trunk/Java/core/Anywhere/src/org/litesoft/configuration/MapConfigDataAccessor.java

Diff revisions: vs.
  @@ -18,37 +18,40 @@
18 18 }
19 19 }
20 20
21 + @Override
21 22 public String loadedFrom()
22 23 {
23 24 return mLoadedFrom;
24 25 }
25 26
27 + @Override
26 28 public String loadedFromDirectory()
27 29 {
28 30 return null;
29 31 }
30 32
33 + @Override
31 34 public Level[] getSetableSupportedLevels()
32 35 {
33 36 return new Level[]{Level.RUN};
34 37 }
35 38
39 + @Override
36 40 public void setKeyValue( Level pLevel, String pKey, String pValue )
37 41 throws UnsupportedOperationException
38 42 {
39 - if ( pKey != null )
43 + pKey = UtilsCommon.assertNotNullNotEmpty( "Key", pKey );
44 + if ( !Level.RUN.equals( UtilsCommon.deNull( pLevel, Level.RUN ) ) )
40 45 {
41 - if ( (pLevel != null) && (Level.RUN != pLevel) )
42 - {
43 - throw new UnsupportedOperationException( "setKeyValue on Level: " + pLevel );
44 - }
45 - synchronized ( mKeyValues )
46 - {
47 - mKeyValues.put( pKey, pValue );
48 - }
46 + throw new UnsupportedOperationException( "setKeyValue for Level '" + pLevel + "' not supported" );
47 + }
48 + synchronized ( mKeyValues )
49 + {
50 + mKeyValues.put( pKey, pValue );
49 51 }
50 52 }
51 53
54 + @Override
52 55 public String[] getAllKeys()
53 56 {
54 57 synchronized ( mKeyValues )
  @@ -59,6 +62,7 @@
59 62 }
60 63 }
61 64
65 + @Override
62 66 public String getString( String pKey )
63 67 {
64 68 synchronized ( mKeyValues )