Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ JavaConfig does not contain an implementation itself but only provides the speci

The current configuration of an application can be accessed via `ConfigProvider#getConfig()`.

A `Config` consists of the information collected from the registered `javax.config.spi.ConfigSource` s.
A `Config` consists of the information collected from the registered `jakarta.config.spi.ConfigSource` s.
These `ConfigSource` s get sorted according to their _ordinal_.
That way it is possible to overwrite configuration with lower importance from outside.

Expand Down
6 changes: 3 additions & 3 deletions api/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-exportcontents: \
javax.config.*
Bundle-SymbolicName: javax.config
jakarta.config.*
Bundle-SymbolicName: jakarta.config
Bundle-Name: JavaConfig Bundle
Bundle-License: Apache License, Version 2.0
Automatic-Module-Name: javax.config
Automatic-Module-Name: jakarta.config
6 changes: 3 additions & 3 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>javax.config</groupId>
<artifactId>javaconfig-parent</artifactId>
<groupId>jakarta.config</groupId>
<artifactId>jakartaconfig-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

Expand Down Expand Up @@ -84,7 +84,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<Bundle-SymbolicName>javax.config</Bundle-SymbolicName>
<Bundle-SymbolicName>jakarta.config</Bundle-SymbolicName>
<Bundle-Name>JavaConfig bundle</Bundle-Name>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
*
*******************************************************************************/

package javax.config;
package jakarta.config;

import java.util.Optional;

import javax.config.spi.ConfigSource;
import jakarta.config.spi.ConfigSource;

/**
* <p>
Expand Down Expand Up @@ -79,7 +79,7 @@
* {@link #access(String, Class)} for accessing a configured value.
*
* <p>Configured values can also be accessed via injection.
* See {@link javax.config.inject.ConfigProperty} for more information.
* See {@link jakarta.config.inject.ConfigProperty} for more information.
*
* @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
* @author <a href="mailto:gpetracek@apache.org">Gerhard Petracek</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
* Extracted the Config part out of DeltaSpike and proposed as Microprofile-Config 8ff76eb3bcfaf4fd
*
*******************************************************************************/
package javax.config;
package jakarta.config;


import java.time.Duration;
import java.util.Optional;

import javax.config.spi.Converter;
import jakarta.config.spi.Converter;


