| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
| IJPConfig |
|
| 1.0;1 |
| 1 | package com.sourceforge.jpatterns.patterns.config; |
|
| 2 | ||
| 3 | import com.sourceforge.jpatterns.core.configuration.exceptions.JPConfigException; |
|
| 4 | import com.sourceforge.jpatterns.patterns.IJPattern; |
|
| 5 | ||
| 6 | /** |
|
| 7 | * This interface defines the configuration patterns. It would be used just for the retrieving different not factory specific configuration |
|
| 8 | * information. It would have all the facilities <strong>factory</strong> has - scopes and priorities supports, lots of possible compinations to be |
|
| 9 | * configured - just single name<>value configs, maps with the name of the group and lots of keys<>values etc. |
|
| 10 | * <br/> |
|
| 11 | * todo [zmicer]: please extend the interface with all the possible methods user may need for this. |
|
| 12 | * todo [zmicer]: provide example of the configuration for each method. |
|
| 13 | * <p/> |
|
| 14 | * $Author:: $<br/> |
|
| 15 | * $Rev:: $<br/> |
|
| 16 | * $Date:: $<br/> |
|
| 17 | */ |
|
| 18 | public interface IJPConfig extends IJPattern |
|
| 19 | { |
|
| 20 | /** |
|
| 21 | * Get the value using the key provided. It is the simplest form of this config pattern, still if to remember about the scopes and names - it |
|
| 22 | * provides lots of usefull facilities. |
|
| 23 | * |
|
| 24 | * @param key the key using which we should obtain the value |
|
| 25 | * Can not be null (otherwise <code>IllegalArgumentException</code> would appear). |
|
| 26 | * @param scope the scope to be used |
|
| 27 | * Can not be null (otherwise <code>IllegalArgumentException</code> would appear). |
|
| 28 | * |
|
| 29 | * @return the necessary value to be retrieved. Nul won't be retrieved here as the JPConfigException would be thrown |
|
| 30 | * |
|
| 31 | * @throws JPConfigException would be thrown in the case of smth. wrong with the configuration. Please be noticed it could be |
|
| 32 | * <code>JPConsumerConfigException and JPFrameworkConfigException</code> |
|
| 33 | */ |
|
| 34 | String getValue(final String key, final String scope) throws JPConfigException; |
|
| 35 | } |