tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject incubator-tamaya git commit: TAMAYA-19: Code cleanup - renamed annot to mapping
Date Sat, 06 Dec 2014 01:08:44 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 36979648b -> cd87f5933


TAMAYA-19: Code cleanup - renamed annot to mapping


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/cd87f593
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/cd87f593
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/cd87f593

Branch: refs/heads/master
Commit: cd87f5933cd3fba86028fa5fb15882153f847fa8
Parents: 3697964
Author: anatole <anatole@apache.org>
Authored: Sat Dec 6 02:08:37 2014 +0100
Committer: anatole <anatole@apache.org>
Committed: Sat Dec 6 02:08:37 2014 +0100

----------------------------------------------------------------------
 .../org/apache/tamaya/PropertyAdapters.java     |  4 +-
 .../tamaya/annot/ConfigChangeListener.java      | 37 ---------
 .../tamaya/annot/ConfiguredProperties.java      | 41 ----------
 .../apache/tamaya/annot/ConfiguredProperty.java | 79 --------------------
 .../org/apache/tamaya/annot/DefaultAreas.java   | 43 -----------
 .../org/apache/tamaya/annot/DefaultValue.java   | 41 ----------
 .../org/apache/tamaya/annot/LoadPolicy.java     | 48 ------------
 .../org/apache/tamaya/annot/WithConfig.java     | 41 ----------
 .../apache/tamaya/annot/WithConfigOperator.java | 44 -----------
 .../org/apache/tamaya/annot/WithLoadPolicy.java | 36 ---------
 .../tamaya/annot/WithPropertyAdapter.java       | 44 -----------
 .../tamaya/mapping/ConfigChangeListener.java    | 37 +++++++++
 .../tamaya/mapping/ConfiguredProperties.java    | 41 ++++++++++
 .../tamaya/mapping/ConfiguredProperty.java      | 79 ++++++++++++++++++++
 .../org/apache/tamaya/mapping/DefaultAreas.java | 43 +++++++++++
 .../org/apache/tamaya/mapping/DefaultValue.java | 41 ++++++++++
 .../org/apache/tamaya/mapping/LoadPolicy.java   | 48 ++++++++++++
 .../org/apache/tamaya/mapping/WithConfig.java   | 41 ++++++++++
 .../tamaya/mapping/WithConfigOperator.java      | 44 +++++++++++
 .../apache/tamaya/mapping/WithLoadPolicy.java   | 36 +++++++++
 .../tamaya/mapping/WithPropertyAdapter.java     | 44 +++++++++++
 .../spi/PropertyAdaptersSingletonSpi.java       |  2 +-
 .../test/java/annottext/AnnotatedConfig.java    |  8 +-
 .../java/annottext/AnnotatedFullConfig.java     |  8 +-
 .../TestPropertyAdaptersSingletonSpi.java       |  2 +-
 core/pom.xml                                    |  2 +-
 .../core/internal/DefaultConfigProvider.java    | 56 --------------
 .../core/internal/inject/ConfiguredField.java   |  4 +-
 .../core/internal/inject/ConfiguredMethod.java  |  4 +-
 .../core/internal/inject/ConfiguredType.java    |  2 +-
 .../DefaultPropertyAdaptersSingletonSpi.java    |  2 +-
 ...che.tamaya.spi.PropertyProvidersSingletonSpi | 19 -----
 ...tionManagerSingletonSpiSingletonSpiTest.java |  4 +-
 .../samples/annotations/ConfigTemplate.java     |  4 +-
 .../samples/annotations/ConfiguredClass.java    |  8 +-
 .../java/metamodel/ext/cdi/ConfiguredClass.java |  8 +-
 36 files changed, 485 insertions(+), 560 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/PropertyAdapters.java b/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
index 1934591..e8348fd 100644
--- a/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
+++ b/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
@@ -18,7 +18,7 @@
  */
 package org.apache.tamaya;
 
-import org.apache.tamaya.annot.WithPropertyAdapter;
+import org.apache.tamaya.mapping.WithPropertyAdapter;
 import org.apache.tamaya.spi.Bootstrap;
 import org.apache.tamaya.spi.PropertyAdaptersSingletonSpi;
 import java.util.Optional;
