Commit 2d183cfc6aa53ea548096fb9fca41914c2ed80ed
1 parent
6daf45de
Exists in
master
Adição de javadoc para a interface
br.gov.frameworkdemoiselle.configuration.ConfigurationValueExtractor
Showing
1 changed file
with
28 additions
and
0 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/configuration/ConfigurationValueExtractor.java
| ... | ... | @@ -40,9 +40,37 @@ import java.lang.reflect.Field; |
| 40 | 40 | |
| 41 | 41 | import org.apache.commons.configuration.Configuration; |
| 42 | 42 | |
| 43 | +/** | |
| 44 | + * Interface that defining the way to extract the values of configurations attributes from property file. | |
| 45 | + * It should be implemented if is wanted to extract values of a configuration attribute, in a different way or | |
| 46 | + * for a type not yet offered by Demoiselle Framework. | |
| 47 | + * | |
| 48 | + * @author SERPRO | |
| 49 | + */ | |
| 43 | 50 | public interface ConfigurationValueExtractor { |
| 44 | 51 | |
| 52 | + /** | |
| 53 | + * Method that must appropriately extract the value from a property file and set this value to a | |
| 54 | + * field in a configuration class. | |
| 55 | + * | |
| 56 | + * @param prefix | |
| 57 | + * optional parte of property name that must be concatenated with <b>key</b> to form the whole | |
| 58 | + * property name. | |
| 59 | + * @param key | |
| 60 | + * key of the property. | |
| 61 | + * @param field | |
| 62 | + * configuration field to be setted. | |
| 63 | + * @param configuration | |
| 64 | + * a configuration object. | |
| 65 | + */ | |
| 45 | 66 | Object getValue(String prefix, String key, Field field, Configuration configuration) throws Exception; |
| 46 | 67 | |
| 68 | + /** | |
| 69 | + * Checks if the extractor class is appropriate to extract values to the type of deffined by parameter | |
| 70 | + * <b>field</b>. | |
| 71 | + * | |
| 72 | + * @param field | |
| 73 | + * field to be checked. | |
| 74 | + */ | |
| 47 | 75 | boolean isSupported(Field field); |
| 48 | 76 | } | ... | ... |