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 3D55610921 for ; Mon, 2 Mar 2015 21:36:31 +0000 (UTC) Received: (qmail 26937 invoked by uid 500); 2 Mar 2015 21:36:28 -0000 Delivered-To: apmail-tamaya-commits-archive@tamaya.apache.org Received: (qmail 26911 invoked by uid 500); 2 Mar 2015 21:36:28 -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 26901 invoked by uid 99); 2 Mar 2015 21:36:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 21:36:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Mar 2015 21:36:15 +0000 Received: (qmail 23199 invoked by uid 99); 2 Mar 2015 21:35:55 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 21:35:55 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 160B6AC0837 for ; Mon, 2 Mar 2015 21:35:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1663440 [5/16] - in /incubator/tamaya/site/trunk/content: ./ javadoc/ javadoc/api/ javadoc/api/index-files/ javadoc/api/org/ javadoc/api/org/apache/ javadoc/api/org/apache/tamaya/ javadoc/api/org/apache/tamaya/spi/ javadoc/core/ javadoc/co... Date: Mon, 02 Mar 2015 21:35:52 -0000 To: commits@tamaya.incubator.apache.org From: anatole@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150302213555.160B6AC0837@hades.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationContextBuilder.html URL: http://svn.apache.org/viewvc/incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationContextBuilder.html?rev=1663440&view=auto ============================================================================== --- incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationContextBuilder.html (added) +++ incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationContextBuilder.html Mon Mar 2 21:35:50 2015 @@ -0,0 +1,540 @@ + + + + + +ConfigurationContextBuilder + + + + + + + + + + + + +
+
org.apache.tamaya.spi
+

Interface ConfigurationContextBuilder

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        addPropertySources

        +
        ConfigurationContextBuilder addPropertySources(PropertySource... propertySourcesToAdd)
        +
        This method can be used for programmatically adding PropertySources. + It is not needed for normal 'usage' by end users, but only for Extension Developers!
        +
        +
        Parameters:
        +
        propertySourcesToAdd - the PropertySources to add
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        addPropertySources

        +
        ConfigurationContextBuilder addPropertySources(java.util.Collection<PropertySource> propertySourcesToAdd)
        +
        This method can be used for programmatically adding PropertySources. + It is not needed for normal 'usage' by end users, but only for Extension Developers!
        +
        +
        Parameters:
        +
        propertySourcesToAdd - the PropertySources to add
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertySources

        +
        ConfigurationContextBuilder removePropertySources(java.lang.String... propertySourcesNames)
        +
        This method can be used for programmatically adding PropertySources. + It is not needed for normal 'usage' by end users, but only for Extension Developers!
        +
        +
        Parameters:
        +
        propertySourcesNames - the PropertySource names of the sources to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertySources

        +
        ConfigurationContextBuilder removePropertySources(java.util.Collection<java.lang.String> propertySourcesNames)
        +
        This method can be used for programmatically adding PropertySources. + It is not needed for normal 'usage' by end users, but only for Extension Developers!
        +
        +
        Parameters:
        +
        propertySourcesNames - the PropertySource names of the sources to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        addPropertyFilters

        +
        ConfigurationContextBuilder addPropertyFilters(PropertyFilter... filters)
        +
        Adds the given PropertyFilter instances.
        +
        +
        Parameters:
        +
        filters - the filters to add
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        addPropertyFilters

        +
        ConfigurationContextBuilder addPropertyFilters(java.util.Collection<PropertyFilter> filters)
        +
        Adds the given PropertyFilter instances.
        +
        +
        Parameters:
        +
        filters - the filters to add
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertyFilters

        +
        ConfigurationContextBuilder removePropertyFilters(PropertyFilter... filters)
        +
        Removes the given PropertyFilter instances.
        +
        +
        Parameters:
        +
        filters - the filters to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertyFilters

        +
        ConfigurationContextBuilder removePropertyFilters(java.util.Collection<PropertyFilter> filters)
        +
        Removes the given PropertyFilter instances.
        +
        +
        Parameters:
        +
        filters - the filters to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        addPropertyConverter

        +
        <T> ConfigurationContextBuilder addPropertyConverter(TypeLiteral<T> typeToConvert,
        +                                                     PropertyConverter<T> propertyConverter)
        +
        This method can be used for programmatically adding PropertyConverters. + It is not needed for normal 'usage' by end users, but only for Extension Developers!
        +
        +
        Parameters:
        +
        typeToConvert - the type which the converter is for
        +
        propertyConverter - the PropertyConverters to add for this type
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertyConverters

        +
        ConfigurationContextBuilder removePropertyConverters(TypeLiteral<?> typeToConvert,
        +                                                     PropertyConverter<?>... converters)
        +
        Removes the given PropertyConverter instances.
        +
        +
        Parameters:
        +
        typeToConvert - the type which the converter is for
        +
        converters - the converters to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + +
        +
      • +

        removePropertyConverters

        +
        ConfigurationContextBuilder removePropertyConverters(TypeLiteral<?> typeToConvert,
        +                                                     java.util.Collection<PropertyConverter<?>> converters)
        +
        Removes the given PropertyConverter instances.
        +
        +
        Parameters:
        +
        typeToConvert - the type which the converter is for
        +
        converters - the converters to remove
        +
        Returns:
        +
        this builder, for chaining, never null.
        +
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + + + + + + Added: incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationProviderSpi.html URL: http://svn.apache.org/viewvc/incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationProviderSpi.html?rev=1663440&view=auto ============================================================================== --- incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationProviderSpi.html (added) +++ incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/ConfigurationProviderSpi.html Mon Mar 2 21:35:50 2015 @@ -0,0 +1,322 @@ + + + + + +ConfigurationProviderSpi + + + + + + + + + + + + +
+
org.apache.tamaya.spi
+