@@ -79,7 +79,7 @@ public final class PropertyAdapters{
     /**
      * Get an adapter converting to the given target type.
      * @param targetType the target type class
-     * @param annotation the {@link org.apache.tamaya.annot.WithPropertyAdapter} annotation, or null. If the annotation is not null and
+     * @param annotation the {@link org.apache.tamaya.mapping.WithPropertyAdapter} annotation, or null. If the annotation is not null and
      *                   defines an overriding adapter, this instance is created and returned.
      * @param <T> the target type
      * @return the corresponding adapter, never null.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/ConfigChangeListener.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/ConfigChangeListener.java b/api/src/main/java/org/apache/tamaya/annot/ConfigChangeListener.java
deleted file mode 100644
index 08271f3..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/ConfigChangeListener.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to annotate a method on a class to be informed on config changes.
- * The exact behaviour, when configuration change events are sent can be configured
- * on each configured property/method by adding the {@link org.apache.tamaya.annot.WithLoadPolicy}
- * annotation. By default listeners are only informed about changes that are affecting configured
- * values current the containing class/instance.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.METHOD })
-public @interface ConfigChangeListener {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperties.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperties.java b/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperties.java
deleted file mode 100644
index 65eb499..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperties.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation container to enable injection current multiple {@link org.apache.tamaya.annot.ConfiguredProperty}
- * annotations. Hereby the ordering current annotations imply the defaulting. The first value that
- * could be resolved successfully in the chain current annotations will be used.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD })
-public @interface ConfiguredProperties {
-
-    /**
-     * Get the different configuration keys to be looked up, in order current precedence. The first non null value
-     * found will be used.
-     */
-    ConfiguredProperty[] value() default {};
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperty.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperty.java b/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperty.java
deleted file mode 100644
index 5916a38..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/ConfiguredProperty.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.*;
-
-/**
- * Annotation to enable injection current a configured property or define the returned data for
- * a configuration template method. Hereby this annotation can be used in multiple ways and combined
- * with other annotations such as {@link org.apache.tamaya.annot.DefaultValue},
- * {@link org.apache.tamaya.annot.WithLoadPolicy}, {@link org.apache.tamaya.annot.WithConfig},
- * {@link org.apache.tamaya.annot.WithConfigOperator}, {@link org.apache.tamaya.annot.WithPropertyAdapter}.
- *
- * Below the most simple variant current a configured class is given:
- * {@code
- * pubic class ConfiguredItem{
- *
- *   @ConfiguredProperty
- *   private String aValue;
- * }
- * When this class is configured, e.g. by passing it to {@link org.apache.tamaya.Configuration#configure(Object)},
- * the following is happening:
- * <ul>
- *     <li>The current valid Configuration is evaluated by calling {@code Configuration cfg = Configuration.current();}</li>
- *     <li>The current property String value is evaluated by calling {@code cfg.get("aValue");}</li>
- *     <li>if not successful, an error is thrown ({@link org.apache.tamaya.ConfigException}.</li>
- *     <li>On success, since no type conversion is involved, the value is injected.</li>
- *     <li>The configured bean is registered as a weak change listener in the config system's underlying
- *     configuration, so future config changes can be propagated (controlled by {@link org.apache.tamaya.annot.WithLoadPolicy}
- *     annotations).</li>
- * </ul>
- *
- * In the next example we explicitly define the property value:
- * {@code
- * pubic class ConfiguredItem{
- *
- *   @ConfiguredProperty
- *   @ConfiguredProperty("a.b.value")
- *   @configuredProperty("a.b.deprecated.value")
- *   @DefaultValue("${env:java.version}")
- *   private String aValue;
- * }
- *
- * Within this example we evaluate multiple possible keys. Evaluation is aborted if a key could be successfully
- * resolved. Hereby the ordering current the annotations define the ordering current resolution, so in the example above
- * resolution equals to {@code "aValue", "a.b.value", "a.b.deprecated.value"}. If no value could be read
- * fromMap the configuration, it uses the value fromMap the {@code DefaultValue} annotation. Interesting here
- * is that this value is not static, it is evaluated by calling
- * {@link org.apache.tamaya.Configuration#evaluateValue(org.apache.tamaya.Configuration, String)}.
- */
-@Repeatable(ConfiguredProperties.class)
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD })
-public @interface ConfiguredProperty {
-
-    /**
-     * Get the property names to be used. Hereby the first non null value evaluated is injected as property value.
-     *
-     * @return the property names, not null. If missing the field or method name being injected is used by default.
-     */
-    String value() default "";
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/DefaultAreas.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/DefaultAreas.java b/api/src/main/java/org/apache/tamaya/annot/DefaultAreas.java
deleted file mode 100644
index 24b23eb..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/DefaultAreas.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to control injection and resolution current a configured bean. The configuration keys
- * to be resolved are basically determined by the {@link org.apache.tamaya.annot.ConfiguredProperty}
- * annotation(s). Nevertheless these annotations can also have relative key names. This annotation allows
- * to define a configuration area that is prefixed to all relative configuration keys within the
- * corresponding class/template interface.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE })
-public @interface DefaultAreas {
-
-    /**
-     * Allows to declare an operator that should be applied before injecting values into the bean.
-     * @return the operator class to be used.
-     */
-    String[] value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/DefaultValue.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/DefaultValue.java b/api/src/main/java/org/apache/tamaya/annot/DefaultValue.java
deleted file mode 100644
index 6c818f2..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/DefaultValue.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to define a default value to be returned, when no configured value could be
- * determined for a property/template accessor. The value hereby can also contain a
- * dynamic expression that is evaluated by the configuration system.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD })
-public @interface DefaultValue {
-
-    /**
-     * The default value to be injected, if no such configuration entry was found. If value was found and no default
-     * is defined, it is handled as a deployment error.
-     */
-    String value() default "";
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/LoadPolicy.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/LoadPolicy.java b/api/src/main/java/org/apache/tamaya/annot/LoadPolicy.java
deleted file mode 100644
index 9ecf3ae..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/LoadPolicy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-/**
- * Available policies that describe how changes affecting configured values are published/reinjected.
- * The policy also affects the cases were any configured listeners/listener methods are called for
- * propagation current configuration changes.
- */
-public enum LoadPolicy {
-    /**
-     * The configuration value is evaluated once, when the owning component is loaded/configured, but never updated later.
-     */
-    INITIAL,
-    /**
-     * The configuration value is evaluated exactly once on its first use lazily, but never updated later.
-     * This feature is not applicable on field injection, but only on configuration template methods.
-     */
-    LAZY,
-    /**
-     * The configuration value is evaluated once, when the owning component is loaded/configured.
-     * Later changes on this configuration entry will be reinjected/updated and additionally triggered
-     * as {@link java.beans.PropertyChangeEvent}.
-     */
-    MANAGED,
-    /**
-     * The configuration value is evaluated once, when the owning component is loaded/configured.
-     * Later changes on this configuration entry will be reinjected/updated, but no {@link java.beans.PropertyChangeEvent}
-     * will be triggered.
-     */
-    SILENT
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/WithConfig.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/WithConfig.java b/api/src/main/java/org/apache/tamaya/annot/WithConfig.java
deleted file mode 100644
index a7437ed..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/WithConfig.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to reference an explicit {@link org.apache.tamaya.Configuration} to be used to
- * resolve the required properties. the configured value is passed to {@code Configuration.current(String)}
- * to evaluate the required configuration required.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
-public @interface WithConfig {
-
-    /**
-     * The name current the {@link org.apache.tamaya.Configuration} to be used to
-     * resolve the required properties, not null or empty.
-     */
-    String value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/WithConfigOperator.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/WithConfigOperator.java b/api/src/main/java/org/apache/tamaya/annot/WithConfigOperator.java
deleted file mode 100644
index 278fdd3..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/WithConfigOperator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import org.apache.tamaya.ConfigOperator;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to define an configuration operator to be used before accessing a configured value.
- * This allows filtering current configuration, e.g. for realizing views or ensuring security
- * constraints.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
-public @interface WithConfigOperator {
-
-    /**
-     * Define a custom adapter that should be used to adapt the configuration entry injected. This overrides any
-     * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
-     * registered, it is handled as a deployment error.
-     */
-    Class<? extends ConfigOperator> value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/WithLoadPolicy.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/WithLoadPolicy.java b/api/src/main/java/org/apache/tamaya/annot/WithLoadPolicy.java
deleted file mode 100644
index 9a1a40c..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/WithLoadPolicy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to define how config changes are handled for a type or per property/template method.
- * @see org.apache.tamaya.annot.LoadPolicy
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
-public @interface WithLoadPolicy {
-
-    LoadPolicy value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/annot/WithPropertyAdapter.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/annot/WithPropertyAdapter.java b/api/src/main/java/org/apache/tamaya/annot/WithPropertyAdapter.java
deleted file mode 100644
index f7e060e..0000000
--- a/api/src/main/java/org/apache/tamaya/annot/WithPropertyAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.annot;
-
-import org.apache.tamaya.PropertyAdapter;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation to define a type adapter to be used before injecting a configured value.
- * This will override any other adapter for performing the type conversion before
- * injecting the field value.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.METHOD })
-public @interface WithPropertyAdapter {
-
-    /**
-     * Define a custom adapter that should be used to adapt the configuration entry injected. This overrides any
-     * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
-     * registered, it is handled as a deployment error.
-     */
-    Class<? extends PropertyAdapter> value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/ConfigChangeListener.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/ConfigChangeListener.java b/api/src/main/java/org/apache/tamaya/mapping/ConfigChangeListener.java
new file mode 100644
index 0000000..44bc55c
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/ConfigChangeListener.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to annotate a method on a class to be informed on config changes.
+ * The exact behaviour, when configuration change events are sent can be configured
+ * on each configured property/method by adding the {@link org.apache.tamaya.mapping.WithLoadPolicy}
+ * annotation. By default listeners are only informed about changes that are affecting configured
+ * values current the containing class/instance.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.METHOD })
+public @interface ConfigChangeListener {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperties.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperties.java b/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperties.java
new file mode 100644
index 0000000..90346b1
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperties.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation container to enable injection current multiple {@link org.apache.tamaya.mapping.ConfiguredProperty}
+ * annotations. Hereby the ordering current annotations imply the defaulting. The first value that
+ * could be resolved successfully in the chain current annotations will be used.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD })
+public @interface ConfiguredProperties {
+
+    /**
+     * Get the different configuration keys to be looked up, in order current precedence. The first non null value
+     * found will be used.
+     */
+    ConfiguredProperty[] value() default {};
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperty.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperty.java b/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperty.java
new file mode 100644
index 0000000..069210b
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/ConfiguredProperty.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.*;
+
+/**
+ * Annotation to enable injection current a configured property or define the returned data for
+ * a configuration template method. Hereby this annotation can be used in multiple ways and combined
+ * with other annotations such as {@link org.apache.tamaya.mapping.DefaultValue},
+ * {@link org.apache.tamaya.mapping.WithLoadPolicy}, {@link org.apache.tamaya.mapping.WithConfig},
+ * {@link org.apache.tamaya.mapping.WithConfigOperator}, {@link org.apache.tamaya.mapping.WithPropertyAdapter}.
+ *
+ * Below the most simple variant current a configured class is given:
+ * {@code
+ * pubic class ConfiguredItem{
+ *
+ *   @ConfiguredProperty
+ *   private String aValue;
+ * }
+ * When this class is configured, e.g. by passing it to {@link org.apache.tamaya.Configuration#configure(Object)},
+ * the following is happening:
+ * <ul>
+ *     <li>The current valid Configuration is evaluated by calling {@code Configuration cfg = Configuration.current();}</li>
+ *     <li>The current property String value is evaluated by calling {@code cfg.get("aValue");}</li>
+ *     <li>if not successful, an error is thrown ({@link org.apache.tamaya.ConfigException}.</li>
+ *     <li>On success, since no type conversion is involved, the value is injected.</li>
+ *     <li>The configured bean is registered as a weak change listener in the config system's underlying
+ *     configuration, so future config changes can be propagated (controlled by {@link org.apache.tamaya.mapping.WithLoadPolicy}
+ *     annotations).</li>
+ * </ul>
+ *
+ * In the next example we explicitly define the property value:
+ * {@code
+ * pubic class ConfiguredItem{
+ *
+ *   @ConfiguredProperty
+ *   @ConfiguredProperty("a.b.value")
+ *   @configuredProperty("a.b.deprecated.value")
+ *   @DefaultValue("${env:java.version}")
+ *   private String aValue;
+ * }
+ *
+ * Within this example we evaluate multiple possible keys. Evaluation is aborted if a key could be successfully
+ * resolved. Hereby the ordering current the annotations define the ordering current resolution, so in the example above
+ * resolution equals to {@code "aValue", "a.b.value", "a.b.deprecated.value"}. If no value could be read
+ * fromMap the configuration, it uses the value fromMap the {@code DefaultValue} annotation. Interesting here
+ * is that this value is not static, it is evaluated by calling
+ * {@link org.apache.tamaya.Configuration#evaluateValue(org.apache.tamaya.Configuration, String)}.
+ */
+@Repeatable(ConfiguredProperties.class)
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD })
+public @interface ConfiguredProperty {
+
+    /**
+     * Get the property names to be used. Hereby the first non null value evaluated is injected as property value.
+     *
+     * @return the property names, not null. If missing the field or method name being injected is used by default.
+     */
+    String value() default "";
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/DefaultAreas.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/DefaultAreas.java b/api/src/main/java/org/apache/tamaya/mapping/DefaultAreas.java
new file mode 100644
index 0000000..fa79941
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/DefaultAreas.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to control injection and resolution current a configured bean. The configuration keys
+ * to be resolved are basically determined by the {@link org.apache.tamaya.mapping.ConfiguredProperty}
+ * annotation(s). Nevertheless these annotations can also have relative key names. This annotation allows
+ * to define a configuration area that is prefixed to all relative configuration keys within the
+ * corresponding class/template interface.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.TYPE })
+public @interface DefaultAreas {
+
+    /**
+     * Allows to declare an operator that should be applied before injecting values into the bean.
+     * @return the operator class to be used.
+     */
+    String[] value();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/DefaultValue.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/DefaultValue.java b/api/src/main/java/org/apache/tamaya/mapping/DefaultValue.java
new file mode 100644
index 0000000..aa923ae
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/DefaultValue.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to define a default value to be returned, when no configured value could be
+ * determined for a property/template accessor. The value hereby can also contain a
+ * dynamic expression that is evaluated by the configuration system.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD })
+public @interface DefaultValue {
+
+    /**
+     * The default value to be injected, if no such configuration entry was found. If value was found and no default
+     * is defined, it is handled as a deployment error.
+     */
+    String value() default "";
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/LoadPolicy.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/LoadPolicy.java b/api/src/main/java/org/apache/tamaya/mapping/LoadPolicy.java
new file mode 100644
index 0000000..71eb2ec
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/LoadPolicy.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+/**
+ * Available policies that describe how changes affecting configured values are published/reinjected.
+ * The policy also affects the cases were any configured listeners/listener methods are called for
+ * propagation current configuration changes.
+ */
+public enum LoadPolicy {
+    /**
+     * The configuration value is evaluated once, when the owning component is loaded/configured, but never updated later.
+     */
+    INITIAL,
+    /**
+     * The configuration value is evaluated exactly once on its first use lazily, but never updated later.
+     * This feature is not applicable on field injection, but only on configuration template methods.
+     */
+    LAZY,
+    /**
+     * The configuration value is evaluated once, when the owning component is loaded/configured.
+     * Later changes on this configuration entry will be reinjected/updated and additionally triggered
+     * as {@link java.beans.PropertyChangeEvent}.
+     */
+    MANAGED,
+    /**
+     * The configuration value is evaluated once, when the owning component is loaded/configured.
+     * Later changes on this configuration entry will be reinjected/updated, but no {@link java.beans.PropertyChangeEvent}
+     * will be triggered.
+     */
+    SILENT
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/WithConfig.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/WithConfig.java b/api/src/main/java/org/apache/tamaya/mapping/WithConfig.java
new file mode 100644
index 0000000..ce139df
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/WithConfig.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to reference an explicit {@link org.apache.tamaya.Configuration} to be used to
+ * resolve the required properties. the configured value is passed to {@code Configuration.current(String)}
+ * to evaluate the required configuration required.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
+public @interface WithConfig {
+
+    /**
+     * The name current the {@link org.apache.tamaya.Configuration} to be used to
+     * resolve the required properties, not null or empty.
+     */
+    String value();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/WithConfigOperator.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/WithConfigOperator.java b/api/src/main/java/org/apache/tamaya/mapping/WithConfigOperator.java
new file mode 100644
index 0000000..b001780
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/WithConfigOperator.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import org.apache.tamaya.ConfigOperator;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to define an configuration operator to be used before accessing a configured value.
+ * This allows filtering current configuration, e.g. for realizing views or ensuring security
+ * constraints.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
+public @interface WithConfigOperator {
+
+    /**
+     * Define a custom adapter that should be used to adapt the configuration entry injected. This overrides any
+     * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
+     * registered, it is handled as a deployment error.
+     */
+    Class<? extends ConfigOperator> value();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/WithLoadPolicy.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/WithLoadPolicy.java b/api/src/main/java/org/apache/tamaya/mapping/WithLoadPolicy.java
new file mode 100644
index 0000000..f76a8ce
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/WithLoadPolicy.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to define how config changes are handled for a type or per property/template method.
+ * @see org.apache.tamaya.mapping.LoadPolicy
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
+public @interface WithLoadPolicy {
+
+    LoadPolicy value();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/mapping/WithPropertyAdapter.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/mapping/WithPropertyAdapter.java b/api/src/main/java/org/apache/tamaya/mapping/WithPropertyAdapter.java
new file mode 100644
index 0000000..d5d0e5a
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/mapping/WithPropertyAdapter.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.mapping;
+
+import org.apache.tamaya.PropertyAdapter;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to define a type adapter to be used before injecting a configured value.
+ * This will override any other adapter for performing the type conversion before
+ * injecting the field value.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.FIELD, ElementType.METHOD })
+public @interface WithPropertyAdapter {
+
+    /**
+     * Define a custom adapter that should be used to adapt the configuration entry injected. This overrides any
+     * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
+     * registered, it is handled as a deployment error.
+     */
+    Class<? extends PropertyAdapter> value();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/main/java/org/apache/tamaya/spi/PropertyAdaptersSingletonSpi.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/PropertyAdaptersSingletonSpi.java b/api/src/main/java/org/apache/tamaya/spi/PropertyAdaptersSingletonSpi.java
index 5087729..72b7bd1 100644
--- a/api/src/main/java/org/apache/tamaya/spi/PropertyAdaptersSingletonSpi.java
+++ b/api/src/main/java/org/apache/tamaya/spi/PropertyAdaptersSingletonSpi.java
@@ -19,7 +19,7 @@
 package org.apache.tamaya.spi;
 
 import org.apache.tamaya.PropertyAdapter;
-import org.apache.tamaya.annot.WithPropertyAdapter;
+import org.apache.tamaya.mapping.WithPropertyAdapter;
 
 /**
  * SPI that is used by the {@link org.apache.tamaya.PropertyAdapters} singleton as delegation instance.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/test/java/annottext/AnnotatedConfig.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/annottext/AnnotatedConfig.java b/api/src/test/java/annottext/AnnotatedConfig.java
index b011875..f43f9ee 100644
--- a/api/src/test/java/annottext/AnnotatedConfig.java
+++ b/api/src/test/java/annottext/AnnotatedConfig.java
@@ -18,10 +18,10 @@
  */
 package annottext;
 
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.WithLoadPolicy;
-import org.apache.tamaya.annot.DefaultValue;
-import org.apache.tamaya.annot.LoadPolicy;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.WithLoadPolicy;
+import org.apache.tamaya.mapping.DefaultValue;
+import org.apache.tamaya.mapping.LoadPolicy;
 
 /**
  * An example showing some basic annotations, using an interface to be proxied by the

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/test/java/annottext/AnnotatedFullConfig.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/annottext/AnnotatedFullConfig.java b/api/src/test/java/annottext/AnnotatedFullConfig.java
index d1a2598..4f09ee8 100644
--- a/api/src/test/java/annottext/AnnotatedFullConfig.java
+++ b/api/src/test/java/annottext/AnnotatedFullConfig.java
@@ -19,10 +19,10 @@
 package annottext;
 
 import org.apache.tamaya.Configuration;
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.WithLoadPolicy;
-import org.apache.tamaya.annot.DefaultValue;
-import org.apache.tamaya.annot.LoadPolicy;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.WithLoadPolicy;
+import org.apache.tamaya.mapping.DefaultValue;
+import org.apache.tamaya.mapping.LoadPolicy;
 
 /**
  * An example showing some basic annotations, using an interface to be proxied by the

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/api/src/test/java/org.apache.tamaya/TestPropertyAdaptersSingletonSpi.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org.apache.tamaya/TestPropertyAdaptersSingletonSpi.java b/api/src/test/java/org.apache.tamaya/TestPropertyAdaptersSingletonSpi.java
index ef614dd..b45bfbe 100644
--- a/api/src/test/java/org.apache.tamaya/TestPropertyAdaptersSingletonSpi.java
+++ b/api/src/test/java/org.apache.tamaya/TestPropertyAdaptersSingletonSpi.java
@@ -18,7 +18,7 @@
  */
 package org.apache.tamaya;
 
-import org.apache.tamaya.annot.WithPropertyAdapter;
+import org.apache.tamaya.mapping.WithPropertyAdapter;
 import org.apache.tamaya.spi.PropertyAdaptersSingletonSpi;
 import java.math.BigDecimal;
 import java.math.BigInteger;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 6d0d59b..e2bafce 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -52,7 +52,7 @@ under the License.
                     <instructions>
                         <Import-package>org.apache.tamaya.*</Import-package>
                         <Import-package>org.apache.tamaya.spi.*</Import-package>
-                        <Import-package>org.apache.tamaya.annot.*</Import-package>
+                        <Import-package>org.apache.tamaya.injectt.*</Import-package>
                         <Export-Package>org.apache.tamaya.core.cdi.*</Export-Package>
                         <Export-Package>org.apache.tamaya.core.config.*</Export-Package>
                         <Export-Package>org.apache.tamaya.core.env.*</Export-Package>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigProvider.java
deleted file mode 100644
index 5035e0b..0000000
--- a/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigProvider.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.internal;
-
-import org.apache.tamaya.PropertyProviders;
-import org.apache.tamaya.core.config.ConfigurationBuilder;
-import org.apache.tamaya.AggregationPolicy;
-import org.apache.tamaya.core.spi.ConfigurationProviderSpi;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.MetaInfoBuilder;
-
-/**
- * Created by Anatole on 30.09.2014.
- */
-public class DefaultConfigProvider implements ConfigurationProviderSpi{
-
-    private Configuration config;
-
-    @Override
-    public String getConfigName(){
-        return "default";
-    }
-
-    @Override
-    public Configuration getConfiguration(){
-        if(config == null){
-            config = ConfigurationBuilder.of(getConfigName())
-                    .addResources("classpath*:META-INF/config/**/*.xml", "classpath*:META-INF/config/**/*.properties",
-                                  "classpath*:META-INF/config/**/*.init").setMetainfo(
-                            MetaInfoBuilder.of("Default Configuration")
-                                    .setSourceExpressions("classpath*:META-INF/config/**/*.xml",
-                                                          "classpath*:META-INF/config/**/*" + ".properties",
-                                                          "classpath*:META-INF/config/**/*.ini").build())
-                    .addConfigMaps(AggregationPolicy.OVERRIDE(), PropertyProviders.fromEnvironmentProperties(),
-                                   PropertyProviders.fromSystemProperties()).build();
-        }
-        return config;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredField.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredField.java b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredField.java
index b8d4c3e..81c16b8 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredField.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredField.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.PropertyAdapter;
 import org.apache.tamaya.PropertyAdapters;
-import org.apache.tamaya.annot.*;
+import org.apache.tamaya.mapping.*;
 import org.apache.tamaya.core.internal.Utils;
 
 import java.lang.reflect.Field;
@@ -145,7 +145,7 @@ public class ConfiguredField {
                 }
             }
         } catch (Exception e) {
-            throw new ConfigException("Failed to inject configured field: " + this.annotatedField.getDeclaringClass()
+            throw new ConfigException("Failed to mapping configured field: " + this.annotatedField.getDeclaringClass()
                     .getName() + '.' + annotatedField.getName(), e);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredMethod.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredMethod.java b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredMethod.java
index 53e7bff..fcb68f1 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredMethod.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredMethod.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.PropertyAdapter;
 import org.apache.tamaya.PropertyAdapters;
-import org.apache.tamaya.annot.*;
+import org.apache.tamaya.mapping.*;
 import org.apache.tamaya.core.internal.Utils;
 
 import java.lang.reflect.Method;
@@ -187,7 +187,7 @@ public class ConfiguredMethod {
                 }
             }
         } catch (Exception e) {
-            throw new ConfigException("Failed to inject configured field: " + this.annotatedMethod.getDeclaringClass()
+            throw new ConfigException("Failed to mapping configured field: " + this.annotatedMethod.getDeclaringClass()
                     .getName() + '.' + annotatedMethod.getName(), e);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredType.java b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredType.java
index 56bbe6e..03df282 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredType.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/inject/ConfiguredType.java
@@ -20,7 +20,7 @@ package org.apache.tamaya.core.internal.inject;
 
 import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.Configuration;
-import org.apache.tamaya.annot.*;
+import org.apache.tamaya.mapping.*;
 
 import java.beans.PropertyChangeEvent;
 import java.lang.reflect.Field;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/java/org/apache/tamaya/core/internal/properties/DefaultPropertyAdaptersSingletonSpi.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/properties/DefaultPropertyAdaptersSingletonSpi.java b/core/src/main/java/org/apache/tamaya/core/internal/properties/DefaultPropertyAdaptersSingletonSpi.java
index 4f35d3a..7323132 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/properties/DefaultPropertyAdaptersSingletonSpi.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/properties/DefaultPropertyAdaptersSingletonSpi.java
@@ -20,7 +20,7 @@ package org.apache.tamaya.core.internal.properties;
 
 import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.PropertyAdapter;
-import org.apache.tamaya.annot.WithPropertyAdapter;
+import org.apache.tamaya.mapping.WithPropertyAdapter;
 import org.apache.tamaya.spi.PropertyAdaptersSingletonSpi;
 import java.math.BigDecimal;
 import java.math.BigInteger;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyProvidersSingletonSpi
----------------------------------------------------------------------
diff --git a/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyProvidersSingletonSpi b/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyProvidersSingletonSpi
deleted file mode 100644
index 7b43318..0000000
--- a/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyProvidersSingletonSpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy current the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.core.internal.DefaultPropertyProvidersSingletonSpi

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/test/java/org/apache/tamaya/DefaultConfigurationManagerSingletonSpiSingletonSpiTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/DefaultConfigurationManagerSingletonSpiSingletonSpiTest.java b/core/src/test/java/org/apache/tamaya/DefaultConfigurationManagerSingletonSpiSingletonSpiTest.java
index 7f93f21..924d71b 100644
--- a/core/src/test/java/org/apache/tamaya/DefaultConfigurationManagerSingletonSpiSingletonSpiTest.java
+++ b/core/src/test/java/org/apache/tamaya/DefaultConfigurationManagerSingletonSpiSingletonSpiTest.java
@@ -23,8 +23,8 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.DefaultValue;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.DefaultValue;
 import org.apache.tamaya.core.internal.config.DefaultConfigurationManagerSingletonSpi;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/test/java/org/apache/tamaya/samples/annotations/ConfigTemplate.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/samples/annotations/ConfigTemplate.java b/core/src/test/java/org/apache/tamaya/samples/annotations/ConfigTemplate.java
index 0299d69..ed440a0 100644
--- a/core/src/test/java/org/apache/tamaya/samples/annotations/ConfigTemplate.java
+++ b/core/src/test/java/org/apache/tamaya/samples/annotations/ConfigTemplate.java
@@ -18,8 +18,8 @@
  */
 package org.apache.tamaya.samples.annotations;
 
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.DefaultValue;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.DefaultValue;
 
 import java.math.BigDecimal;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/core/src/test/java/org/apache/tamaya/samples/annotations/ConfiguredClass.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/samples/annotations/ConfiguredClass.java b/core/src/test/java/org/apache/tamaya/samples/annotations/ConfiguredClass.java
index 1480e9a..41654ed 100644
--- a/core/src/test/java/org/apache/tamaya/samples/annotations/ConfiguredClass.java
+++ b/core/src/test/java/org/apache/tamaya/samples/annotations/ConfiguredClass.java
@@ -18,10 +18,10 @@
  */
 package org.apache.tamaya.samples.annotations;
 
-import org.apache.tamaya.annot.ConfigChangeListener;
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.DefaultValue;
-import org.apache.tamaya.annot.WithConfig;
+import org.apache.tamaya.mapping.ConfigChangeListener;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.DefaultValue;
+import org.apache.tamaya.mapping.WithConfig;
 
 import java.beans.PropertyChangeEvent;
 import java.math.BigDecimal;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cd87f593/modules/cdi/src/test/java/main/java/metamodel/ext/cdi/ConfiguredClass.java
----------------------------------------------------------------------
diff --git a/modules/cdi/src/test/java/main/java/metamodel/ext/cdi/ConfiguredClass.java b/modules/cdi/src/test/java/main/java/metamodel/ext/cdi/ConfiguredClass.java
index 04ae429..f67dce3 100644
--- a/modules/cdi/src/test/java/main/java/metamodel/ext/cdi/ConfiguredClass.java
+++ b/modules/cdi/src/test/java/main/java/metamodel/ext/cdi/ConfiguredClass.java
@@ -1,9 +1,9 @@
 package main.java.metamodel.ext.cdi;
 
-import org.apache.tamaya.annot.ConfigChangeListener;
-import org.apache.tamaya.annot.ConfiguredProperty;
-import org.apache.tamaya.annot.DefaultValue;
-import org.apache.tamaya.annot.WithConfig;
+import org.apache.tamaya.mapping.ConfigChangeListener;
+import org.apache.tamaya.mapping.ConfiguredProperty;
+import org.apache.tamaya.mapping.DefaultValue;
+import org.apache.tamaya.mapping.WithConfig;
 
 import javax.inject.Singleton;
 import java.beans.PropertyChangeEvent;


Mime
View raw message