struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [06/17] struts git commit: Defines new injectable bean with alias
Date Mon, 13 Mar 2017 17:46:15 GMT
Defines new injectable bean with alias


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d7cf0609
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d7cf0609
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d7cf0609

Branch: refs/heads/master
Commit: d7cf0609059c7ffe1f90cc044c9ea20536e823b2
Parents: 3be5aa0
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Mar 10 09:20:39 2017 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Mar 10 09:20:39 2017 +0100

----------------------------------------------------------------------
 .../xwork2/config/providers/XWorkConfigurationProvider.java      | 4 ++++
 core/src/main/java/org/apache/struts2/StrutsConstants.java       | 2 ++
 .../org/apache/struts2/config/DefaultBeanSelectionProvider.java  | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/d7cf0609/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
index fc335d8..ff27731 100644
--- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
+++ b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
@@ -2,6 +2,7 @@ package com.opensymphony.xwork2.config.providers;
 
 import com.opensymphony.xwork2.ActionProxyFactory;
 import com.opensymphony.xwork2.DefaultActionProxyFactory;
+import com.opensymphony.xwork2.TextProviderFactory;
 import com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory;
 import com.opensymphony.xwork2.factory.UnknownHandlerFactory;
 import com.opensymphony.xwork2.ognl.accessor.HttpParametersPropertyAccessor;
@@ -177,8 +178,11 @@ public class XWorkConfigurationProvider implements ConfigurationProvider
{
                 .factory(NullHandler.class, Object.class.getName(), InstantiatingNullHandler.class,
Scope.SINGLETON)
                 .factory(ActionValidatorManager.class, AnnotationActionValidatorManager.class,
Scope.SINGLETON)
                 .factory(ActionValidatorManager.class, "no-annotations", DefaultActionValidatorManager.class,
Scope.SINGLETON)
+
+                .factory(TextProviderFactory.class, Scope.SINGLETON)
                 .factory(TextProvider.class, "system", DefaultTextProvider.class, Scope.SINGLETON)
                 .factory(TextProvider.class, TextProviderSupport.class, Scope.SINGLETON)
+
                 .factory(LocaleProvider.class, DefaultLocaleProvider.class, Scope.SINGLETON)
                 .factory(OgnlUtil.class, Scope.SINGLETON)
                 .factory(CollectionConverter.class, Scope.SINGLETON)

http://git-wip-us.apache.org/repos/asf/struts/blob/d7cf0609/core/src/main/java/org/apache/struts2/StrutsConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java
index c41d542..7ae2a5f 100644
--- a/core/src/main/java/org/apache/struts2/StrutsConstants.java
+++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java
@@ -306,4 +306,6 @@ public final class StrutsConstants {
     public static final String STRUTS_CONTENT_TYPE_MATCHER = "struts.contentTypeMatcher";
 
     public static final String STRUTS_SMI_METHOD_REGEX = "struts.strictMethodInvocation.methodRegex";
+
+    public static final String STRUTS_TEXT_PROVIDER_FACTORY = "struts.textProviderFactory";
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/d7cf0609/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
index 20b0f99..7835185 100644
--- a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
@@ -22,6 +22,7 @@
 package org.apache.struts2.config;
 
 import com.opensymphony.xwork2.ActionProxyFactory;
+import com.opensymphony.xwork2.TextProviderFactory;
 import com.opensymphony.xwork2.factory.UnknownHandlerFactory;
 import com.opensymphony.xwork2.security.AcceptedPatternsChecker;
 import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
@@ -387,6 +388,7 @@ public class DefaultBeanSelectionProvider extends AbstractBeanSelectionProvider
         alias(TypeConverterHolder.class, StrutsConstants.STRUTS_CONVERTER_HOLDER, builder,
props);
 
         alias(TextProvider.class, StrutsConstants.STRUTS_XWORKTEXTPROVIDER, builder, props,
Scope.PROTOTYPE);
+        alias(TextProviderFactory.class, StrutsConstants.STRUTS_TEXT_PROVIDER_FACTORY, builder,
props, Scope.PROTOTYPE);
 
         alias(LocaleProvider.class, StrutsConstants.STRUTS_LOCALE_PROVIDER, builder, props);
         alias(ActionProxyFactory.class, StrutsConstants.STRUTS_ACTIONPROXYFACTORY, builder,
props);


Mime
View raw message