Interface ConfigurationProviderSpi

+
+
+
+
    +
  • +
    +
    +
    public interface ConfigurationProviderSpi
    +
    SPI that must be implemented to provide the component that manages all Configuration + instances in a system. In SE this may be a true singleton containing exact one Configuration + instance, whereas in Java EE and other more complex environments instances may be returned depending the current + runtime context.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + Added: incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertyFilter.html URL: http://svn.apache.org/viewvc/incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertyFilter.html?rev=1663440&view=auto ============================================================================== --- incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertyFilter.html (added) +++ incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertyFilter.html Mon Mar 2 21:35:50 2015 @@ -0,0 +1,245 @@ + + + + + +PropertyFilter + + + + + + + + + + + + +
+
org.apache.tamaya.spi
+

Interface PropertyFilter

+
+
+
+
    +
  • +
    +
    +
    public interface PropertyFilter
    +

    Interface for filtering the current map of properties during the evaluation of the chain of PropertySources. + Filters can be registered using the ServiceContext. The ordinal + hereby is defined by the corresponding @Priority annotation.

    +

    Filters

    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      java.lang.StringfilterProperty(java.lang.String key, + java.lang.String valueToBeFiltered) +
      Maps the current valueToBeFiltered value to a new value.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        filterProperty

        +
        java.lang.String filterProperty(java.lang.String key,
        +                                java.lang.String valueToBeFiltered)
        +

        Maps the current valueToBeFiltered value to a new value. The resulting value will be used as the result + passed to the user.

        +

        If a filter is currently not available, it should just pass the input map to the method's + output.

        +

        Returning null will remove the entry.

        +

        Implementation specification

        + Implementations of this class must be +
          +
        • reentrant
        • +
        • thread-safe
        • +
        +
        +
        Parameters:
        +
        key - the key accessed, not null.
        +
        valueToBeFiltered - the value to be filtered, not null.
        +
        Returns:
        +
        the filtered value, or null if the value should be removed alltogether.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + Added: incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySource.html URL: http://svn.apache.org/viewvc/incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySource.html?rev=1663440&view=auto ============================================================================== --- incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySource.html (added) +++ incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySource.html Mon Mar 2 21:35:50 2015 @@ -0,0 +1,426 @@ + + + + + +PropertySource + + + + + + + + + + + + +
+
org.apache.tamaya.spi
+

Interface PropertySource

