diff --git a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigType.java b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigType.java index fad93e3..241833a 100644 --- a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigType.java +++ b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigType.java @@ -1,25 +1,7 @@ package org.demoiselle.jee.configuration; -/** - * Defines configuration types to be loaded. - * - * @author SERPRO - */ public enum ConfigType { - - /** - * Configuration loaded on {@link System#getProperties()} or {@link System#getenv()}. - */ SYSTEM, - - /** - * Configuration loaded on XML resources. - */ XML, - - /** - * Configuration loaded on properties resources. - */ PROPERTIES - } diff --git a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationException.java b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationException.java index 112e4bb..47d68be 100644 --- a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationException.java +++ b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationException.java @@ -2,33 +2,14 @@ package org.demoiselle.jee.configuration; import org.demoiselle.jee.core.exception.DemoiselleException; -/** - * Exception class intended to be used by configuration components. - * - * @author SERPRO - */ public class ConfigurationException extends DemoiselleException{ private static final long serialVersionUID = 1L; - /** - * Constructor with message. - * - * @param message - * exception message - */ public ConfigurationException(String message) { super(message); } - - /** - * Constructor with message and cause. - * - * @param message - * exception message - * @param cause - * exception cause - */ + public ConfigurationException(String message, Throwable cause) { super(message, cause); } diff --git a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationInterceptor.java b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationInterceptor.java index c8046f9..bda9345 100644 --- a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationInterceptor.java +++ b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationInterceptor.java @@ -9,12 +9,6 @@ import javax.interceptor.InvocationContext; import org.demoiselle.jee.configuration.annotation.Configuration; -/** - *
- * Interceptor class that loads the values of configuration files - * into it's mapped class. - *
- */ @Dependent @Configuration @Interceptor diff --git a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationLoader.java b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationLoader.java index f560c03..bef93f6 100644 --- a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationLoader.java +++ b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/ConfigurationLoader.java @@ -43,13 +43,6 @@ import org.demoiselle.jee.core.annotation.Ignore; import org.demoiselle.jee.core.annotation.Name; import org.demoiselle.jee.core.annotation.Priority; -/** - * This component loads a config class annotated with {@link org.demoiselle.jee.configuration.annotation.configuration.Configuration} - * by filling its attributes with {@link org.demoiselle.jsf.util.Parameter} - * according to a {@link org.demoiselle.configuration.ConfigType}. - * - * @author SERPRO - */ @ApplicationScoped public class ConfigurationLoader implements Serializable { @@ -316,14 +309,7 @@ public class ConfigurationLoader implements Serializable { throw new ConfigurationException(message.toString(), new ConstraintViolationException(violations)); } } - - - - /** - * @param type Base type to look for fields - * @return All non static fields from a certain type, including fields declared in superclasses of this type. - */ public List- * Identifies a configuration class, that is, a structure reserved to store configuration values retrieved from a - * given resource file or system variables. - *
- *- * Configuration resources are application scoped, meaning only one instance can ever exist in - * a running application. For that reason usually configuration fields are immutable, to avoid - * changes made in one context affecting other contexts in a running application. - *
- *A Configuration is:
- *"demoiselle.pagination"
and an attribute named
- * defaultPageSize
is found in the class, the corresponding key
- * demoiselle.pagination.defaultPageSize
is expected to be read in the resource file.
- *
- * @return String prefix common to all attributes to be read by the configuration class
- */
@Nonbinding String prefix() default DEFAULT_PREFIX;
- /**
- * Defines the resource file name to be read by this configuration class. There is no need to specify file extension
- * in the case of properties or XML resources.
- * For instance, when resource is set to "bookmark"
and the type set to properties, a corresponding
- * file named bookmark.properties
is considered.
- * If not specified, the default configuration file demoiselle.properties
is used instead.
- *
- * @return String Name of the resource file to look for (minus file extension)
- */
@Nonbinding String resource() default DEFAULT_RESOURCE;
}
diff --git a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/extractor/ConfigurationValueExtractor.java b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/extractor/ConfigurationValueExtractor.java
index 6f974af..67f9f16 100644
--- a/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/extractor/ConfigurationValueExtractor.java
+++ b/demoiselle-configuration/src/main/java/org/demoiselle/jee/configuration/extractor/ConfigurationValueExtractor.java
@@ -4,48 +4,7 @@ import java.lang.reflect.Field;
import org.apache.commons.configuration2.Configuration;
-/**
- * - * Interface that defines how to convert values extracted from configuration - * files to fields in a class annotated with {@link Configuration}. - *
- * - *
- * Primitive types like int
and float
, their wrapper
- * counterparts like {@link Integer} and {@link Float} and the {@link String} class
- * can already be converted by the framework, this interface is reserved for specialized
- * classes.
- *
true
if this extractor can convert this field into the extractor's final type
- */
boolean isSupported(Field field);
}
--
libgit2 0.21.2