You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2016/09/06 17:32:22 UTC
[5/5] incubator-tamaya git commit: Moved all modules in the sandbox
to their own repository.
Moved all modules in the sandbox to their own repository.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/57934fdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/57934fdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/57934fdf
Branch: refs/heads/master
Commit: 57934fdff94f7747a163735928ae4b3abebe01f3
Parents: 165a49b
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Tue Sep 6 19:29:46 2016 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Tue Sep 6 19:29:46 2016 +0200
----------------------------------------------------------------------
sandbox/integration/commons/pom.xml | 75 ----
.../commons/CommonsConfigPropertySource.java | 81 -----
.../commons/IniConfigurationFormat.java | 75 ----
sandbox/integration/pom.xml | 39 --
.../internal/FileProprtyStoreProviderSpi.java | 85 -----
...he.tamaya.store.spi.PropertyStoreProviderSpi | 18 -
.../HazelcastProprtyStoreProviderSpi.java | 87 -----
.../org.apache.tamaya.store.PropertyStore | 19 -
sandbox/jodatime/pom.xml | 113 ------
.../tamaya/jodatime/DateTimeConverter.java | 107 ------
.../tamaya/jodatime/DateTimeZoneConverter.java | 76 ----
.../apache/tamaya/jodatime/PeriodConverter.java | 98 -----
.../org.apache.tamaya.spi.PropertyConverter | 21 --
.../tamaya/jodatime/DateTimeConverterIT.java | 53 ---
.../tamaya/jodatime/DateTimeConverterTest.java | 116 ------
.../jodatime/DateTimeZoneConverterIT.java | 52 ---
.../jodatime/DateTimeZoneConverterTest.java | 104 ------
.../tamaya/jodatime/DurationConverterTest.java | 22 --
.../org/apache/tamaya/jodatime/FullStackIT.java | 87 -----
.../tamaya/jodatime/InstantConverterTest.java | 22 --
.../tamaya/jodatime/IntervalConverterTest.java | 23 --
.../tamaya/jodatime/LocalDateConverterTest.java | 22 --
.../tamaya/jodatime/LocalTimeConverterTest.java | 22 --
.../tamaya/jodatime/PeriodConverterIT.java | 51 ---
.../tamaya/jodatime/PeriodConverterTest.java | 106 ------
.../META-INF/javaconfiguration.properties | 22 --
sandbox/metamodels/pom.xml | 40 ---
sandbox/metamodels/simple/config/README.txt | 20 --
.../metamodels/simple/config/test3.properties | 21 --
sandbox/metamodels/simple/pom.xml | 86 -----
.../ConfigDirPropertySourceProvider.java | 81 -----
.../MetainfConfigPropertySourceProvider.java | 62 ----
...org.apache.tamaya.spi.PropertySourceProvider | 20 --
.../tamaya/metamodel/simple/SimpleTest.java | 26 --
.../resources/META-INF/config/test.properties | 20 --
.../resources/META-INF/config/test2.properties | 20 --
sandbox/metamodels/staged/pom.xml | 114 ------
.../org/apache/tamaya/dsl/DSLFormatManager.java | 115 ------
.../apache/tamaya/dsl/MetaConfiguration.java | 144 --------
.../org/apache/tamaya/dsl/ProfileManager.java | 213 -----------
.../apache/tamaya/dsl/TamayaConfigurator.java | 234 ------------
.../tamaya/dsl/WrappedPropertySource.java | 100 ------
.../DSLLoadingConfigurationProviderSpi.java | 82 -----
.../NamedDSLPropertySourceProvider.java | 53 ---
.../ResourceDSLPropertySourceProvider.java | 82 -----
.../org/apache/tamaya/dsl/package-info.java | 23 --
.../spi/BaseStagedPropertySourceProvider.java | 121 -------
.../staged/spi/DSLPropertySourceProvider.java | 51 ---
.../spi/StagedConfigPropertiesProvider.java | 137 -------
.../apache/tamaya/staged/spi/package-info.java | 23 --
...g.apache.tamaya.spi.ConfigurationProviderSpi | 19 -
....tamaya.staged.spi.DSLPropertySourceProvider | 20 --
.../apache/tamaya/dsl/ProfileManagerTest.java | 78 ----
.../staged/src/test/resources/GLOBAL.properties | 19 -
.../staged/src/test/resources/TEST.properties | 19 -
.../staged/src/test/resources/tamaya-TEST.yaml | 27 --
.../src/test/resources/tamaya-config.yaml | 37 --
sandbox/pom.xml | 46 ---
sandbox/remote/pom.xml | 76 ----
.../tamaya/remote/BaseRemotePropertySource.java | 149 --------
sandbox/sysprops/pom.xml | 89 -----
.../se/ConfiguredSystemProperties.java | 353 -------------------
sandbox/ui/base/pom.xml | 156 --------
.../org/apache/tamaya/ui/ApplicationLayout.java | 72 ----
.../java/org/apache/tamaya/ui/CurrentUser.java | 58 ---
.../main/java/org/apache/tamaya/ui/NavBar.java | 127 -------
.../java/org/apache/tamaya/ui/TamayaUI.java | 77 ----
.../java/org/apache/tamaya/ui/UIConstants.java | 36 --
.../main/java/org/apache/tamaya/ui/User.java | 154 --------
.../java/org/apache/tamaya/ui/VadiinApp.java | 97 -----
.../java/org/apache/tamaya/ui/ViewProvider.java | 73 ----
.../tamaya/ui/components/LazyProvider.java | 81 -----
.../tamaya/ui/components/PageTitleUpdater.java | 47 ---
.../ui/components/VerticalSpacedLayout.java | 32 --
.../org/apache/tamaya/ui/event/EventBus.java | 52 ---
.../org/apache/tamaya/ui/event/LogoutEvent.java | 48 ---
.../apache/tamaya/ui/event/NavigationEvent.java | 53 ---
.../org/apache/tamaya/ui/events/EventView.java | 181 ----------
.../ConfigurationBasedMessageProvider.java | 176 ---------
.../ui/internal/ConfiguredMessageProvider.java | 61 ----
.../ui/internal/ConfiguredUserService.java | 76 ----
.../internal/ResourceBundleMessageProvider.java | 91 -----
.../tamaya/ui/internal/URLPropertySource.java | 78 ----
.../tamaya/ui/services/MessageProvider.java | 43 ---
.../apache/tamaya/ui/services/UserService.java | 30 --
.../org/apache/tamaya/ui/views/ConfigView.java | 229 ------------
.../org/apache/tamaya/ui/views/ErrorView.java | 43 ---
.../org/apache/tamaya/ui/views/HomeView.java | 94 -----
.../org/apache/tamaya/ui/views/SystemView.java | 117 ------
.../views/TamayaGeneralSystemInfoProvider.java | 56 ---
.../apache/tamaya/ui/views/login/LoginBox.java | 112 ------
.../tamaya/ui/views/login/LoginEvent.java | 55 ---
.../apache/tamaya/ui/views/login/LoginView.java | 37 --
.../META-INF/javaconfiguration.properties | 21 --
.../services/org.apache.tamaya.ui.ViewProvider | 24 --
...rg.apache.tamaya.ui.services.MessageProvider | 19 -
.../org.apache.tamaya.ui.services.UserService | 19 -
.../src/main/resources/config/application.yml | 28 --
.../main/resources/ui/lang/tamaya.properties | 28 --
.../src/test/resources/config/application.yml | 36 --
.../org/apache/tamaya/ui/events/EventView.java | 181 ----------
.../services/org.apache.tamaya.ui.ViewProvider | 19 -
sandbox/ui/mutableconfig/pom.xml | 36 --
.../ui/mutableconfig/ConfigEditorWidget.java | 132 -------
.../ui/mutableconfig/ConfigUpdaterView.java | 121 -------
.../tamaya/ui/mutableconfig/ProtocolWidget.java | 90 -----
.../mutableconfig/TransactionControlWidget.java | 229 ------------
.../services/org.apache.tamaya.ui.ViewProvider | 19 -
108 files changed, 8060 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/commons/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/integration/commons/pom.xml b/sandbox/integration/commons/pom.xml
deleted file mode 100644
index 2b5eda0..0000000
--- a/sandbox/integration/commons/pom.xml
+++ /dev/null
@@ -1,75 +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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-integrations</artifactId>
- <version>0.2-incubating-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>tamaya-commons-config</artifactId>
- <name>Apache Tamaya Commons Integration - Apache Commons</name>
- <packaging>bundle</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-formats</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <version>1.10</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Import-Package>
- org.apache.tamaya,
- org.apache.tamaya.spi,
- org.apache.tamaya.format,
- org.apache.commons,
- javax.annotation,
- *
- </Import-Package>
- <Export-Package>
- org.apache.tamaya.integration.commons
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/CommonsConfigPropertySource.java
----------------------------------------------------------------------
diff --git a/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/CommonsConfigPropertySource.java b/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/CommonsConfigPropertySource.java
deleted file mode 100644
index b2f2e82..0000000
--- a/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/CommonsConfigPropertySource.java
+++ /dev/null
@@ -1,81 +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.integration.commons;
-
-//X TODO Move out into separate commons-config integration module...
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.tamaya.spi.PropertySource;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * PropertySource that wraps {@link org.apache.commons.configuration.Configuration}.
- */
-public class CommonsConfigPropertySource implements PropertySource {
-
- private Configuration commonsConfig;
- private int ordinal;
- private String name;
-
- public CommonsConfigPropertySource(int ordinal, String name, Configuration commonsConfig) {
- this.commonsConfig = Objects.requireNonNull(commonsConfig);
- this.ordinal = ordinal;
- this.name = Objects.requireNonNull(name);
- }
-
- public CommonsConfigPropertySource(String name, Configuration commonsConfig) {
- commonsConfig = Objects.requireNonNull(commonsConfig);
- this.name = Objects.requireNonNull(name);
- try {
- this.ordinal = commonsConfig.getInt(PropertySource.TAMAYA_ORDINAL);
- } catch (Exception e) {
- this.ordinal = 0;
- }
- }
-
- @Override
- public int getOrdinal() {
- return ordinal;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String get(String key) {
- return commonsConfig.getString(key);
- }
-
- @Override
- public Map<String, String> getProperties() {
- Map<String, String> config = new HashMap<>();
- Iterator<String> keyIter = commonsConfig.getKeys();
- while (keyIter.hasNext()) {
- String key = keyIter.next();
- config.put(key, commonsConfig.getString(key));
- }
- return config;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/IniConfigurationFormat.java
----------------------------------------------------------------------
diff --git a/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/IniConfigurationFormat.java b/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/IniConfigurationFormat.java
deleted file mode 100644
index 0e21f4f..0000000
--- a/sandbox/integration/commons/src/main/java/org/apache/tamaya/integration/commons/IniConfigurationFormat.java
+++ /dev/null
@@ -1,75 +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.integration.commons;
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.HierarchicalINIConfiguration;
-import org.apache.commons.configuration.SubnodeConfiguration;
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.format.ConfigurationData;
-import org.apache.tamaya.format.ConfigurationDataBuilder;
-import org.apache.tamaya.format.ConfigurationFormat;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Implements a ini file format based on the APache Commons
- * {@link org.apache.commons.configuration.HierarchicalINIConfiguration}.
- */
-public class IniConfigurationFormat implements ConfigurationFormat {
-
- public ConfigurationData readConfiguration(URL url) {
- ConfigurationDataBuilder builder = ConfigurationDataBuilder.of(url.toString(), this);
- try {
- HierarchicalINIConfiguration commonIniConfiguration = new HierarchicalINIConfiguration(url);
- for(String section:commonIniConfiguration.getSections()){
- SubnodeConfiguration sectionConfig = commonIniConfiguration.getSection(section);
- Map<String, String> properties = new HashMap<>();
- Iterator<String> keyIter = sectionConfig.getKeys();
- while(keyIter.hasNext()){
- String key = keyIter.next();
- properties.put(key, sectionConfig.getString(key));
- }
- builder.addProperties(section, properties);
- }
- } catch (ConfigurationException e) {
- throw new ConfigException("Failed to parse ini-file format from " + url, e);
- }
- return builder.build();
- }
-
- @Override
- public String getName() {
- throw new RuntimeException("Not implemented yet!");
- }
-
- @Override
- public boolean accepts(URL url) {
- throw new RuntimeException("Not implemented yet!");
- }
-
- @Override
- public ConfigurationData readConfiguration(String resource, InputStream inputStream) {
- throw new RuntimeException("Not implemented yet!");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/integration/pom.xml b/sandbox/integration/pom.xml
deleted file mode 100644
index e0d54d6..0000000
--- a/sandbox/integration/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <parent>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-extensions</artifactId>
- <version>0.3-incubating-SNAPSHOT</version>
- </parent>
-
- <packaging>pom</packaging>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>tamaya-integration-sandbox</artifactId>
-
- <modules>
- <module>store</module>
- <module>commons</module>
- </modules>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/store-file/src/main/java/org/apache/tamaya/store/internal/FileProprtyStoreProviderSpi.java
----------------------------------------------------------------------
diff --git a/sandbox/integration/store-file/src/main/java/org/apache/tamaya/store/internal/FileProprtyStoreProviderSpi.java b/sandbox/integration/store-file/src/main/java/org/apache/tamaya/store/internal/FileProprtyStoreProviderSpi.java
deleted file mode 100644
index 3ea768a..0000000
--- a/sandbox/integration/store-file/src/main/java/org/apache/tamaya/store/internal/FileProprtyStoreProviderSpi.java
+++ /dev/null
@@ -1,85 +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.store.internal;
-
-import com.hazelcast.config.Config;
-import com.hazelcast.config.GroupConfig;
-import com.hazelcast.core.Hazelcast;
-import com.hazelcast.core.HazelcastInstance;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.apache.tamaya.store.PropertyStore;
-import org.apache.tamaya.store.spi.PropertyStoreProviderSpi;
-
-import java.util.Map;
-import java.util.ServiceLoader;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * SPI implmentation for a providing Hazelcast based PropertyStores.
- */
-public class FileProprtyStoreProviderSpi implements PropertyStoreProviderSpi {
- private static final String CONFIG_CLASS_SYS_PROP = "tamaya.store.file.configClass";
- private static final String CONFIG_GROUP_SYS_PROP = "tamaya.store.file.groupName";
-
- private static final Logger LOG = Logger.getLogger(HazelcastProprtyStoreProviderSpi.class.getName());
-
- private File file;
- private Map<String,HazelcastProprtyStore> stores = new ConcurrentHashMap<>();
-
- public HazelcastProprtyStoreProviderSpi() {
- String customConfig = System.getProperty(CONFIG_CLASS_SYS_PROP);
- Config config = null;
- if(customConfig!=null){
- try {
- config = (Config)Class.forName(customConfig).newInstance();
- LOG.info("Successfully created custom store config for HazelCast store: " + customConfig);
- } catch (Exception e) {
- LOG.log(Level.SEVERE, "Failed to instantiate custom store config for HazelCast store: " + customConfig, e);
- }
- }
- if(config==null){
- config = ServiceContextManager.getServiceContext().getService(Config.class);
- }
- if(config==null) {
- config = new Config();
- GroupConfig gc = new GroupConfig();
- String groupName = System.getProperty(CONFIG_GROUP_SYS_PROP, "Tamaya");
- gc.setName(groupName);
- config.setGroupConfig(gc);
- }
- LOG.info("Starting HazelCast storage with config: " + config);
- store = Hazelcast.getOrCreateHazelcastInstance(config);
- }
-
- @Override
- public PropertyStore getPropertyStore(String storeId) {
- HazelcastProprtyStore propertyStore = stores.get(storeId);
- if(propertyStore==null){
- LOG.info("Creating new distributed configuration map in HazelCast store for " + storeId + "...");
- propertyStore = new HazelcastProprtyStore(store, storeId);
- this.stores.put(storeId, propertyStore);
- }
- return propertyStore;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/store-file/src/main/resources/META-INF/services/org.apache.tamaya.store.spi.PropertyStoreProviderSpi
----------------------------------------------------------------------
diff --git a/sandbox/integration/store-file/src/main/resources/META-INF/services/org.apache.tamaya.store.spi.PropertyStoreProviderSpi b/sandbox/integration/store-file/src/main/resources/META-INF/services/org.apache.tamaya.store.spi.PropertyStoreProviderSpi
deleted file mode 100644
index f3199f2..0000000
--- a/sandbox/integration/store-file/src/main/resources/META-INF/services/org.apache.tamaya.store.spi.PropertyStoreProviderSpi
+++ /dev/null
@@ -1,18 +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.
-#
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/store-hazelcast/src/main/java/org/apache/tamaya/store/internal/HazelcastProprtyStoreProviderSpi.java
----------------------------------------------------------------------
diff --git a/sandbox/integration/store-hazelcast/src/main/java/org/apache/tamaya/store/internal/HazelcastProprtyStoreProviderSpi.java b/sandbox/integration/store-hazelcast/src/main/java/org/apache/tamaya/store/internal/HazelcastProprtyStoreProviderSpi.java
deleted file mode 100644
index db567ac..0000000
--- a/sandbox/integration/store-hazelcast/src/main/java/org/apache/tamaya/store/internal/HazelcastProprtyStoreProviderSpi.java
+++ /dev/null
@@ -1,87 +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.store.internal;
-
-import com.hazelcast.config.Config;
-import com.hazelcast.config.GroupConfig;
-import com.hazelcast.core.Hazelcast;
-import com.hazelcast.core.HazelcastInstance;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.apache.tamaya.store.PropertyStore;
-import org.apache.tamaya.store.spi.PropertyStoreProviderSpi;
-
-import java.util.Map;
-import java.util.ServiceLoader;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * SPI implmentation for a providing Hazelcast based PropertyStores.
- */
-public class HazelcastProprtyStoreProviderSpi implements PropertyStoreProviderSpi {
- private static final String CONFIG_CLASS_SYS_PROP = "tamaya.store.hazelcast.configClass";
- private static final String CONFIG_GROUP_SYS_PROP = "tamaya.store.hazelcast.groupName";
-
-
-
- private static final Logger LOG = Logger.getLogger(HazelcastProprtyStoreProviderSpi.class.getName());
-
- private HazelcastInstance store;
- private Map<String,HazelcastProprtyStore> stores = new ConcurrentHashMap<>();
-
- public HazelcastProprtyStoreProviderSpi() {
- String customConfig = System.getProperty(CONFIG_CLASS_SYS_PROP);
- Config config = null;
- if(customConfig!=null){
- try {
- config = (Config)Class.forName(customConfig).newInstance();
- LOG.info("Successfully created custom store config for HazelCast store: " + customConfig);
- } catch (Exception e) {
- LOG.log(Level.SEVERE, "Failed to instantiate custom store config for HazelCast store: " + customConfig, e);
- }
- }
- if(config==null){
- config = ServiceContextManager.getServiceContext().getService(Config.class);
- }
- if(config==null) {
- config = new Config();
- GroupConfig gc = new GroupConfig();
- String groupName = System.getProperty(CONFIG_GROUP_SYS_PROP, "Tamaya");
- gc.setName(groupName);
- config.setGroupConfig(gc);
- }
- LOG.info("Starting HazelCast storage with config: " + config);
- store = Hazelcast.getOrCreateHazelcastInstance(config);
- }
-
- @Override
- public PropertyStore getPropertyStore(String storeId) {
- HazelcastProprtyStore propertyStore = stores.get(storeId);
- if(propertyStore==null){
- LOG.info("Creating new distributed configuration map in HazelCast store for " + storeId + "...");
- propertyStore = new HazelcastProprtyStore(store, storeId);
- this.stores.put(storeId, propertyStore);
- }
- return propertyStore;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/integration/store-ignite/src/main/resources/META-INF/services/org.apache.tamaya.store.PropertyStore
----------------------------------------------------------------------
diff --git a/sandbox/integration/store-ignite/src/main/resources/META-INF/services/org.apache.tamaya.store.PropertyStore b/sandbox/integration/store-ignite/src/main/resources/META-INF/services/org.apache.tamaya.store.PropertyStore
deleted file mode 100644
index 0833eac..0000000
--- a/sandbox/integration/store-ignite/src/main/resources/META-INF/services/org.apache.tamaya.store.PropertyStore
+++ /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.store.internal.IgniteProprtyStore
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/pom.xml b/sandbox/jodatime/pom.xml
deleted file mode 100644
index 0280212..0000000
--- a/sandbox/jodatime/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-sandbox</artifactId>
- <version>0.3-incubating-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>tamaya-jodatime</artifactId>
- <name>Apache Tamaya Modules - Joda-Time Support</name>
- <packaging>bundle</packaging>
-
- <inceptionYear>2015</inceptionYear>
-
- <description>
- This modules provides a set of property converters to support
- JodaTime in conjunction with Apache Tamaya.
- </description>
-
- <properties>
- <jodatime.version>2.3</jodatime.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-core</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <scope>test</scope>
- </dependency>
-
-
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>${jodatime.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Import-Package>
- org.apache.tamaya,
- org.apache.tamaya.spi,
- org.jodatime,
- javax.annotation,
- *
- </Import-Package>
- <Export-Package>
- org.apache.tamaya.jodatime
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeConverter.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeConverter.java b/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeConverter.java
deleted file mode 100644
index 864eb32..0000000
--- a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeConverter.java
+++ /dev/null
@@ -1,107 +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.jodatime;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.DateTimeFormatterBuilder;
-import org.joda.time.format.DateTimeParser;
-
-import java.util.Objects;
-
-/**
- * Converter, converting from {@code String} to Joda-Time's
- * {@code DateTime}.
- *
- * The converter supports the following formats for the provided
- * time information:
- *
- * <ul>
- * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSZ}</li>
- * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSz}</li>
- * <li>{@code yyyy-MM-dd'T'HH:mm:ssZ}</li>
- * <li>{@code yyyy-MM-dd'T'HH:mm:ssz}</li>
- * <li>{@code yyyy-MM-dd'T'HH:mmZ}</li>
- * <li>{@code yyyy-MM-dd'T'HH:mmz}</li>
- * <li>{@code yyyy-MM-dd'T'HHZ}</li>
- * <li>{@code yyyy-MM-dd'T'HHz}</li>
- * </ul>
- */
-public class DateTimeConverter implements PropertyConverter<DateTime> {
- static final String PARSER_FORMATS[] = {
- "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
- "yyyy-MM-dd'T'HH:mm:ss.SSSz",
- "yyyy-MM-dd'T'HH:mm:ss.SSS z",
- "yyyy-MM-dd'T'HH:mm:ssZ",
- "yyyy-MM-dd'T'HH:mm:ssz",
- "yyyy-MM-dd'T'HH:mm:ss z",
- "yyyy-MM-dd'T'HH:mmZ",
- "yyyy-MM-dd'T'HH:mmz",
- "yyyy-MM-dd'T'HH:mm z",
- "yyyy-MM-dd'T'HHZ",
- "yyyy-MM-dd'T'HHz",
- "yyyy-MM-dd'T'HH z",
- };
-
-
- // The DateTimeFormatter returned by ISODateTimeFormat are thread safe
- // according to the JavaDoc of JodaTime
- final static DateTimeParser FORMATS[] = {
- DateTimeFormat.forPattern(PARSER_FORMATS[0]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[1]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[2]).getParser(),
-
- DateTimeFormat.forPattern(PARSER_FORMATS[3]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[4]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[5]).getParser(),
-
- DateTimeFormat.forPattern(PARSER_FORMATS[6]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[7]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[8]).getParser(),
-
- DateTimeFormat.forPattern(PARSER_FORMATS[9]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[10]).getParser(),
- DateTimeFormat.forPattern(PARSER_FORMATS[11]).getParser(),
- };
-
- protected static final DateTimeFormatter formatter;
-
- static {
- formatter = new DateTimeFormatterBuilder().append(null, FORMATS).toFormatter();
- }
-
- @Override
- public DateTime convert(String value, ConversionContext context) {
- context.addSupportedFormats(DateTimeConverter.class, PARSER_FORMATS);
-
- String trimmed = Objects.requireNonNull(value).trim();
- DateTime result = null;
-
- try {
- result = formatter.parseDateTime(trimmed);
- } catch (RuntimeException e) {
- // Ok, go on and try the next parser
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeZoneConverter.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeZoneConverter.java b/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeZoneConverter.java
deleted file mode 100644
index 198a345..0000000
--- a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/DateTimeZoneConverter.java
+++ /dev/null
@@ -1,76 +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.jodatime;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-import org.joda.time.DateTimeZone;
-
-import java.util.regex.Pattern;
-
-import static java.util.Objects.requireNonNull;
-
-/**
- * Converter, converting from {@code String} to Joda-Time's
- * {@code DateTimeZone}.
- *
- * This converter supports the conversion from a numerich time zone
- * information in the format {@code [+-]hh:mm} as well as from
- * all time zone ids supported by Joda Time.
- *
- * @see DateTimeZone
- * @see DateTimeZone#getAvailableIDs()
- */
-public class DateTimeZoneConverter implements PropertyConverter<DateTimeZone> {
- private static final String PATTERN_REGEX = "(\\+|-)?\\d+";
- private static final Pattern IS_INTEGER_VALUE = Pattern.compile(PATTERN_REGEX);
-
- @Override
- public DateTimeZone convert(String value, ConversionContext context) {
- String trimmed = requireNonNull(value).trim();
- addSupportedFormats(context);
-
- DateTimeZone result = null;
-
- try {
- if (isSingleIntegerValue(trimmed)) {
- int offset = Integer.parseInt(trimmed);
- result = DateTimeZone.forOffsetHours(offset);
- } else { // Let us assume a string id
- result = DateTimeZone.forID(trimmed);
- }
-
- } catch (RuntimeException e) {
- result = null; // Give the next converter a change. Read the JavaDoc of convert
- }
-
- return result;
- }
-
- private void addSupportedFormats(ConversionContext context) {
- context.addSupportedFormats(DateTimeZoneConverter.class, "Time zone in the form [+-]hh:mm via the regex " + PATTERN_REGEX);
- context.addSupportedFormats(DateTimeZoneConverter.class, "All time zone ids supported by Joda Time");
- }
-
- private boolean isSingleIntegerValue(String value) {
- boolean match = IS_INTEGER_VALUE.matcher(value).matches();
-
- return match;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/PeriodConverter.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/PeriodConverter.java b/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/PeriodConverter.java
deleted file mode 100644
index a350d58..0000000
--- a/sandbox/jodatime/src/main/java/org/apache/tamaya/jodatime/PeriodConverter.java
+++ /dev/null
@@ -1,98 +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.jodatime;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-import org.joda.time.MutablePeriod;
-import org.joda.time.Period;
-import org.joda.time.format.ISOPeriodFormat;
-import org.joda.time.format.PeriodParser;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.regex.Pattern;
-
-/**
- * <p>A {@link PropertyConverter} for converting a string representation of a
- * given period into a {@link org.joda.time.Period} instance.</p>
- *
- * <p>This converter supports the following string representations of a
- * period:</p>
- *
- * <ol>
- * <li>Alternative format ({@code Pyyyy-mm-ddThh:mm:ss})</li>
- * <li>ISO format ({@code PyYmMwWdDThHmMsS})</li>
- * </ol>
- */
-public class PeriodConverter implements PropertyConverter<org.joda.time.Period> {
-
- private final static PeriodParser ISO_FORMAT = ISOPeriodFormat.standard()
- .getParser();
-
- private final static PeriodParser ALTERNATIVE_FORMAT = ISOPeriodFormat.alternateExtended()
- .getParser();
-
- private final static String ISO_REGEX = "^P\\d+Y(?:\\d+M)?(?:\\d+W)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+S)?)?";
- private final static String ALTERNATIVE_REGEX = "^P\\d+(?:-\\d+(?:-\\d+(?:T(?:\\d+:(?:\\d+:(?:\\d+)?+)?+)?+)?+)?+)?+$";
-
- private final static Pattern ISO_PATTERN = Pattern.compile(ISO_REGEX);
-
- private final static Pattern ALTERNATIVE_PATTERN = Pattern.compile(ALTERNATIVE_REGEX);
-
- @Override
- public Period convert(String value, ConversionContext context) {
- String trimmed = Objects.requireNonNull(value).trim();
-
- addSupportedFormats(context);
-
- MutablePeriod result = null;
- PeriodParser format = null;
-
- if (isISOFormat(trimmed)) {
- format = ISO_FORMAT;
- } else if (isAlternativeFormat(trimmed)) {
- format = ALTERNATIVE_FORMAT;
- }
-
- if (format != null) {
- result = new MutablePeriod();
- int parseResult = format.parseInto(result, trimmed, 0, Locale.ENGLISH);
-
- if (parseResult < 0) {
- result = null;
- }
- }
-
- return result != null ? result.toPeriod() : null;
- }
-
- private void addSupportedFormats(ConversionContext context) {
- context.addSupportedFormats(PeriodConverter.class, "PyYmMwWdDThHmMsS");
- context.addSupportedFormats(PeriodConverter.class, "Pyyyy-mm-ddThh:mm:ss");
- }
-
- private boolean isISOFormat(String value) {
- return ISO_PATTERN.matcher(value).matches();
- }
-
- private boolean isAlternativeFormat(String value) {
- return ALTERNATIVE_PATTERN.matcher(value).matches();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter b/sandbox/jodatime/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
deleted file mode 100644
index f312e9d..0000000
--- a/sandbox/jodatime/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
+++ /dev/null
@@ -1,21 +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.jodatime.DateTimeConverter
-org.apache.tamaya.jodatime.DateTimeZoneConverter
-org.apache.tamaya.jodatime.PeriodConverter
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterIT.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterIT.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterIT.java
deleted file mode 100644
index 85e7b6f..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterIT.java
+++ /dev/null
@@ -1,53 +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.jodatime;
-
-
-import org.apache.tamaya.spi.PropertyConverter;
-import org.apache.tamaya.spi.ServiceContext;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.junit.Test;
-
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.Matchers.notNullValue;
-
-public class DateTimeConverterIT {
- @Test
- public void dateTimeConverterCanBeFoundAsServiceProvider() {
- List<PropertyConverter> formats = ServiceContextManager.getServiceContext()
- .getServices(PropertyConverter.class);
-
-
- PropertyConverter<?> converter = null;
-
- for (PropertyConverter format : formats) {
- if (format instanceof DateTimeConverter) {
- converter = format;
- break;
- }
- }
-
- assertThat("Converter not found via service context.", converter, notNullValue());
- assertThat(converter, instanceOf(DateTimeConverter.class));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterTest.java
deleted file mode 100644
index 483ee83..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeConverterTest.java
+++ /dev/null
@@ -1,116 +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.jodatime;
-
-import org.apache.tamaya.TypeLiteral;
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.hasSize;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.anyVararg;
-import static org.mockito.Mockito.doCallRealMethod;
-
-public class DateTimeConverterTest {
- /*
- * I am aware of the 'Parameterized tests' feature of JUnit but
- * decided not to use it. Oliver B. Fischer, 3th April 2015
- */
- private static DateTimeConverter converter = new DateTimeConverter();
-
- private static DateTimeFormatter FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-
- @Test
- public void canConvertISO8601DateTimeSpecWithTimezoneOffset() {
- Object[][] inputResultPairs = {
- {"2007-08-31T16:47:01.123+00:00", FORMATTER.parseDateTime("2007-08-31T16:47:01.123+00:00")},
- {"2007-08-31T16:47:01.123+00", FORMATTER.parseDateTime("2007-08-31T16:47:01.123+00:00")},
- {"2007-08-31T16:47:01.123 UTC", FORMATTER.parseDateTime("2007-08-31T16:47:01.123+00:00")},
- {"2007-08-31T16:47:01.123UTC", FORMATTER.parseDateTime("2007-08-31T16:47:01.123+00:00")},
-
- {"2007-08-31T16:47:01+00:00", FORMATTER.parseDateTime("2007-08-31T16:47:01.0+00:00")},
- {"2007-08-31T16:47:01UTC", FORMATTER.parseDateTime("2007-08-31T16:47:01.0+00:00")},
- {"2007-08-31T16:47:01 UTC", FORMATTER.parseDateTime("2007-08-31T16:47:01.0+00:00")},
-
- {"2007-08-31T16:47+00:00", FORMATTER.parseDateTime("2007-08-31T16:47:00.0+00:00")},
- {"2007-08-31T16:47UTC", FORMATTER.parseDateTime("2007-08-31T16:47:00.0+00:00")},
- {"2007-08-31T16:47 UTC", FORMATTER.parseDateTime("2007-08-31T16:47:00.0+00:00")},
-
- {"2007-08-31T16+00:00", FORMATTER.parseDateTime("2007-08-31T16:00:00.0+00:00")},
- {"2007-08-31T16UTC", FORMATTER.parseDateTime("2007-08-31T16:00:00.0+00:00")},
- {"2007-08-31T16 UTC", FORMATTER.parseDateTime("2007-08-31T16:00:00.0+00:00")},
-
- // For testing the trimming of the overhanded input values
- {" 2007-08-31T16:47:01.123+00:00", FORMATTER.parseDateTime("2007-08-31T16:47:01.123+00:00")},
- {"2007-08-31T16:47:01+00:00 ", FORMATTER.parseDateTime("2007-08-31T16:47:01.0+00:00")},
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (Object[] pair : inputResultPairs) {
- DateTime date = converter.convert((String)pair[0], context);
-
- assertThat("Converter failed to convert input value " + pair[0], date, notNullValue());
- assertThat(date.isEqual((DateTime)pair[1]), is(true));
- }
- }
-
- @Test
- public void invalidInputValuesResultInReturningNull() {
- String[] inputValues = {
- "00:00", "a", "-", "+ :00", "+00:"
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (String input : inputValues) {
- DateTime date = converter.convert(input, context);
-
- assertThat(date, nullValue());
- }
- }
-
- @Test
- public void allSupportedFormatsAreAddedToTheConversionContext() {
- ConversionContext context = new ConversionContext.Builder(TypeLiteral.of(DateTime.class)).build();
-
- converter.convert("2007-08-31T16+00:00", context);
-
- assertThat(context.getSupportedFormats(), hasSize(DateTimeConverter.PARSER_FORMATS.length));
-
- for (String format : DateTimeConverter.PARSER_FORMATS) {
- String expected = format + " (" + DateTimeConverter.class.getSimpleName() + ")";
- assertThat(context.getSupportedFormats(), hasItem(expected));
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterIT.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterIT.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterIT.java
deleted file mode 100644
index 0963408..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterIT.java
+++ /dev/null
@@ -1,52 +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.jodatime;
-
-
-import org.apache.tamaya.spi.PropertyConverter;
-import org.apache.tamaya.spi.ServiceContext;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.junit.Test;
-
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.Matchers.notNullValue;
-
-public class DateTimeZoneConverterIT {
- @Test
- public void dateTimeZoneConverterCanBeFoundAsServiceProvider() {
- List<PropertyConverter> formats = ServiceContextManager.getServiceContext()
- .getServices(PropertyConverter.class);
-
- PropertyConverter<?> converter = null;
-
- for (PropertyConverter format : formats) {
- if (format instanceof DateTimeZoneConverter) {
- converter = format;
- break;
- }
- }
-
- assertThat("Converter not found via service context.", converter, notNullValue());
- assertThat(converter, instanceOf(DateTimeZoneConverter.class));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterTest.java
deleted file mode 100644
index babbe06..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DateTimeZoneConverterTest.java
+++ /dev/null
@@ -1,104 +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.jodatime;
-
-import org.apache.tamaya.TypeLiteral;
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.ConversionContext.Builder;
-import org.joda.time.DateTimeZone;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.hasSize;
-
-public class DateTimeZoneConverterTest {
- private DateTimeZoneConverter converter = new DateTimeZoneConverter();
-
- @Test
- public void canConvertDateTimeZoneInformation() {
- Object[][] inputResultPairs = {
- // Valid input for DateTimeZone.forOffsetHours
- {"1", DateTimeZone.forOffsetHours(1)},
- {"12", DateTimeZone.forOffsetHours(12)},
- {"13", DateTimeZone.forOffsetHours(13)},
- {"0", DateTimeZone.forOffsetHours(0)},
- {"-1 ", DateTimeZone.forOffsetHours(-1)},
-
- // Valid input for DateTimeZone.forID()
- {"Chile/EasterIsland", DateTimeZone.forID("Chile/EasterIsland")},
- {"UTC", DateTimeZone.forID("UTC")},
- {"+00", DateTimeZone.forID("+00:00")},
- {"+00:00", DateTimeZone.forID("+00:00")},
- {"+00:00 ", DateTimeZone.forID("+00:00")},
- {" +00:00 ", DateTimeZone.forID("+00:00")},
- {"+04:00", DateTimeZone.forID("+04:00")},
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (Object[] pair : inputResultPairs) {
- DateTimeZone zone = converter.convert((String) pair[0], context);
-
- assertThat("Converter failed to convert input value " + pair[0], zone, notNullValue());
- assertThat(zone, equalTo((DateTimeZone)pair[1]));
- }
- }
-
- @Test
- public void invalidInputValuesResultInReturningNull() {
- String[] inputValues = {
- "2007-08-01T12:34:45.000+0:0",
- "2007-08-01T12:34:45.000+00:0",
- "2007-08-01T12:34:45.000+00:0",
- "2007-08-01T+00:00",
- "2007-08-01+00:00"
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (String input : inputValues) {
- DateTimeZone date = converter.convert(input, context);
-
- assertThat(date, nullValue());
- }
- }
-
- @Test
- public void allSupportedFormatsAreAddedToTheConversionContext() {
- String firstFormat = "Time zone in the form [+-]hh:mm via the regex (\\+|-)?\\d+ (DateTimeZoneConverter)";
- String secondFormat = "All time zone ids supported by Joda Time (DateTimeZoneConverter)";
-
- ConversionContext context = new Builder(TypeLiteral.of(DateTimeZone.class)).build();
-
- DateTimeZone result = converter.convert("+01:00", context);
-
- assertThat(result, notNullValue());
- assertThat(context.getSupportedFormats(), hasSize(2));
- assertThat(context.getSupportedFormats(), hasItem(firstFormat));
- assertThat(context.getSupportedFormats(), hasItem(secondFormat));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DurationConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DurationConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DurationConverterTest.java
deleted file mode 100644
index f1141a6..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/DurationConverterTest.java
+++ /dev/null
@@ -1,22 +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.jodatime;
-
-public class DurationConverterTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/FullStackIT.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/FullStackIT.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/FullStackIT.java
deleted file mode 100644
index 60d8cbc..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/FullStackIT.java
+++ /dev/null
@@ -1,87 +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.jodatime;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.TypeLiteral;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.MutablePeriod;
-import org.joda.time.Period;
-import org.joda.time.format.ISOPeriodFormat;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.Locale;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.joda.time.format.ISODateTimeFormat.dateTime;
-
-public class FullStackIT {
-
- @Test
- public void retrieveJodaTimeValuesFromConfiguration() {
-
- Configuration configuration = ConfigurationProvider.getConfiguration();
-
- String dateTimeString = configuration.get("dateTimeValue");
- DateTime dateTimeValue = configuration.get("dateTimeValue", DateTime.class);
-
- assertThat(dateTimeString, notNullValue());
- assertThat(dateTimeString, equalTo("2010-08-08T14:00:15.5+10:00"));
- assertThat(dateTimeValue, notNullValue());
- assertThat(dateTimeValue, equalTo(dateTime().parseDateTime("2010-08-08T14:00:15.5+10:00")));
- }
-
- @Test
- public void retrieveDateTimeZoneValueFromConfiguration() {
- Configuration configuration = ConfigurationProvider.getConfiguration();
-
- String zoneAAsString = configuration.get("dateTimeZoneValueA");
- DateTimeZone zoneA = configuration.get("dateTimeZoneValueA", DateTimeZone.class);
-
- assertThat(zoneAAsString, equalTo("UTC"));
- assertThat(zoneA, equalTo(DateTimeZone.forID("UTC")));
-
- String zoneBAsString = configuration.get("dateTimeZoneValueB");
- DateTimeZone zoneB = configuration.get("dateTimeZoneValueB", DateTimeZone.class);
-
- assertThat(zoneBAsString, equalTo("+01:00"));
- assertThat(zoneB, equalTo(DateTimeZone.forOffsetHours(1)));
- }
-
- @Test
- public void retrievePeriodValueFromConfiguration() {
- Configuration configuration = ConfigurationProvider.getConfiguration();
-
- MutablePeriod referenceValue = new MutablePeriod();
-
- ISOPeriodFormat.standard().getParser().parseInto(referenceValue, "P1Y1M1W1DT1H1M1S", 0,
- Locale.ENGLISH);
-
- String periodAsString = configuration.get("periodValueA");
- Period period = configuration.get("periodValueA", Period.class);
-
- assertThat(periodAsString, equalTo("P1Y1M1W1DT1H1M1S"));
- assertThat(period, equalTo(referenceValue.toPeriod()));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/InstantConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/InstantConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/InstantConverterTest.java
deleted file mode 100644
index 9791a4d..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/InstantConverterTest.java
+++ /dev/null
@@ -1,22 +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.jodatime;
-
-public class InstantConverterTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/IntervalConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/IntervalConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/IntervalConverterTest.java
deleted file mode 100644
index 3f62816..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/IntervalConverterTest.java
+++ /dev/null
@@ -1,23 +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.jodatime;
-
-public class IntervalConverterTest {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalDateConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalDateConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalDateConverterTest.java
deleted file mode 100644
index 608fb9d..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalDateConverterTest.java
+++ /dev/null
@@ -1,22 +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.jodatime;
-
-public class LocalDateConverterTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalTimeConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalTimeConverterTest.java
deleted file mode 100644
index 001ca69..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/LocalTimeConverterTest.java
+++ /dev/null
@@ -1,22 +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.jodatime;
-
-public class LocalTimeConverterTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterIT.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterIT.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterIT.java
deleted file mode 100644
index f110754..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterIT.java
+++ /dev/null
@@ -1,51 +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.jodatime;
-
-
-import org.apache.tamaya.spi.PropertyConverter;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.junit.Test;
-
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.Matchers.notNullValue;
-
-public class PeriodConverterIT {
- @Test
- public void periodConverterCanBeFoundAsServiceProvider() {
- List<PropertyConverter> formats = ServiceContextManager.getServiceContext()
- .getServices(PropertyConverter.class);
-
- PropertyConverter<?> converter = null;
-
- for (PropertyConverter format : formats) {
- if (format instanceof PeriodConverter) {
- converter = format;
- break;
- }
- }
-
- assertThat("Converter not found via service context.", converter, notNullValue());
- assertThat(converter, instanceOf(PeriodConverter.class));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterTest.java
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterTest.java b/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterTest.java
deleted file mode 100644
index 0affb2c..0000000
--- a/sandbox/jodatime/src/test/java/org/apache/tamaya/jodatime/PeriodConverterTest.java
+++ /dev/null
@@ -1,106 +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.jodatime;
-
-import org.apache.tamaya.TypeLiteral;
-import org.apache.tamaya.spi.ConversionContext;
-import org.joda.time.DateTime;
-import org.joda.time.Period;
-import org.joda.time.format.ISOPeriodFormat;
-import org.joda.time.format.PeriodFormatter;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.hasSize;
-
-public class PeriodConverterTest {
- /*
- * I am aware of the 'Parameterized tests' feature of JUnit but
- * decided not to use it. Oliver B. Fischer, 3th April 2015
- */
-
- private static PeriodConverter converter = new PeriodConverter();
-
- private static PeriodFormatter FORMATTER = ISOPeriodFormat.standard();
-
- @Test
- public void canConvertPropertiesInAllSupportedFormats() {
- Object[][] inputResultPairs = {
- // ISO format
- {"P0007Y", FORMATTER.parsePeriod("P7Y0M0W0DT0H0M0S")},
- {"P7Y", FORMATTER.parsePeriod("P7Y0M0W0DT0H0M0S")},
- {"P7891Y", FORMATTER.parsePeriod("P7891Y0M0W0DT0H0M0S")},
- {"P7891Y", FORMATTER.parsePeriod("P7891Y0M0W0DT0H0M0S")},
-
- {"P1Y1M", FORMATTER.parsePeriod("P1Y1M0W0DT0H0M0S")},
- {"P1Y9M", FORMATTER.parsePeriod("P1Y9M0W0DT0H0M0S")},
-
- {"P1Y1D", FORMATTER.parsePeriod("P1Y0M0W1DT0H0M0S")},
- {"P1YT1S", FORMATTER.parsePeriod("P1Y0M0W0DT0H0M1S")},
-
- // Alternative format
- {"P0002-03-00T00:00:05", FORMATTER.parsePeriod("P2Y3M0W0DT0H0M5S")}
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (Object[] pair : inputResultPairs) {
- Period period = converter.convert((String) pair[0], context);
-
- assertThat("Converter failed to convert input value " + pair[0], period, notNullValue());
- assertThat(period, equalTo((Period)pair[1]));
- }
- }
-
- @Test
- public void invalidInputValuesResultInReturningNull() {
- String[] inputValues = {
- "P0002-03T00:00:05",
- "P0002T00:00:05",
- "P0002T00:05"
- };
-
- ConversionContext context = Mockito.mock(ConversionContext.class);
-
- for (String input : inputValues) {
- Period period = converter.convert(input, context);
-
- assertThat(period, nullValue());
- }
- }
-
- @Test
- public void allSupportedFormatsAreAddedToTheConversionContext() {
- String name = PeriodConverter.class.getSimpleName();
-
- ConversionContext context = new ConversionContext.Builder(TypeLiteral.of(Period.class)).build();
-
- converter.convert("P7Y0M0W0DT0H0M0S", context);
-
- assertThat(context.getSupportedFormats(), hasSize(2));
- assertThat(context.getSupportedFormats(), hasItem("PyYmMwWdDThHmMsS (" + name + ")"));
- assertThat(context.getSupportedFormats(), hasItem("Pyyyy-mm-ddThh:mm:ss (" + name + ")"));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/jodatime/src/test/resources/META-INF/javaconfiguration.properties
----------------------------------------------------------------------
diff --git a/sandbox/jodatime/src/test/resources/META-INF/javaconfiguration.properties b/sandbox/jodatime/src/test/resources/META-INF/javaconfiguration.properties
deleted file mode 100644
index e66e448..0000000
--- a/sandbox/jodatime/src/test/resources/META-INF/javaconfiguration.properties
+++ /dev/null
@@ -1,22 +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.
-
-# The space before the actual date is intended!
-dateTimeValue= 2010-08-08T14:00:15.5+10:00
-dateTimeZoneValueA=UTC
-dateTimeZoneValueB=+01:00
-periodValueA=P1Y1M1W1DT1H1M1S
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/metamodels/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/metamodels/pom.xml b/sandbox/metamodels/pom.xml
deleted file mode 100644
index 9304deb..0000000
--- a/sandbox/metamodels/pom.xml
+++ /dev/null
@@ -1,40 +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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-sandbox</artifactId>
- <version>0.3-incubating-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <groupId>org.apache.tamaya.ext.metamodels</groupId>
- <artifactId>tamaya-metamodels</artifactId>
- <name>Apache Tamaya Modules - Metamodels</name>
- <packaging>pom</packaging>
-
- <modules>
- <module>simple</module>
- <module>staged</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/metamodels/simple/config/README.txt
----------------------------------------------------------------------
diff --git a/sandbox/metamodels/simple/config/README.txt b/sandbox/metamodels/simple/config/README.txt
deleted file mode 100644
index 3dd71f5..0000000
--- a/sandbox/metamodels/simple/config/README.txt
+++ /dev/null
@@ -1,20 +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.
-#
-This folder is for testing only. It contains some config files that are to be included by the
-ConfigDirPropertySourceProvider config provider.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/57934fdf/sandbox/metamodels/simple/config/test3.properties
----------------------------------------------------------------------
diff --git a/sandbox/metamodels/simple/config/test3.properties b/sandbox/metamodels/simple/config/test3.properties
deleted file mode 100644
index 9ddef76..0000000
--- a/sandbox/metamodels/simple/config/test3.properties
+++ /dev/null
@@ -1,21 +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.
-#
-tamaya.ordinal=100000
-test3=3-overridden
-test5=value5
\ No newline at end of file