-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4988 from jansupol/3.0_merged2203
Merge remote-tracking branch 'MSTR/master' into 3.0
- Loading branch information
Showing
10 changed files
with
256 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...src/main/java/org/glassfish/jersey/internal/config/ExternalConfigurationProviderImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
|
||
package org.glassfish.jersey.internal.config; | ||
|
||
import org.glassfish.jersey.spi.ExternalConfigurationModel; | ||
import org.glassfish.jersey.spi.ExternalConfigurationProvider; | ||
|
||
import java.util.Map; | ||
|
||
public class ExternalConfigurationProviderImpl implements ExternalConfigurationProvider { | ||
|
||
protected final ExternalConfigurationModel<?> model; | ||
|
||
protected ExternalConfigurationProviderImpl(ExternalConfigurationModel<?> model) { | ||
this.model = model; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getProperties() { | ||
return model.getProperties(); | ||
} | ||
|
||
@Override | ||
public ExternalConfigurationModel getConfiguration() { | ||
return model; | ||
} | ||
|
||
@Override | ||
public ExternalConfigurationModel merge(ExternalConfigurationModel input) { | ||
return input == null ? model : model.mergeProperties(input.getProperties()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...n/java/org/glassfish/jersey/internal/config/JerseySystemPropertiesConfigurationModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
|
||
package org.glassfish.jersey.internal.config; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
class JerseySystemPropertiesConfigurationModel extends SystemPropertiesConfigurationModel { | ||
|
||
static final List<String> PROPERTY_CLASSES = Arrays.asList( | ||
"org.glassfish.jersey.CommonProperties", | ||
"org.glassfish.jersey.ExternalProperties", | ||
"org.glassfish.jersey.server.ServerProperties", | ||
"org.glassfish.jersey.client.ClientProperties", | ||
"org.glassfish.jersey.servlet.ServletProperties", | ||
"org.glassfish.jersey.message.MessageProperties", | ||
"org.glassfish.jersey.apache.connector.ApacheClientProperties", | ||
"org.glassfish.jersey.helidon.connector.HelidonClientProperties", | ||
"org.glassfish.jersey.jdk.connector.JdkConnectorProperties", | ||
"org.glassfish.jersey.jetty.connector.JettyClientProperties", | ||
"org.glassfish.jersey.netty.connector.NettyClientProperties", | ||
"org.glassfish.jersey.media.multipart.MultiPartProperties", | ||
"org.glassfish.jersey.server.oauth1.OAuth1ServerProperties"); | ||
|
||
JerseySystemPropertiesConfigurationModel() { | ||
super(PROPERTY_CLASSES); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.