/**
Expand Down Expand Up @@ -90,7 +90,7 @@ public interface ConfigAccessor<T> {
Optional<T> getOptionalValue();

/**
* Returns the property name key given in {@link javax.config.Config#access(String, Class)}.
* Returns the property name key given in {@link Config#access(String, Class)}.
* @return the original property name
*/
String getPropertyName();
Expand Down Expand Up @@ -162,7 +162,7 @@ interface Builder<T> {
* Note that that the cache will get flushed if a {@code ConfigSource} notifies
* the underlying {@link Config} about a value change.
* This is done by invoking the callback provided to the {@code ConfigSource} via
* {@link javax.config.spi.ConfigSource#setAttributeChangeCallback(java.util.function.Consumer)}.
* {@link jakarta.config.spi.ConfigSource#setAttributeChangeCallback(java.util.function.Consumer)}.
*
* @param duration the maximum amount of the time to cache this value.
* @return This builder
Expand Down Expand Up @@ -202,7 +202,7 @@ interface Builder<T> {
*
* Integer timeout = config.access("some.server.url", Integer.class)
* .addLookupSuffix(tenant)
* .addLookupSuffix(config.access("javax.config.projectStage").build())
* .addLookupSuffix(config.access("jakarta.config.projectStage").build())
* .build()
* .getValue();
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
*
*******************************************************************************/

package javax.config;
package jakarta.config;

import javax.config.spi.ConfigProviderResolver;
import jakarta.config.spi.ConfigProviderResolver;

/**
* <p>
Expand All @@ -45,13 +45,13 @@
* {@link Thread#getContextClassLoader()}).
*
* <p>
* A 'Configuration' consists of the information collected from the registered {@link javax.config.spi.ConfigSource ConfigSources}.
* These {@link javax.config.spi.ConfigSource ConfigSources} get sorted according to
* their <em>ordinal</em> defined via {@link javax.config.spi.ConfigSource#getOrdinal()}.
* A 'Configuration' consists of the information collected from the registered {@link jakarta.config.spi.ConfigSource ConfigSources}.
* These {@link jakarta.config.spi.ConfigSource ConfigSources} get sorted according to
* their <em>ordinal</em> defined via {@link jakarta.config.spi.ConfigSource#getOrdinal()}.
* Thus it is possible to overwrite configuration by providing in a ConfigSource with higher importance from outside.
*
* <p>
* It is also possible to register custom {@link javax.config.spi.ConfigSource ConfigSources} to flexibly
* It is also possible to register custom {@link jakarta.config.spi.ConfigSource ConfigSources} to flexibly
* extend the configuration mechanism. An example would be to pick up
* configuration values from a database table.
*
Expand All @@ -77,7 +77,7 @@ private ConfigProvider() {
}

/**
* Provide a {@link Config} based on all {@link javax.config.spi.ConfigSource ConfigSources} of the
* Provide a {@link Config} based on all {@link jakarta.config.spi.ConfigSource ConfigSources} of the
* current Thread Context ClassLoader (TCCL)
* The {@link Config} will be stored for future retrieval.
* <p>
Expand All @@ -90,7 +90,7 @@ public static Config getConfig() {
}

/**
* Provide a {@link Config} based on all {@link javax.config.spi.ConfigSource ConfigSources} of the
* Provide a {@link Config} based on all {@link jakarta.config.spi.ConfigSource ConfigSources} of the
* specified ClassLoader
*
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
*******************************************************************************/

package javax.config;
package jakarta.config;

/**
* A value holder for ConfigAccessor values which all got resolved in a guaranteed atomic way.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

package javax.config.inject;
package jakarta.config.inject;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
Expand All @@ -32,6 +32,7 @@
import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;


/**
* Binds the injection point with a configured value.
* Can be used to annotate injection points of type {@code TYPE}, {@code Optional<TYPE>} or {@code javax.inject.Provider<TYPE>},
Expand All @@ -45,7 +46,7 @@
*
* The first sample injects the configured value of the {@code my.long.property} property.
* The injected value does not change even if the underline
* property value changes in the {@link javax.config.Config}.
* property value changes in the {@link jakarta.config.Config}.
*
* <p>Injecting a native value is recommended for a mandatory property and its value does not change at runtime or used by a bean with RequestScoped.
* <p>A further recommendation is to use the built in {@code META-INF/javaconfig.properties} file mechanism
Expand Down Expand Up @@ -84,7 +85,7 @@
* <h3>Injecting Dynamic Values</h3>
*
* The next sample injects a Provider for the value of {@code my.long.property} property to resolve the property dynamically.
* Each invocation to {@code Provider#get()} will resolve the latest value from underlying {@link javax.config.Config} again.
* Each invocation to {@code Provider#get()} will resolve the latest value from underlying {@link jakarta.config.Config} again.
* The existence of configured values will get checked during startup.
* Instances of {@code javax.inject.Provider<T>} are guaranteed to be Serializable.
* <pre>
Expand All @@ -93,7 +94,7 @@
* private Provider&lt;Long&gt; longConfigValue;
* </pre>
*
* <p>If {@code ConfigProperty} is used with a type where no {@link javax.config.spi.Converter} exists,
* <p>If {@code ConfigProperty} is used with a type where no {@link jakarta.config.spi.Converter} exists,
* a deployment error will be thrown.
*
* @author Ondrej Mihalyi
Expand All @@ -105,7 +106,7 @@
@Retention(RUNTIME)
@Target({METHOD, FIELD, PARAMETER, TYPE})
public @interface ConfigProperty {
String UNCONFIGURED_VALUE="javax.config.configproperty.unconfigureddvalue";
String UNCONFIGURED_VALUE="jakarta.config.configproperty.unconfigureddvalue";

/**
* The key of the config property used to look up the configuration value.
Expand All @@ -122,7 +123,7 @@
/**
* <p>The default value if the configured property value does not exist.
*
* <p>If the target Type is not String a proper {@link javax.config.spi.Converter} will get applied.
* <p>If the target Type is not String a proper {@link jakarta.config.spi.Converter} will get applied.
* That means that any default value string should follow the formatting rules of the registered Converters.
*
*
Expand All @@ -132,7 +133,7 @@
String defaultValue() default UNCONFIGURED_VALUE;

/**
* @see javax.config.ConfigAccessor.Builder#evaluateVariables(boolean)
* @see jakarta.config.ConfigAccessor.Builder#evaluateVariables(boolean)
* @return whether variable replacement is enabled. Defaults to {@code true}.
*/
@Nonbinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
* <p>The following types can be injected:
* <ul>
*
* <li><code>T</code> where T is a Type where a {@link javax.config.spi.Converter} exists and the property must exist.</li>
* <li><code>T</code> where T is a Type where a {@link jakarta.config.spi.Converter} exists and the property must exist.</li>
* <li><code>
* Optional&lt;T&gt;</code> where T is a Type where a {@link javax.config.spi.Converter} exists where the property may exist.
* Optional&lt;T&gt;</code> where T is a Type where a {@link jakarta.config.spi.Converter} exists where the property may exist.
* </li>
* <li><code>
* Provider&lt;T&gt;</code> where T is a Type where a {@link javax.config.spi.Converter} exists where the property may exist.
* Provider&lt;T&gt;</code> where T is a Type where a {@link jakarta.config.spi.Converter} exists where the property may exist.
* </li>
* </ul>
*
Expand All @@ -45,5 +45,5 @@
*
*/
@org.osgi.annotation.versioning.Version("1.0")
package javax.config.inject;
package jakarta.config.inject;

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* <h2>How it works</h2>
*
* <p>A 'Configuration' consists of the information collected from the registered
* {@link javax.config.spi.ConfigSource ConfigSources}.
* {@link jakarta.config.spi.ConfigSource ConfigSources}.
* These {@code ConfigSources} get sorted according to their <i>ordinal</i>.
* That way it is possible to overwrite configuration with lower importance from outside.
*
Expand All @@ -50,13 +50,13 @@
* <p>That means that one can put the default configuration in a {@code META-INF/javaconfig.properties} anywhere on the classpath.
* and the Operations team can later simply e.g set a system property to change this default configuration.
*
* <p>It is of course also possible to register own {@link javax.config.spi.ConfigSource ConfigSources}.
* <p>It is of course also possible to register own {@link jakarta.config.spi.ConfigSource ConfigSources}.
* A {@code ConfigSource} could e.g. read configuration values from a database table, a remote server, etc
*
* <h2>Accessing and Using the Configuration</h2>
*
* <p> The configuration of an application is represented by an instance of {@link javax.config.Config}.
* The {@link javax.config.Config} can be accessed via the {@link javax.config.ConfigProvider}.
* <p> The configuration of an application is represented by an instance of {@link jakarta.config.Config}.
* The {@link jakarta.config.Config} can be accessed via the {@link jakarta.config.ConfigProvider}.
*
* <pre>
* Config config = ConfigProvider#getConfig();
Expand All @@ -75,5 +75,5 @@
*
*/
@org.osgi.annotation.versioning.Version("1.0")
package javax.config;
package jakarta.config;

Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
* API improvements + JavaDoc f53258b8eca1253fee52
*
*******************************************************************************/
package javax.config.spi;
package jakarta.config.spi;

import javax.config.Config;
import jakarta.config.Config;

/**
* Builder for manually creating an instance of a {@code Config}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
* limitations under the License.
*******************************************************************************/

package javax.config.spi;
package jakarta.config.spi;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ServiceLoader;

import javax.config.Config;
import jakarta.config.Config;

/**
* This class is not intended to be used by end-users but for
Expand All @@ -44,13 +44,13 @@ protected ConfigProviderResolver() {
private static volatile ConfigProviderResolver instance = null;

/**
* @see javax.config.ConfigProvider#getConfig()
* @see jakarta.config.ConfigProvider#getConfig()
* @return config the config object for the Thread Context Classloader
*/
public abstract Config getConfig();

/**
* @see javax.config.ConfigProvider#getConfig(ClassLoader)
* @see jakarta.config.ConfigProvider#getConfig(ClassLoader)
* @param loader the classloader
* @return config the config object for the specified classloader
*/
Expand Down Expand Up @@ -96,7 +96,7 @@ protected ConfigProviderResolver() {

/**
* Creates a ConfigProviderResolver object
* Only used internally from within {@link javax.config.ConfigProvider}
* Only used internally from within {@link jakarta.config.ConfigProvider}
* @return ConfigProviderResolver an instance of ConfigProviderResolver
*/
public static ConfigProviderResolver instance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Methods renamed, JavaDoc and cleanup
*
*******************************************************************************/
package javax.config.spi;
package jakarta.config.spi;

import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -63,18 +63,18 @@
* <p>Custom ConfigSource will get picked up via the {@link java.util.ServiceLoader} mechanism and and can be registered by
* providing a file
* <pre>
* META-INF/services/javax.config.spi.ConfigSource
* META-INF/services/ConfigSource
* </pre>
* which contains the fully qualified {@code ConfigSource} implementation class name as content.
*
* <p>Adding a dynamic amount of custom config sources can be done programmatically via
* {@link javax.config.spi.ConfigSourceProvider}.
* {@link ConfigSourceProvider}.
*
* <p>If a ConfigSource implements the {@link AutoCloseable} interface
* then the {@link AutoCloseable#close()} method will be called when
* the underlying {@link javax.config.Config} is being released.
* the underlying {@link jakarta.config.Config} is being released.
*
* <p> If you register the same {@code ConfigSource} instance within multiple {@link javax.config.Config} then non-portable behaviour results.
* <p> If you register the same {@code ConfigSource} instance within multiple {@link jakarta.config.Config} then non-portable behaviour results.
*
* @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
* @author <a href="mailto:gpetracek@apache.org">Gerhard Petracek</a>
Expand Down Expand Up @@ -174,10 +174,10 @@ default boolean isScannable() {
/**
* The callback should get invoked if an attribute change got detected inside the ConfigSource.
*
* @param callback will be set by the {@link javax.config.Config} after this
* @param callback will be set by the {@link jakarta.config.Config} after this
* {@code ConfigSource} got created and before any configured values
* get served.
* @return ChangeSupport informing the {@link javax.config.Config} implementation about support for changes by this source
* @return ChangeSupport informing the {@link jakarta.config.Config} implementation about support for changes by this source
* @see ChangeSupport
*/
default ChangeSupport setAttributeChangeCallback(Consumer<Set<String>> callback) {
Expand All @@ -189,7 +189,7 @@ default ChangeSupport setAttributeChangeCallback(Consumer<Set<String>> callback)
/**
* What kind of change support this config source has.
* <p>
* {@link javax.config.Config} implementations may use this information for internal optimizations.
* {@link jakarta.config.Config} implementations may use this information for internal optimizations.
*/
enum ChangeSupport {
/**
Expand Down
Loading