Return-Path: X-Original-To: apmail-tamaya-commits-archive@minotaur.apache.org Delivered-To: apmail-tamaya-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6969818C4D for ; Mon, 12 Oct 2015 06:03:08 +0000 (UTC) Received: (qmail 67910 invoked by uid 500); 12 Oct 2015 06:03:05 -0000 Delivered-To: apmail-tamaya-commits-archive@tamaya.apache.org Received: (qmail 67873 invoked by uid 500); 12 Oct 2015 06:03:05 -0000 Mailing-List: contact commits-help@tamaya.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tamaya.incubator.apache.org Delivered-To: mailing list commits@tamaya.incubator.apache.org Received: (qmail 67762 invoked by uid 99); 12 Oct 2015 06:03:05 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2015 06:03:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BC2FB180A87 for ; Mon, 12 Oct 2015 06:03:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xxckhh2FlFOh for ; Mon, 12 Oct 2015 06:03:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 7396D439EE for ; Mon, 12 Oct 2015 06:02:58 +0000 (UTC) Received: (qmail 67498 invoked by uid 99); 12 Oct 2015 06:02:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2015 06:02:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3DE2ADFCBF; Mon, 12 Oct 2015 06:02:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anatole@apache.org To: commits@tamaya.incubator.apache.org Date: Mon, 12 Oct 2015 06:02:58 -0000 Message-Id: In-Reply-To: <6bdc413d24654b58bb02539a9586e09f@git.apache.org> References: <6bdc413d24654b58bb02539a9586e09f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/13] incubator-tamaya git commit: Added lots of docs, some of them still WIP. Added lots of docs, some of them still WIP. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/2df75a8f Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/2df75a8f Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/2df75a8f Branch: refs/heads/master Commit: 2df75a8fa800ce380044c422e4b5114ae5b335f3 Parents: 1520152 Author: anatole Authored: Wed Oct 7 23:03:17 2015 +0200 Committer: anatole Committed: Mon Oct 12 08:01:47 2015 +0200 ---------------------------------------------------------------------- docs/src/main/asciidoc/mod_cdi-ee.adoc | 162 +++++++++++++++++++ docs/src/main/asciidoc/mod_cdi-se.adoc | 162 +++++++++++++++++++ docs/src/main/asciidoc/mod_cdi.adoc | 159 ------------------ docs/src/main/asciidoc/mod_environment.adoc | 75 +++++++++ .../src/main/asciidoc/mod_metamodel-staged.adoc | 94 +++++++++++ docs/src/main/asciidoc/mod_spi-support.adoc | 75 +++++++++ docs/src/main/asciidoc/modules.adoc | 5 +- 7 files changed, 572 insertions(+), 160 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_cdi-ee.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_cdi-ee.adoc b/docs/src/main/asciidoc/mod_cdi-ee.adoc new file mode 100644 index 0000000..6f2f7ad --- /dev/null +++ b/docs/src/main/asciidoc/mod_cdi-ee.adoc @@ -0,0 +1,162 @@ += Apache Tamaya -- Extension: Classloader Isolation Support + +:name: Tamaya +:rootpackage: org.apache.tamaya.integration.cdi +:title: Apache Tamaya Extension: CDI Integration +:revdate: September 2015 +:authorinitials: ATR +:author: Anatole Tresch +:email: +:source-highlighter: coderay +:website: http://tamaya.incubator.apache.org/ +:toc: +:toc-placement: manual +:encoding: UTF-8 +:numbered: +// 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. +''' + +<<< + +toc::[] + +<<< +:numbered!: +<<< +[[Remote]] +== Tamaya CDI Integration (Extension Module) +=== Overview + +The Tamaya CDI Integration provides CDI extensions implementing the following functionality: + +* Loading of CDI managed components as configuration extensions such as +PropertySources, PropertySourceProvieders, + PropertyFilters, etc+. +* Enable Configuration Injection similar to Tamaya's Java SE based configuration injection services, but implemented + as a portable, Java EE compliant CDI extension. + + +=== Compatibility + +The module is based on Java 7, so it will not run on Java 7 and beyond. + + +=== Installation + +To benefit from Tamaya CDI integration you only must add the corresponding dependency to your module: + +[source, xml] +----------------------------------------------- + + org.apache.tamaya.ext + tamaya-cdi + {tamayaVersion} + +----------------------------------------------- + +The component will auto-register its components and override the default +ServicceContext+ in use. Additionally it +registers CDI extensions that implement Configuration injection based on Tamaya's +Configuration+ present in the +system/runtime context. + +IMPORTANT: Dont install Tamaya's +cdi-se+ module at the same time. + +=== How it Works + +This module registers as +ServiceContext+ and integrates CDI for component loading as well as configuration injection. +All types injected by this module are injected using _dependent scope_. So with this module you can define/deploy +your +PropertySources+ and other artifacts simply by adding corresponding CDI managed beans: + +[source, java] +-------------------------------------------------------- +@Singleton +public class TestPropertySource implements PropertySource{ + + final Map config = new HashMap<>(); + + public TestPropertySource(){ + config.put("a.b.c.key1", "keys current a.b.c.key1"); + config.put("a.b.c.key2", "keys current a.b.c.key2"); + config.put("{"+getName()+"}source", getClass().getName()); + } + + @Override + public int getOrdinal() { + return 10; + } + + @Override + public String getName() { + return getClass().getName(); + } + + @Override + public String get(String key) { + return config.get(key); + } + + @Override + public Map getProperties() { + return config; + } + + @Override + public boolean isScannable() { + return true; + } +} +-------------------------------------------------------- + +The +ServiceContext+ implementation hereby combines the components registered using the +ServiceLoader+ mechanism +hereby considering classloaser hierarchies. + + +=== Injecting Configuration + +This component also allows to inject configuration using Tamaya's type-safe injection mechanism: + +[source, java] +-------------------------------------------------------- +@RequestScoped +public class ConfiguredClass{ + + @ConfigProperty + private String testProperty; + + @ConfigProperty({"a.b.c.key1","a.b.c.key2","a.b.c.key3"}) + @DefaultValue("The current \\${JAVA_HOME} env property is ${env:JAVA_HOME}.") + String value1; + + @ConfigProperty({"foo","a.b.c.key2"}) + private String value2; + + @ConfigProperty + @DefaultValue("N/A") + private String runtimeVersion; + + @ConfigProperty + @DefaultValue("${sys:java.version}") + private String javaVersion2; + + @ConfigProperty + @DefaultValue("5") + private Integer int1; + + ... + +} +-------------------------------------------------------- + http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_cdi-se.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_cdi-se.adoc b/docs/src/main/asciidoc/mod_cdi-se.adoc new file mode 100644 index 0000000..ed77848 --- /dev/null +++ b/docs/src/main/asciidoc/mod_cdi-se.adoc @@ -0,0 +1,162 @@ += Apache Tamaya -- Extension: Classloader Isolation Support + +:name: Tamaya +:rootpackage: org.apache.tamaya.integration.cdi +:title: Apache Tamaya Extension: CDI Integration of tamaya-injection (SE) +:revdate: September 2015 +:authorinitials: ATR +:author: Anatole Tresch +:email: +:source-highlighter: coderay +:website: http://tamaya.incubator.apache.org/ +:toc: +:toc-placement: manual +:encoding: UTF-8 +:numbered: +// 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. +''' + +<<< + +toc::[] + +<<< +:numbered!: +<<< +[[Remote]] +== Tamaya CDI Integration of tamaya-injection (Extension Module) +=== Overview + +The Tamaya CDI injection Integration provides CDI extensions implementing the following functionality: + +* Loading of CDI managed components as configuration extensions such as +PropertySources, PropertySourceProvieders, + PropertyFilters, etc+. +* Enable Tamaya's Java SE based configuration injection services with CDI. As a consequence injection and config lifecycle is managed + by thos module and not the CDI context. + + +=== Compatibility + +The module is based on Java 7, so it will not run on Java 7 and beyond. + + +=== Installation + +To benefit from Tamaya CDI integration you only must add the corresponding dependency to your module: + +[source, xml] +----------------------------------------------- + + org.apache.tamaya.ext + tamaya-cdi-se + {tamayaVersion} + +----------------------------------------------- + +The component will auto-register its components and override the default +ServicceContext+ in use. Additionally it +registers CDI extensions that implement Configuration injection based on Tamaya's +tamaya-injection+ and ++tamaya-classloader-support+ modules. + +IMPORTANT: Dont install Tamaya's +cdi+ at the same time. + +=== How it Works + +This module registers as +ServiceContext+ and integrates CDI for component loading as well as configuration injection. +All types injected by this module are injected using _dependent scope_. So with this module you can define/deploy +your +PropertySources+ and other artifacts simply by adding corresponding CDI managed beans: + +[source, java] +-------------------------------------------------------- +@Singleton +public class TestPropertySource implements PropertySource{ + + final Map config = new HashMap<>(); + + public TestPropertySource(){ + config.put("a.b.c.key1", "keys current a.b.c.key1"); + config.put("a.b.c.key2", "keys current a.b.c.key2"); + config.put("{"+getName()+"}source", getClass().getName()); + } + + @Override + public int getOrdinal() { + return 10; + } + + @Override + public String getName() { + return getClass().getName(); + } + + @Override + public String get(String key) { + return config.get(key); + } + + @Override + public Map getProperties() { + return config; + } + + @Override + public boolean isScannable() { + return true; + } +} +-------------------------------------------------------- + +The +ServiceContext+ implementation hereby combines the components registered using the +ServiceLoader+ mechanism +hereby considering classloaser hierarchies. + + +=== Injecting Configuration + +This component also allows to inject configuration using Tamaya's type-safe injection mechanism: + +[source, java] +-------------------------------------------------------- +@RequestScoped +public class ConfiguredClass{ + + @ConfigProperty + private String testProperty; + + @ConfigProperty({"a.b.c.key1","a.b.c.key2","a.b.c.key3"}) + @DefaultValue("The current \\${JAVA_HOME} env property is ${env:JAVA_HOME}.") + String value1; + + @ConfigProperty({"foo","a.b.c.key2"}) + private String value2; + + @ConfigProperty + @DefaultValue("N/A") + private String runtimeVersion; + + @ConfigProperty + @DefaultValue("${sys:java.version}") + private String javaVersion2; + + @ConfigProperty + @DefaultValue("5") + private Integer int1; + + ... + +} +-------------------------------------------------------- + http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_cdi.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_cdi.adoc b/docs/src/main/asciidoc/mod_cdi.adoc deleted file mode 100644 index b0c5074..0000000 --- a/docs/src/main/asciidoc/mod_cdi.adoc +++ /dev/null @@ -1,159 +0,0 @@ -= Apache Tamaya -- Extension: Classloader Isolation Support - -:name: Tamaya -:rootpackage: org.apache.tamaya.integration.cdi -:title: Apache Tamaya Extension: CDI Integration -:revdate: September 2015 -:authorinitials: ATR -:author: Anatole Tresch -:email: -:source-highlighter: coderay -:website: http://tamaya.incubator.apache.org/ -:toc: -:toc-placement: manual -:encoding: UTF-8 -:numbered: -// 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. -''' - -<<< - -toc::[] - -<<< -:numbered!: -<<< -[[Remote]] -== Tamaya CDI Integration (Extension Module) -=== Overview - -The Tamaya CDI Integration provides CDI extensions implementing the following functionality: - -* Configuration of classes to be vetoed based on regular expressions of the fully qualified classnames. -* Loading of CDI managed components as configuration extensions such as +PropertySources, PropertySourceProvieders, - PropertyFilters, etc+. - - -=== Compatibility - -The module is based on Java 7, so it will not run on Java 7 and beyond. - - -=== Installation - -To benefit from Tamaya CDI integration you only must add the corresponding dependency to your module: - -[source, xml] ------------------------------------------------ - - org.apache.tamaya.ext - tamaya-cdi - {tamayaVersion} - ------------------------------------------------ - -The component will auto-register its components and override the default +ServicceContext+ in use. Additionally it -registers CDI extensions that implement Configuration injection based on Tamaya's +tamaya-injection+ and -+tamaya-classloader-support+ modules. - -=== How it Works - -This module registers as +ServiceContext+ and integrates CDI for component loading as well as configuration injection. -All types injected by this module are injected using _dependent scope_. So with this module you can define/deploy -your +PropertySources+ and other artifacts simply by adding corresponding CDI managed beans: - -[source, java] --------------------------------------------------------- -@Singleton -public class TestPropertySource implements PropertySource{ - - final Map config = new HashMap<>(); - - public TestPropertySource(){ - config.put("a.b.c.key1", "keys current a.b.c.key1"); - config.put("a.b.c.key2", "keys current a.b.c.key2"); - config.put("{"+getName()+"}source", getClass().getName()); - } - - @Override - public int getOrdinal() { - return 10; - } - - @Override - public String getName() { - return getClass().getName(); - } - - @Override - public String get(String key) { - return config.get(key); - } - - @Override - public Map getProperties() { - return config; - } - - @Override - public boolean isScannable() { - return true; - } -} --------------------------------------------------------- - -The +ServiceContext+ implementation hereby combines the components registered using the +ServiceLoader+ mechanism -hereby considering classloaser hierarchies. - - -=== Injecting Configuration - -This component also allows to inject configuration using Tamaya's type-safe injection mechanism: - -[source, java] --------------------------------------------------------- -@RequestScoped -public class ConfiguredClass{ - - @ConfiguredProperty - private String testProperty; - - @ConfiguredProperty(keys = {"a.b.c.key1","a.b.c.key2","a.b.c.key3"}) - @DefaultValue("The current \\${JAVA_HOME} env property is ${env:JAVA_HOME}.") - String value1; - - @ConfiguredProperty(keys = {"foo","a.b.c.key2"}) - private String value2; - - @ConfiguredProperty - @DefaultValue("N/A") - private String runtimeVersion; - - @ConfiguredProperty - @DefaultValue("${sys:java.version}") - private String javaVersion2; - - @ConfiguredProperty - @DefaultValue("5") - private Integer int1; - - ... - -} --------------------------------------------------------- - http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_environment.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_environment.adoc b/docs/src/main/asciidoc/mod_environment.adoc new file mode 100644 index 0000000..fd0393b --- /dev/null +++ b/docs/src/main/asciidoc/mod_environment.adoc @@ -0,0 +1,75 @@ += Apache Tamaya -- Extension: Classloader Isolation Support + +:name: Tamaya +:rootpackage: org.apache.tamaya.environment +:title: Apache Tamaya Extension: Environment +:revdate: September 2015 +:authorinitials: ATR +:author: Anatole Tresch +:email: +:source-highlighter: coderay +:website: http://tamaya.incubator.apache.org/ +:toc: +:toc-placement: manual +:encoding: UTF-8 +:numbered: +// 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. +''' + +<<< + +toc::[] + +<<< +:numbered!: +<<< +[[Remote]] +== Tamaya Environment Model (Extension Module) +=== Overview + +The Tamaya Environment extension adds a simple PropertySourceProvider that evaluates a List of environment context and +combines them in the given order into an (optional) root context within the system's configuration. + + +=== Compatibility + +The module is based on Java 7, so it will not run on Java 7 and beyond. + + +=== Installation + +To benefit from Tamaya Environment Model you only must add the corresponding dependency to your module: + +[source, xml] +----------------------------------------------- + + org.apache.tamaya.ext + tamaya-envionment + {tamayaVersion} + +----------------------------------------------- + + +=== How it Works + +tbd + +=== Reusable Base Classes + +tbd + http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_metamodel-staged.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_metamodel-staged.adoc b/docs/src/main/asciidoc/mod_metamodel-staged.adoc new file mode 100644 index 0000000..4da9f6a --- /dev/null +++ b/docs/src/main/asciidoc/mod_metamodel-staged.adoc @@ -0,0 +1,94 @@ += Apache Tamaya -- Extension: Staged PropertySources + +:name: Tamaya +:rootpackage: org.apache.tamaya.integration.cdi +:title: Apache Tamaya Extension: Staged PropertySources +:revdate: October 2015 +:authorinitials: ATR +:author: Anatole Tresch +:email: +:source-highlighter: coderay +:website: http://tamaya.incubator.apache.org/ +:toc: +:toc-placement: manual +:encoding: UTF-8 +:numbered: +// 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. +''' + +<<< + +toc::[] + +<<< +:numbered!: +<<< +[[Remote]] +== Tamaya Metamodel: Staged PropertySources (Extension Module) +=== Overview + +The Tamaya Staged PropertySources extension provides a base class and default implementation for loading +multistaged configuration easily from a common configuration location. + + +=== Compatibility + +The module is based on Java 7, so it will not run on Java 7 and beyond. + + +=== Installation + +To benefit from Tamaya CDI integration you only must add the corresponding dependency to your module: + +[source, xml] +----------------------------------------------- + + org.apache.tamaya.ext.metamodels + tamaya-metamodel.staged + {tamayaVersion} + +----------------------------------------------- + +The component will not register any components. The component basically provides the following options: + +* Use it as default configuration extension. Hereby you should define your stages in use by setting the + +env.STAGE+ system property with the stages to be loaded in order of precedence (most significant last), + e.g. +sys-env,DEFAULTS,TEST,DEVELOPMENT. _Additionally_ you must register + +org.apache.tamaya.staged.StagedConfigPropertiesProvider+ as in + +-------------------------------------------------------------- +META-INF +|_service + |_org.apache.tamaya.spi.PropertySourceProvider +-------------------------------------------------------------- + +Tamaya will then load .properties files from +System.getenv(), +classpath:DEFAULTS.properties, classpath:TEST.properties+ and ++classpath:DEVELOPMENT.properties+ + +* For more advanced requirements, such as alternate locations, patterns or formats, you can also extend one of the + provided classes (+org.apache.tamaya.staged.StagedConfigPropertiesProvider+, + ** +BaseStagedPropertySourceProvider+). Extending provides features such as: + + ** Defining a prefix for all entries provided/loaded. + ** Using alternate locations or formats. + ** Defining the ordinals used. + + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/mod_spi-support.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/mod_spi-support.adoc b/docs/src/main/asciidoc/mod_spi-support.adoc new file mode 100644 index 0000000..0f80fba --- /dev/null +++ b/docs/src/main/asciidoc/mod_spi-support.adoc @@ -0,0 +1,75 @@ += Apache Tamaya -- Extension: Classloader Isolation Support + +:name: Tamaya +:rootpackage: org.apache.tamaya.integration.cdi +:title: Apache Tamaya Extension: SPI Implementation Support Classes +:revdate: October 2015 +:authorinitials: ATR +:author: Anatole Tresch +:email: +:source-highlighter: coderay +:website: http://tamaya.incubator.apache.org/ +:toc: +:toc-placement: manual +:encoding: UTF-8 +:numbered: +// 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. +''' + +<<< + +toc::[] + +<<< +:numbered!: +<<< +[[SPISupport]] +== Tamaya SPI Support (Extension Module) +=== Overview + +The Tamaya SPI support module provides a few helpful base classes that can be used to implement some of the often +used SPI parts in Tamaya: + +* +BasePropertySource+ provides an abstract base class for implementation of your own PropertySources. +* +DefaultConfiguration+ provides you with a simple implementation of the +Configuration+ interface based on a + +ConfigurationContext+ provided. This is also very useful for mocking configuration during test execution, but + not only constraint to that use case. + + +=== Compatibility + +The module is based on Java 7, so it will not run on Java 7 and beyond. + + +=== Installation + +To benefit from Tamaya CDI integration you only must add the corresponding dependency to your module: + +[source, xml] +----------------------------------------------- + + org.apache.tamaya.ext + tamaya-spisupport + {tamayaVersion} + +----------------------------------------------- + +The component will not register any components but only providing portable base classes for some common SPI +implementation tasks. It only depends on the API, so it should be safely reusable also with other implementations +of the Tamaya API similarly. + http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2df75a8f/docs/src/main/asciidoc/modules.adoc ---------------------------------------------------------------------- diff --git a/docs/src/main/asciidoc/modules.adoc b/docs/src/main/asciidoc/modules.adoc index 7d9486c..52fcecc 100644 --- a/docs/src/main/asciidoc/modules.adoc +++ b/docs/src/main/asciidoc/modules.adoc @@ -69,7 +69,8 @@ NOTE All extensions, despite the _tamaya-builder_ module, currently run on Java |+org.apache.tamaya.ext:tamaya-server+ |Lets a Tamaya configuration instance provide scoped configuration as a http service. |link:mod_server.html[Documentation] |+org.apache.tamaya.ext:tamaya-optional+ |Lets a Tamaya configuration to be used as an optional project extension only. |link:mod_optional.html[Documentation] |+org.apache.tamaya.ext:tamaya-classloader-support+ |Manages Tamaya configuration and services considering classloading hierarchies. |link:mod_classloader_support.html[Documentation] -|+org.apache.tamaya.ext:tamaya-cdi+ |Tamaya integration module for CDI. |link:mod_cdi.html[Documentation] +|+org.apache.tamaya.ext:tamaya-cdi-se+ |Tamaya integration module for CDI. |link:mod_cdi-se.html[Documentation] +|+org.apache.tamaya.ext:tamaya-spi-support+ |Tamaya support module for SPI implementation. |link:mod_spi-support.html[Documentation] |======= @@ -82,4 +83,6 @@ very carefully and especially give us feedback, so we can improve them before pr |======= |_Artifact_ |_Description_ |_Links_ |+org.apache.tamaya.ext:tamaya-jodatime+ |Provides support for JodaTime. | link:mod_jodatime.html[Documentation] +|+org.apache.tamaya.ext:tamaya-cdi+ |Java EE compliant CDI extension for Tamaya. |link:mod_cdi.html[Documentation] +|+org.apache.tamaya.ext:tamaya-staged+ |Simple configuration extension to add staged config. |link:mod_metamodel-staged.html[Documentation] |=======