[struts] branch master updated: Initial test dedicated for the DefaultUnknownHandlerManager (#205)
This is an automated email from the ASF dual-hosted git repository. yasserzamani pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new f34cf78 Initial test dedicated for the DefaultUnknownHandlerManager (#205) f34cf78 is described below commit f34cf78ae30de835225b832fe9484053207813bd Author: zalsaeed AuthorDate: Mon Jan 29 01:09:18 2018 -0800 Initial test dedicated for the DefaultUnknownHandlerManager (#205) * Initial test dedicated for the DefaultUnknownHandlerManager * fixed the licensing and authore comments issues that causes build to fail * follow good practice when initializing objects * use TestCase to enhance performance --- .../xwork2/DefaultUnknownHandlerManagerTest.java | 83 ++ 1 file changed, 83 insertions(+) diff --git a/core/src/test/java/com/opensymphony/xwork2/DefaultUnknownHandlerManagerTest.java b/core/src/test/java/com/opensymphony/xwork2/DefaultUnknownHandlerManagerTest.java new file mode 100644 index 000..c301885 --- /dev/null +++ b/core/src/test/java/com/opensymphony/xwork2/DefaultUnknownHandlerManagerTest.java @@ -0,0 +1,83 @@ +/* + * 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 com.opensymphony.xwork2; + +import com.opensymphony.xwork2.config.entities.ActionConfig; +import com.opensymphony.xwork2.config.providers.SomeUnknownHandler; + +import junit.framework.TestCase; + +import java.util.ArrayList; + +/** + * Partial test to the DefaultUnknownHandlerManager to understand the relationship between Manager and Handlers. + * + */ +public class DefaultUnknownHandlerManagerTest extends TestCase { + +ActionConfig actionConfig; +SomeUnknownHandler someUnknownHandler; + +/** + * Relationshsip when UnknownAction method is called. + * + */ +public void testHandleUnknownAction() { + +DefaultUnknownHandlerManager defaultUnknownHandlerManager = new DefaultUnknownHandlerManager(); +defaultUnknownHandlerManager.unknownHandlers = new ArrayList<>(); +defaultUnknownHandlerManager.unknownHandlers.add(someUnknownHandler); + +ActionConfig newActionConfig = defaultUnknownHandlerManager.handleUnknownAction("arbitraryNameSpace", "arbitraryActionName"); + +assertEquals(newActionConfig, actionConfig); +} + +/** + * Relationship when UnknownActionMethod method called. + * + */ +public void testHandelUnknownActionMethod() throws Exception { +DefaultUnknownHandlerManager defaultUnknownHandlerManager = new DefaultUnknownHandlerManager(); +defaultUnknownHandlerManager.unknownHandlers = new ArrayList<>(); +defaultUnknownHandlerManager.unknownHandlers.add(someUnknownHandler); + +String result = null; + +for (int i = 0; i < 10 ; i++) { +result = (String) defaultUnknownHandlerManager.handleUnknownMethod(this, "someMethodName"); +assertEquals(result, "specialActionMethod"); +} + +} + +@Override +protected void setUp() throws Exception { +super.setUp(); + +// Make sure we are using the actionConfig we initialized. +ActionConfig.Builder actionConfigBuilder = new ActionConfig.Builder( "com", "someAction", "someClass"); +actionConfig = actionConfigBuilder.build(); +someUnknownHandler = new SomeUnknownHandler(); + +someUnknownHandler.setActionConfig(actionConfig); +someUnknownHandler.setActionMethodResult("specialActionMethod"); +} + +} -- To stop receiving notification emails like this one, please contact yasserzam...@apache.org.
[struts-site] 01/01: Merge pull request #102 from yasserzamani/fix_plugins_md
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 37576ad1f880e3c0baa200a1a7510d171b41b754 Merge: 64b1607 5503ed6 Author: Lukasz Lenart AuthorDate: Mon Jan 29 16:38:58 2018 +0100 Merge pull request #102 from yasserzamani/fix_plugins_md fix plugins.md via a few regex replaces source/plugins/plugins.md | 315 +++--- 1 file changed, 44 insertions(+), 271 deletions(-) -- To stop receiving notification emails like this one, please contact lukaszlen...@apache.org.
[struts-site] branch master updated (64b1607 -> 37576ad)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 64b1607 Merge pull request #101 from jeffblack360/patch-3 add 41da543 fix plugins.md via a few regex replaces add 5503ed6 reorder plugins.md's table columns for better fit new 37576ad Merge pull request #102 from yasserzamani/fix_plugins_md The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: source/plugins/plugins.md | 315 +++--- 1 file changed, 44 insertions(+), 271 deletions(-) -- To stop receiving notification emails like this one, please contact lukaszlen...@apache.org.
[struts-site] branch asf-site updated: Updates production by Jenkins
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/asf-site by this push: new 5405fbb Updates production by Jenkins 5405fbb is described below commit 5405fbbb8e189f0fe46b726ac61bbfcf195095fc Author: jenkins AuthorDate: Mon Jan 29 15:46:00 2018 + Updates production by Jenkins --- content/plugins/plugins.html | 617 +-- 1 file changed, 308 insertions(+), 309 deletions(-) diff --git a/content/plugins/plugins.html b/content/plugins/plugins.html index 23bd659..837af2f 100644 --- a/content/plugins/plugins.html +++ b/content/plugins/plugins.html @@ -134,6 +134,12 @@ Static resources Extension Points + Plugin Examples + Sitemesh plugin + Tiles plugin + + + Plugin Registry Struts 2 plugins contain classes and configuration that extend, replace, or add to existing Struts framework functionality. A plugin can be installed by adding its JAR file to the application’s class path, in addition to the JAR files to fulfill whatever dependencies the plugin itself may have. To configure the plugin, the JAR should contain a struts-plugin.xml file, which follows the same format as an ordinary str [...] @@ -190,287 +196,282 @@ The following extension points are available in Struts 2: - - - Type - Property - Scope - Description - - - com.opensymphony.xwork2.ObjectFactory - struts.objectFactory - singleton - Creates actions, results, and interceptors - - - com.opensymphony.xwork2.factory.ActionFactory - struts.objectFactory.actionFactory - singleton - Dedicated factory used to create Actions, you can implement/extend existing one instead of defining new ObjectFactory - - - com.opensymphony.xwork2.factory.ResultFactory - struts.objectFactory.resultFactory - singleton - Dedicated factory used to create Results, you can implement/extend existing one instead of defining new ObjectFactory - - - com.opensymphony.xwork2.factory.InterceptorFactory - struts.objectFactory.interceptorFactory - singleton - Dedicated factory used to create Interceptors, you can implement/extend existing one instead of defining new ObjectFactory - - - com.opensymphony.xwork2.factory.ConverterFactory - struts.objectFactory.converterFactory - singleton - Dedicated factory used to create TypeConverters, you can implement/extend existing one instead of defining new ObjectFactory - - - com.opensymphony.xwork2.factory.ValidatorFactory - struts.objectFactory.validatorFactory - singleton - Dedicated factory used to create Validators, you can implement/extend existing one instead of defining new ObjectFactory - - - com.opensymphony.xwork2.ActionProxyFactory - struts.actionProxyFactory - singleton - Creates the ActionProxy - - - com.opensymphony.xwork2.util.ObjectTypeDeterminer - struts.objectTypeDeterminer - singleton - Determines what the key and element class of a Map or Collection should be - - - org.apache.struts2.dispatcher.mapper.ActionMapper - struts.mapper.class - singleton - Determines the ActionMapping from a request and a URI from an ActionMapping - - - org.apache.struts2.dispatcher.multipart.MultiPartRequest - struts.multipart.parser - per request - Parses a multipart request (file upload) - - - org.apache.struts2.views.freemarker.FreemarkerManager - struts.freemarker.manager.classname - singleton - Loads and processes Freemarker templates - - - org.apache.struts2.views.velocity.VelocityManager - struts.velocity.manager.classname - singleton - Loads and processes Velocity templates - - - com.opensymphony.xwork2.validator.ActionValidatorManager - struts.actionValidatorManager - singleton - Main interface for validation managers (regular and annotation based). Handles both the loading of - configuration and the actual validation (since 2.1) - - - com.opensymphony.xwork2.util.ValueStackFactory - struts.valueStackFactory - singleton - Creates value stacks (since 2.1) - - - com.opensymphony.xwork2.reflection.ReflectionProvider - struts.reflectionProvider - singleton - Provides reflection services, key place to plug in a custom expression language (since 2.1) - - - com.opensymphony.xwork2.reflection.ReflectionContextFactory - struts.reflectionContextFactory - singleton - Creates reflection context maps used for reflection and expression language operations (since 2.1) - - - com.opensymphony.xwork2.config.PackageProvider - N/A - singleton - All beans registered as PackagePr
[struts] branch master updated (f34cf78 -> 97012c7)
This is an automated email from the ASF dual-hosted git repository. yasserzamani pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from f34cf78 Initial test dedicated for the DefaultUnknownHandlerManager (#205) add e717e46 Uses the latest Spring version add 6c3316a Fixes test add 7058872 Adds missing dependency add bfa119c Uses proper date format add cf19d51 Adds missing test dependency add 67bdf68 Normalises name of property with Spring version new 97012c7 Merge pull request #189 from lukaszlenart/upgrade-spring The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: apps/pom.xml | 2 +- .../interceptor/FileUploadInterceptorTest.java | 4 +--- plugins/embeddedjsp/pom.xml | 5 + plugins/json/pom.xml | 6 ++ plugins/rest/pom.xml | 6 ++ .../apache/struts2/rest/DefaultHttpHeadersTest.java | 11 ++- pom.xml | 20 ++-- 7 files changed, 39 insertions(+), 15 deletions(-) -- To stop receiving notification emails like this one, please contact yasserzam...@apache.org.
[struts] 01/01: Merge pull request #189 from lukaszlenart/upgrade-spring
This is an automated email from the ASF dual-hosted git repository. yasserzamani pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 97012c78a9a5fe795d087a6f80ab76a63792944d Merge: f34cf78 67bdf68 Author: Yasser Zamani AuthorDate: Tue Jan 30 10:47:04 2018 +0330 Merge pull request #189 from lukaszlenart/upgrade-spring WW-4899: upgrade Spring apps/pom.xml | 2 +- .../interceptor/FileUploadInterceptorTest.java | 4 +--- plugins/embeddedjsp/pom.xml | 5 + plugins/json/pom.xml | 6 ++ plugins/rest/pom.xml | 6 ++ .../apache/struts2/rest/DefaultHttpHeadersTest.java | 11 ++- pom.xml | 20 ++-- 7 files changed, 39 insertions(+), 15 deletions(-) -- To stop receiving notification emails like this one, please contact yasserzam...@apache.org.