+
+
+
+
    +
  • +
    +
    +
    public interface PropertySource
    +
    This interface models a provider that serves configuration properties. The contained + properties may be read fromMap single or several sources (composite).
    + PropertySources are the building blocks of the final configuration. +

    +

    Implementation Requirements

    +

    Implementations current this interface must be +
      +
    • Thread safe.
    • +
    +

    +

    +

    A PropertySourceProvider will get picked up via the + ServiceLoader mechanism and can be registered via + META-INF/services/org.apache.tamaya.spi.PropertySource +

    +

    + If you like to register multiple PropertySources at the same time + you can use the PropertySourceProvider + interface. +

    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static java.lang.StringTAMAYA_ORDINAL +
      property name to override default tamaya ordinals
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      java.lang.Stringget(java.lang.String key) +
      Access a property.
      +
      java.lang.StringgetName() +
      Get the name of the property source.
      +
      intgetOrdinal() +
      Lookup order: + TODO rethink whole default PropertySources and ordering: + TODO introduce default values or constants for ordinals + + System properties (ordinal 400) + Environment properties (ordinal 300) + JNDI values (ordinal 200) + Properties file values (/META-INF/applicationConfiguration.properties) (ordinal 100) + +

      + Important Hints for custom implementations: + + If a custom implementation should be invoked before the default implementations, use a value > 400 + + + If a custom implementation should be invoked after the default implementations, use a value < 100 + +

      + Reordering of the default order of the config-sources: + Example: If the properties file/s should be used before the other implementations, + you have to configure an ordinal > 400.

      +
      java.util.Map<java.lang.String,java.lang.String>getProperties() +
      Access the current properties as Map.
      +
      booleanisScannable() +
      Determines if this config source could be scanned for its list of properties.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        TAMAYA_ORDINAL

        +
        static final java.lang.String TAMAYA_ORDINAL
        +
        property name to override default tamaya ordinals
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getOrdinal

        +
        int getOrdinal()
        +
        Lookup order: + TODO rethink whole default PropertySources and ordering: + TODO introduce default values or constants for ordinals +
          +
        1. System properties (ordinal 400)
        2. +
        3. Environment properties (ordinal 300)
        4. +
        5. JNDI values (ordinal 200)
        6. +
        7. Properties file values (/META-INF/applicationConfiguration.properties) (ordinal 100)
        8. +
        +

        +

        Important Hints for custom implementations:

        +

        + If a custom implementation should be invoked before the default implementations, use a value > 400 +

        +

        + If a custom implementation should be invoked after the default implementations, use a value < 100 +

        +

        +

        Reordering of the default order of the config-sources:

        +

        Example: If the properties file/s should be used before the other implementations, + you have to configure an ordinal > 400. That means, you have to add e.g. deltaspike_ordinal=401 to + /META-INF/apache-deltaspike.properties . Hint: In case of property files every file is handled as independent + config-source, but all of them have ordinal 400 by default (and can be reordered in a fine-grained manner.

        +
        +
        Returns:
        +
        the 'importance' aka ordinal of the configured values. The higher, the more important. + //X TODO think about making this a default method which returns default priority
        +
        +
      • +
      + + + +
        +
      • +

        getName

        +
        java.lang.String getName()
        +
        Get the name of the property source. The name should be unique for the type of source, whereas the id is used + to ensure unique identity, either locally or remotely.
        +
        +
        Returns:
        +
        the configuration's name, never null.
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        java.lang.String get(java.lang.String key)
        +
        Access a property. + + //X TODO discuss if the key can be null
        +
        +
        Parameters:
        +
        key - the property's key, not null.
        +
        Returns:
        +
        the property's keys.
        +
        +
      • +
      + + + +
        +
      • +

        getProperties

        +
        java.util.Map<java.lang.String,java.lang.String> getProperties()
        +
        Access the current properties as Map. The resulting Map may not return all items accessible, e.g. + when the underlying storage does not support iteration of its entries.
        +
        +
        Returns:
        +
        the a corresponding map, never null. + //X TODO or should we just do getPropertyKeys()? Think about security (key) vs easier merging (full map)?
        +
        +
      • +
      + + + +
        +
      • +

        isScannable

        +
        boolean isScannable()
        +
        Determines if this config source could be scanned for its list of properties. + +

        + PropertySources which are not scannable might not be able to find all the + configured values to provide via getProperties(). This can e.g. happen + if the underlying storage doesn't support listing. +

        +
        +
        Returns:
        +
        true if this PropertySource could be scanned for its list of properties, + false if it should not be scanned.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + Added: incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySourceProvider.html URL: http://svn.apache.org/viewvc/incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySourceProvider.html?rev=1663440&view=auto ============================================================================== --- incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySourceProvider.html (added) +++ incubator/tamaya/site/trunk/content/javadoc/api/org/apache/tamaya/spi/PropertySourceProvider.html Mon Mar 2 21:35:50 2015 @@ -0,0 +1,235 @@ + + + + + +PropertySourceProvider + + + + + + + + + + + + +
+
org.apache.tamaya.spi
+

Interface PropertySourceProvider

+
+
+
+
    +
  • +
    +
    +
    public interface PropertySourceProvider
    +

    Implement this interfaces to provide a PropertySource provider which + is able to register multiple PropertySources. This is e.g. needed if + there are multiple property files of a given config file name.

    + +

    If a PropertySource like JNDI only exists once, then there is no need + to implement it via the PropertySourceProvider but should directly + expose a PropertySource.

    + +

    A PropertySourceProvider will get picked up via the + ServiceLoader mechanism and must get registered via + META-INF/services/org.apache.tamaya.spi.PropertySourceProvider

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getPropertySources

        +
        java.util.Collection<PropertySource> getPropertySources()
        +
        +
        Returns:
        +
        For each e.g. property file, we return a single PropertySource + or an empty list if no PropertySource exists.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + +