You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2024/09/01 05:42:44 UTC
(struts) branch feature/WW-3714-rename created (now 284558ee8)
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a change to branch feature/WW-3714-rename
in repository https://gitbox.apache.org/repos/asf/struts.git
at 284558ee8 WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2
This branch includes the following new commits:
new 284558ee8 WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2
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.
(struts) 01/01: WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2
Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch feature/WW-3714-rename
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 284558ee8e06a1eb719ff2e5bec396b774735f37
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sun Sep 1 07:42:25 2024 +0200
WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2
---
.../org/demo/rest/example/OrdersController.java | 6 +-
apps/rest-showcase/src/main/resources/log4j2.xml | 1 -
.../org/apache/struts2/showcase/DateAction.java | 2 +-
.../struts2/showcase/DynamicTreeSelectAction.java | 2 +-
.../showcase/LotsOfOptiontransferselectAction.java | 2 +-
.../showcase/LotsOfRichtexteditorAction.java | 2 +-
.../apache/struts2/showcase/MoreSelectsAction.java | 2 +-
.../showcase/ShowAjaxDynamicTreeAction.java | 2 +-
.../struts2/showcase/ShowDynamicTreeAction.java | 2 +-
.../org/apache/struts2/showcase/UITagExample.java | 6 +-
.../showcase/action/AbstractCRUDAction.java | 2 +-
.../struts2/showcase/action/EmployeeAction.java | 2 +-
.../struts2/showcase/action/ExampleAction.java | 2 +-
.../struts2/showcase/action/JSPEvalAction.java | 4 +-
.../showcase/action/ParamsAnnotationAction.java | 2 +-
.../struts2/showcase/action/SkillAction.java | 2 +-
.../showcase/actionchaining/ActionChain1.java | 2 +-
.../showcase/actionchaining/ActionChain2.java | 2 +-
.../showcase/actionchaining/ActionChain3.java | 2 +-
.../struts2/showcase/ajax/AjaxTestAction.java | 2 +-
.../showcase/ajax/AutocompleterExampleAction.java | 2 +-
.../showcase/ajax/Example4ShowPanelAction.java | 2 +-
.../struts2/showcase/ajax/Example5Action.java | 2 +-
.../struts2/showcase/ajax/tree/GetCategory.java | 2 +-
.../struts2/showcase/async/ChatRoomAction.java | 2 +-
.../chat/ChatAuthenticationInterceptor.java | 8 +-
.../struts2/showcase/chat/ChatInterceptor.java | 8 +-
.../struts2/showcase/chat/ChatLoginAction.java | 2 +-
.../struts2/showcase/chat/ChatLogoutAction.java | 2 +-
.../struts2/showcase/chat/CrudRoomAction.java | 2 +-
.../struts2/showcase/chat/DateConverter.java | 4 +-
.../struts2/showcase/chat/EnterRoomAction.java | 2 +-
.../struts2/showcase/chat/ExitRoomAction.java | 2 +-
.../chat/MessagesAvailableInRoomAction.java | 2 +-
.../showcase/chat/RoomsAvailableAction.java | 2 +-
.../showcase/chat/SendMessageToRoomAction.java | 2 +-
.../showcase/chat/UsersAvailableAction.java | 2 +-
.../showcase/chat/UsersAvailableInRoomAction.java | 2 +-
.../struts2/showcase/conversion/AddressAction.java | 2 +-
.../showcase/conversion/OperationsEnumAction.java | 2 +-
.../struts2/showcase/conversion/PersonAction.java | 2 +-
.../showcase/filedownload/FileDownloadAction.java | 2 +-
.../showcase/fileupload/FileUploadAction.java | 2 +-
.../MultipleFileUploadUsingArrayAction.java | 2 +-
.../MultipleFileUploadUsingListAction.java | 2 +-
.../freemarker/CustomFreemarkerManager.java | 2 +-
.../showcase/freemarker/StandardTagsAction.java | 4 +-
.../showcase/hangman/GetUpdatedHangmanAction.java | 2 +-
.../showcase/hangman/GuessCharacterAction.java | 2 +-
.../showcase/hangman/StartHangmanAction.java | 2 +-
.../showcase/modelDriven/ModelDrivenAction.java | 4 +-
.../struts2/showcase/person/EditPersonAction.java | 2 +-
.../struts2/showcase/person/ListPeopleAction.java | 2 +-
.../struts2/showcase/person/NewPersonAction.java | 2 +-
.../struts2/showcase/source/ViewSourceAction.java | 4 +-
.../tag/nonui/actionPrefix/SubmitAction.java | 2 +-
.../tag/nonui/actiontag/ActionTagDemo.java | 2 +-
.../tag/nonui/debugtag/DebugTagAction.java | 2 +-
.../nonui/iteratortag/AppendIteratorTagDemo.java | 4 +-
.../iteratortag/IteratorGeneratorTagDemo.java | 2 +-
.../nonui/iteratortag/MergeIteratorTagDemo.java | 4 +-
.../nonui/iteratortag/SubsetIteratorTagDemo.java | 4 +-
.../showcase/tiles/TilesAnnotationsAction.java | 2 +-
.../apache/struts2/showcase/token/TokenAction.java | 4 +-
.../AbstractValidationActionSupport.java | 2 +-
.../showcase/validation/AjaxFormSubmitAction.java | 18 +-
.../validation/BeanValidationExampleAction.java | 2 +-
.../struts2/showcase/validation/QuizAction.java | 2 +-
.../showcase/validation/SubmitApplication.java | 2 +-
.../struts2/showcase/wait/LongProcessAction.java | 2 +-
.../apache/struts2/showcase/xslt/JVMAction.java | 2 +-
.../WEB-INF/conversion/AddressAction.java.txt | 10 +-
.../conversion/OperationsEnumAction.java.txt | 14 +-
.../WEB-INF/conversion/PersonAction.java.txt | 16 +-
.../src/main/webapp/WEB-INF/decorators/main.jsp | 4 +-
apps/showcase/src/main/webapp/WEB-INF/dwr.xml | 6 +-
core/pom.xml | 2 +-
.../main/java/com/opensymphony/xwork2/Action.java | 88 -
.../com/opensymphony/xwork2/ActionChainResult.java | 279 ---
.../com/opensymphony/xwork2/ActionContext.java | 544 ------
.../opensymphony/xwork2/ActionEventListener.java | 44 -
.../com/opensymphony/xwork2/ActionInvocation.java | 179 --
.../java/com/opensymphony/xwork2/ActionProxy.java | 107 --
.../opensymphony/xwork2/ActionProxyFactory.java | 85 -
.../com/opensymphony/xwork2/ActionSupport.java | 363 ----
.../java/com/opensymphony/xwork2/AsyncManager.java | 35 -
.../opensymphony/xwork2/CompositeTextProvider.java | 295 ----
.../xwork2/DefaultActionInvocation.java | 512 ------
.../opensymphony/xwork2/DefaultActionProxy.java | 222 ---
.../xwork2/DefaultActionProxyFactory.java | 87 -
.../opensymphony/xwork2/DefaultLocaleProvider.java | 68 -
.../xwork2/DefaultLocaleProviderFactory.java | 28 -
.../opensymphony/xwork2/DefaultTextProvider.java | 157 --
.../xwork2/DefaultUnknownHandlerManager.java | 152 --
.../java/com/opensymphony/xwork2/FileManager.java | 93 -
.../opensymphony/xwork2/FileManagerFactory.java | 30 -
.../com/opensymphony/xwork2/LocaleProvider.java | 77 -
.../opensymphony/xwork2/LocaleProviderFactory.java | 35 -
.../opensymphony/xwork2/LocalizedTextProvider.java | 49 -
.../java/com/opensymphony/xwork2/ModelDriven.java | 36 -
.../com/opensymphony/xwork2/ObjectFactory.java | 264 ---
.../java/com/opensymphony/xwork2/Preparable.java | 37 -
.../xwork2/ResourceBundleTextProvider.java | 51 -
.../main/java/com/opensymphony/xwork2/Result.java | 50 -
.../xwork2/StrutsTextProviderFactory.java | 87 -
.../java/com/opensymphony/xwork2/TextProvider.java | 189 --
.../opensymphony/xwork2/TextProviderFactory.java | 29 -
.../opensymphony/xwork2/TextProviderSupport.java | 339 ----
.../java/com/opensymphony/xwork2/Unchainable.java | 27 -
.../com/opensymphony/xwork2/UnknownHandler.java | 67 -
.../opensymphony/xwork2/UnknownHandlerManager.java | 50 -
.../java/com/opensymphony/xwork2/Validateable.java | 35 -
.../xwork2/ValidationAwareSupport.java | 183 --
.../opensymphony/xwork2/XWorkJUnit4TestCase.java | 86 -
.../com/opensymphony/xwork2/XWorkTestCase.java | 144 --
.../xwork2/config/BeanSelectionProvider.java | 26 -
.../opensymphony/xwork2/config/Configuration.java | 95 -
.../xwork2/config/ConfigurationException.java | 98 --
.../xwork2/config/ConfigurationManager.java | 232 ---
.../xwork2/config/ConfigurationProvider.java | 25 -
.../xwork2/config/ConfigurationUtil.java | 97 --
.../xwork2/config/ContainerProvider.java | 60 -
.../xwork2/config/FileManagerFactoryProvider.java | 55 -
.../xwork2/config/FileManagerProvider.java | 57 -
.../xwork2/config/PackageProvider.java | 49 -
.../xwork2/config/RuntimeConfiguration.java | 56 -
.../ServletContextAwareConfigurationProvider.java | 35 -
.../xwork2/config/entities/ActionConfig.java | 373 ----
.../xwork2/config/entities/AllowedMethods.java | 220 ---
.../config/entities/ExceptionMappingConfig.java | 179 --
.../xwork2/config/entities/InterceptorConfig.java | 162 --
.../config/entities/InterceptorListHolder.java | 34 -
.../xwork2/config/entities/InterceptorLocator.java | 32 -
.../xwork2/config/entities/InterceptorMapping.java | 84 -
.../config/entities/InterceptorStackConfig.java | 201 ---
.../xwork2/config/entities/PackageConfig.java | 648 -------
.../xwork2/config/entities/Parameterizable.java | 45 -
.../xwork2/config/entities/ResultConfig.java | 163 --
.../xwork2/config/entities/ResultTypeConfig.java | 160 --
.../config/entities/UnknownHandlerConfig.java | 46 -
.../xwork2/config/impl/AbstractMatcher.java | 227 ---
.../xwork2/config/impl/ActionConfigMatcher.java | 153 --
.../xwork2/config/impl/DefaultConfiguration.java | 674 --------
.../config/impl/LocatableConstantFactory.java | 50 -
.../xwork2/config/impl/LocatableFactory.java | 64 -
.../xwork2/config/impl/MockConfiguration.java | 132 --
.../xwork2/config/impl/NamespaceMatch.java | 50 -
.../xwork2/config/impl/NamespaceMatcher.java | 68 -
.../com/opensymphony/xwork2/config/package.html | 21 -
.../xwork2/config/providers/CycleDetector.java | 77 -
.../xwork2/config/providers/DirectedGraph.java | 162 --
.../config/providers/EnvsValueSubstitutor.java | 52 -
.../config/providers/InterceptorBuilder.java | 218 ---
.../StrutsDefaultConfigurationProvider.java | 168 --
.../xwork2/config/providers/ValueSubstitutor.java | 28 -
.../config/providers/XmlConfigurationProvider.java | 246 ---
.../providers/XmlDocConfigurationProvider.java | 1013 -----------
.../xwork2/config/providers/XmlHelper.java | 144 --
.../conversion/ConversionAnnotationProcessor.java | 41 -
.../xwork2/conversion/ConversionFileProcessor.java | 37 -
.../conversion/ConversionPropertiesProcessor.java | 40 -
.../xwork2/conversion/NullHandler.java | 57 -
.../xwork2/conversion/ObjectTypeDeterminer.java | 44 -
.../xwork2/conversion/TypeConverter.java | 51 -
.../xwork2/conversion/TypeConverterCreator.java | 44 -
.../xwork2/conversion/TypeConverterHolder.java | 100 --
.../xwork2/conversion/annotations/Conversion.java | 102 --
.../conversion/annotations/ConversionRule.java | 36 -
.../conversion/annotations/ConversionType.java | 37 -
.../conversion/annotations/TypeConversion.java | 212 ---
.../xwork2/conversion/impl/ArrayConverter.java | 54 -
.../conversion/impl/CollectionConverter.java | 113 --
.../xwork2/conversion/impl/ConversionData.java | 46 -
.../xwork2/conversion/impl/DateConverter.java | 257 ---
.../impl/DefaultConversionAnnotationProcessor.java | 119 --
.../impl/DefaultConversionFileProcessor.java | 116 --
.../impl/DefaultObjectTypeDeterminer.java | 296 ----
.../conversion/impl/DefaultTypeConverter.java | 325 ----
.../conversion/impl/InstantiatingNullHandler.java | 162 --
.../xwork2/conversion/impl/NumberConverter.java | 233 ---
.../xwork2/conversion/impl/StringConverter.java | 100 --
.../conversion/impl/XWorkBasicConverter.java | 219 ---
.../xwork2/conversion/impl/XWorkConverter.java | 628 -------
.../xwork2/conversion/impl/XWorkList.java | 245 ---
.../opensymphony/xwork2/factory/ActionFactory.java | 45 -
.../xwork2/factory/ConverterFactory.java | 42 -
.../xwork2/factory/DefaultActionFactory.java | 43 -
.../xwork2/factory/DefaultInterceptorFactory.java | 99 --
.../xwork2/factory/DefaultResultFactory.java | 72 -
.../factory/DefaultUnknownHandlerFactory.java | 44 -
.../xwork2/factory/DefaultValidatorFactory.java | 52 -
.../xwork2/factory/InterceptorFactory.java | 50 -
.../opensymphony/xwork2/factory/ResultFactory.java | 33 -
.../xwork2/factory/StrutsConverterFactory.java | 48 -
.../xwork2/factory/UnknownHandlerFactory.java | 42 -
.../xwork2/factory/ValidatorFactory.java | 43 -
.../xwork2/inject/ConstructionContext.java | 119 --
.../com/opensymphony/xwork2/inject/Container.java | 133 --
.../xwork2/inject/ContainerBuilder.java | 658 -------
.../opensymphony/xwork2/inject/ContainerImpl.java | 607 -------
.../com/opensymphony/xwork2/inject/Context.java | 57 -
.../xwork2/inject/DependencyException.java | 37 -
.../xwork2/inject/EarlyInitializable.java | 22 -
.../xwork2/inject/ExternalContext.java | 77 -
.../com/opensymphony/xwork2/inject/Factory.java | 41 -
.../opensymphony/xwork2/inject/Initializable.java | 34 -
.../xwork2/inject/InitializableFactory.java | 56 -
.../com/opensymphony/xwork2/inject/Inject.java | 50 -
.../xwork2/inject/InternalContext.java | 77 -
.../xwork2/inject/InternalFactory.java | 42 -
.../java/com/opensymphony/xwork2/inject/Key.java | 80 -
.../java/com/opensymphony/xwork2/inject/Scope.java | 286 ---
.../com/opensymphony/xwork2/inject/Scoped.java | 38 -
.../opensymphony/xwork2/inject/package-info.java | 30 -
.../inject/util/FinalizablePhantomReference.java | 35 -
.../xwork2/inject/util/FinalizableReference.java | 32 -
.../inject/util/FinalizableReferenceQueue.java | 77 -
.../inject/util/FinalizableSoftReference.java | 34 -
.../inject/util/FinalizableWeakReference.java | 34 -
.../opensymphony/xwork2/inject/util/Function.java | 44 -
.../xwork2/inject/util/ReferenceCache.java | 205 ---
.../xwork2/inject/util/ReferenceMap.java | 609 -------
.../xwork2/inject/util/ReferenceType.java | 55 -
.../xwork2/interceptor/AbstractInterceptor.java | 64 -
.../xwork2/interceptor/AliasInterceptor.java | 291 ----
.../xwork2/interceptor/ChainingInterceptor.java | 275 ---
.../xwork2/interceptor/ConditionalInterceptor.java | 39 -
.../interceptor/ConversionErrorInterceptor.java | 146 --
.../interceptor/DefaultWorkflowInterceptor.java | 247 ---
.../xwork2/interceptor/ExceptionHolder.java | 82 -
.../interceptor/ExceptionMappingInterceptor.java | 322 ----
.../xwork2/interceptor/Interceptor.java | 222 ---
.../xwork2/interceptor/LoggingInterceptor.java | 90 -
.../interceptor/MethodFilterInterceptor.java | 123 --
.../interceptor/MethodFilterInterceptorUtil.java | 144 --
.../xwork2/interceptor/ModelDrivenInterceptor.java | 147 --
.../interceptor/ParameterRemoverInterceptor.java | 124 --
.../xwork2/interceptor/PreResultListener.java | 41 -
.../interceptor/PrefixMethodInvocationUtil.java | 176 --
.../xwork2/interceptor/PrepareInterceptor.java | 178 --
.../xwork2/interceptor/ScopedModelDriven.java | 43 -
.../interceptor/ScopedModelDrivenInterceptor.java | 164 --
.../interceptor/StaticParametersInterceptor.java | 241 ---
.../xwork2/interceptor/ValidationAware.java | 131 --
.../xwork2/interceptor/ValidationErrorAware.java | 40 -
.../interceptor/ValidationWorkflowAware.java | 30 -
.../xwork2/interceptor/WithLazyParams.java | 78 -
.../xwork2/interceptor/annotations/After.java | 84 -
.../annotations/AnnotationWorkflowInterceptor.java | 179 --
.../xwork2/interceptor/annotations/Before.java | 83 -
.../interceptor/annotations/BeforeResult.java | 83 -
.../interceptor/annotations/InputConfig.java | 95 -
.../xwork2/mock/MockActionInvocation.java | 127 --
.../opensymphony/xwork2/mock/MockActionProxy.java | 129 --
.../opensymphony/xwork2/mock/MockContainer.java | 59 -
.../opensymphony/xwork2/mock/MockInterceptor.java | 111 --
.../xwork2/mock/MockObjectTypeDeterminer.java | 128 --
.../com/opensymphony/xwork2/mock/MockResult.java | 61 -
.../xwork2/ognl/BeanInfoCacheFactory.java | 23 -
.../ognl/DefaultOgnlBeanInfoCacheFactory.java | 38 -
.../xwork2/ognl/DefaultOgnlCacheFactory.java | 71 -
.../ognl/DefaultOgnlExpressionCacheFactory.java | 38 -
.../xwork2/ognl/ErrorMessageBuilder.java | 76 -
.../xwork2/ognl/ExpressionCacheFactory.java | 23 -
.../com/opensymphony/xwork2/ognl/ObjectProxy.java | 57 -
.../com/opensymphony/xwork2/ognl/OgnlCache.java | 41 -
.../opensymphony/xwork2/ognl/OgnlCacheFactory.java | 46 -
.../xwork2/ognl/OgnlCaffeineCache.java | 78 -
.../opensymphony/xwork2/ognl/OgnlDefaultCache.java | 88 -
.../com/opensymphony/xwork2/ognl/OgnlLRUCache.java | 89 -
.../xwork2/ognl/OgnlNullHandlerWrapper.java | 44 -
.../xwork2/ognl/OgnlReflectionContextFactory.java | 33 -
.../xwork2/ognl/OgnlReflectionProvider.java | 161 --
.../xwork2/ognl/OgnlTypeConverterWrapper.java | 48 -
.../com/opensymphony/xwork2/ognl/OgnlUtil.java | 705 --------
.../opensymphony/xwork2/ognl/OgnlValueStack.java | 524 ------
.../xwork2/ognl/OgnlValueStackFactory.java | 161 --
.../xwork2/ognl/SecurityMemberAccess.java | 533 ------
.../xwork2/ognl/XWorkTypeConverterWrapper.java | 41 -
.../xwork2/ognl/accessor/CompoundRootAccessor.java | 371 ----
.../accessor/HttpParametersPropertyAccessor.java | 40 -
.../xwork2/ognl/accessor/ObjectAccessor.java | 44 -
.../ognl/accessor/ObjectProxyPropertyAccessor.java | 84 -
.../ognl/accessor/ParameterPropertyAccessor.java | 48 -
.../xwork2/ognl/accessor/RootAccessor.java | 29 -
.../accessor/XWorkCollectionPropertyAccessor.java | 312 ----
.../ognl/accessor/XWorkEnumerationAccessor.java | 39 -
.../accessor/XWorkIteratorPropertyAccessor.java | 39 -
.../ognl/accessor/XWorkListPropertyAccessor.java | 194 ---
.../ognl/accessor/XWorkMapPropertyAccessor.java | 162 --
.../xwork2/ognl/accessor/XWorkMethodAccessor.java | 140 --
.../ognl/accessor/XWorkObjectPropertyAccessor.java | 43 -
.../xwork2/result/ParamNameAwareResult.java | 28 -
.../xwork2/security/AcceptedPatternsChecker.java | 100 --
.../security/DefaultAcceptedPatternsChecker.java | 138 --
.../security/DefaultExcludedPatternsChecker.java | 121 --
.../DefaultNotExcludedAcceptedPatternsChecker.java | 105 --
.../xwork2/security/ExcludedPatternsChecker.java | 100 --
.../NotExcludedAcceptedPatternsChecker.java | 70 -
.../xwork2/test/StubConfigurationProvider.java | 59 -
.../xwork2/util/AbstractLocalizedTextProvider.java | 697 --------
.../opensymphony/xwork2/util/AnnotationUtils.java | 211 ---
.../opensymphony/xwork2/util/ClassLoaderUtil.java | 285 ---
.../opensymphony/xwork2/util/ClassPathFinder.java | 193 ---
.../xwork2/util/ClearableValueStack.java | 30 -
.../com/opensymphony/xwork2/util/CompoundRoot.java | 60 -
.../opensymphony/xwork2/util/ConfigParseUtil.java | 105 --
.../com/opensymphony/xwork2/util/CreateIfNull.java | 77 -
.../com/opensymphony/xwork2/util/DebugUtils.java | 53 -
.../com/opensymphony/xwork2/util/DomHelper.java | 397 -----
.../java/com/opensymphony/xwork2/util/Element.java | 81 -
.../com/opensymphony/xwork2/util/Evaluated.java | 36 -
.../xwork2/util/GlobalLocalizedTextProvider.java | 221 ---
.../java/com/opensymphony/xwork2/util/Key.java | 78 -
.../com/opensymphony/xwork2/util/KeyProperty.java | 80 -
.../xwork2/util/MemberAccessValueStack.java | 34 -
.../xwork2/util/NamedVariablePatternMatcher.java | 160 --
.../opensymphony/xwork2/util/OgnlTextParser.java | 101 --
.../opensymphony/xwork2/util/PatternMatcher.java | 58 -
.../opensymphony/xwork2/util/PropertiesReader.java | 556 ------
.../com/opensymphony/xwork2/util/ProxyUtil.java | 291 ----
.../com/opensymphony/xwork2/util/ResolverUtil.java | 479 -----
.../xwork2/util/StrutsLocalizedTextProvider.java | 382 ----
.../opensymphony/xwork2/util/TextParseUtil.java | 291 ----
.../com/opensymphony/xwork2/util/TextParser.java | 31 -
.../com/opensymphony/xwork2/util/ValueStack.java | 166 --
.../xwork2/util/ValueStackFactory.java | 41 -
.../opensymphony/xwork2/util/WildcardHelper.java | 447 -----
.../com/opensymphony/xwork2/util/WildcardUtil.java | 71 -
.../xwork2/util/XWorkTestCaseHelper.java | 88 -
.../util/classloader/AbstractResourceStore.java | 55 -
.../xwork2/util/classloader/FileResourceStore.java | 61 -
.../xwork2/util/classloader/JarResourceStore.java | 72 -
.../util/classloader/ReloadingClassLoader.java | 191 --
.../xwork2/util/classloader/ResourceStore.java | 30 -
.../util/classloader/ResourceStoreClassLoader.java | 99 --
.../xwork2/util/finder/ClassFinder.java | 337 ----
.../xwork2/util/finder/ClassFinderFactory.java | 32 -
.../xwork2/util/finder/ClassLoaderInterface.java | 44 -
.../util/finder/ClassLoaderInterfaceDelegate.java | 60 -
.../xwork2/util/finder/ResourceFinder.java | 1404 ---------------
.../com/opensymphony/xwork2/util/finder/Test.java | 32 -
.../opensymphony/xwork2/util/finder/UrlSet.java | 295 ----
.../xwork2/util/fs/DefaultFileManager.java | 168 --
.../xwork2/util/fs/DefaultFileManagerFactory.java | 109 --
.../opensymphony/xwork2/util/fs/FileRevision.java | 71 -
.../xwork2/util/fs/JarEntryRevision.java | 73 -
.../com/opensymphony/xwork2/util/fs/Revision.java | 39 -
.../xwork2/util/fs/StrutsJarURLConnection.java | 187 --
.../xwork2/util/location/Locatable.java | 32 -
.../xwork2/util/location/LocatableProperties.java | 98 --
.../opensymphony/xwork2/util/location/Located.java | 46 -
.../xwork2/util/location/Location.java | 72 -
.../xwork2/util/location/LocationAttributes.java | 356 ----
.../xwork2/util/location/LocationImpl.java | 224 ---
.../xwork2/util/location/LocationUtils.java | 307 ----
.../util/reflection/ReflectionContextFactory.java | 33 -
.../util/reflection/ReflectionContextState.java | 173 --
.../util/reflection/ReflectionException.java | 59 -
.../reflection/ReflectionExceptionHandler.java | 32 -
.../xwork2/util/reflection/ReflectionProvider.java | 188 --
.../xwork2/validator/ActionValidatorManager.java | 90 -
.../AnnotationActionValidatorManager.java | 82 -
.../AnnotationValidationConfigurationBuilder.java | 952 ----------
.../validator/DefaultActionValidatorManager.java | 351 ----
.../xwork2/validator/DefaultValidatorFactory.java | 202 ---
.../validator/DefaultValidatorFileParser.java | 261 ---
.../validator/DelegatingValidatorContext.java | 402 -----
.../xwork2/validator/FieldValidator.java | 42 -
.../validator/ShortCircuitableValidator.java | 46 -
.../xwork2/validator/ValidationException.java | 46 -
.../xwork2/validator/ValidationInterceptor.java | 296 ----
.../opensymphony/xwork2/validator/Validator.java | 488 ------
.../xwork2/validator/ValidatorConfig.java | 173 --
.../xwork2/validator/ValidatorContext.java | 40 -
.../xwork2/validator/ValidatorFactory.java | 255 ---
.../xwork2/validator/ValidatorFileParser.java | 66 -
.../ConditionalVisitorFieldValidator.java | 184 --
.../annotations/ConversionErrorFieldValidator.java | 141 --
.../validator/annotations/CreditCardValidator.java | 68 -
.../validator/annotations/CustomValidator.java | 125 --
.../annotations/DateRangeFieldValidator.java | 201 ---
.../annotations/DoubleRangeFieldValidator.java | 235 ---
.../validator/annotations/EmailValidator.java | 135 --
.../validator/annotations/ExpressionValidator.java | 125 --
.../annotations/FieldExpressionValidator.java | 136 --
.../annotations/IntRangeFieldValidator.java | 196 ---
.../annotations/LongRangeFieldValidator.java | 196 ---
.../validator/annotations/RegexFieldValidator.java | 184 --
.../annotations/RequiredFieldValidator.java | 136 --
.../annotations/RequiredStringValidator.java | 150 --
.../annotations/ShortRangeFieldValidator.java | 194 ---
.../annotations/StringLengthFieldValidator.java | 205 ---
.../xwork2/validator/annotations/UrlValidator.java | 82 -
.../validator/annotations/ValidationParameter.java | 85 -
.../xwork2/validator/annotations/Validations.java | 197 ---
.../validator/annotations/ValidatorType.java | 36 -
.../annotations/VisitorFieldValidator.java | 167 --
.../ConditionalVisitorFieldValidator.java | 106 --
.../validators/ConversionErrorFieldValidator.java | 84 -
.../validator/validators/CreditCardValidator.java | 48 -
.../validators/DateRangeFieldValidator.java | 95 -
.../validators/DoubleRangeFieldValidator.java | 223 ---
.../validator/validators/EmailValidator.java | 90 -
.../validator/validators/ExpressionValidator.java | 87 -
.../validators/FieldExpressionValidator.java | 98 --
.../validators/FieldValidatorSupport.java | 62 -
.../validators/IntRangeFieldValidator.java | 86 -
.../validators/LongRangeFieldValidator.java | 85 -
.../validators/RangeValidatorSupport.java | 125 --
.../validator/validators/RegexFieldValidator.java | 241 ---
...pulateConversionErrorFieldValidatorSupport.java | 199 ---
.../validators/RequiredFieldValidator.java | 77 -
.../validators/RequiredStringValidator.java | 139 --
.../validators/ShortRangeFieldValidator.java | 85 -
.../validators/StringLengthFieldValidator.java | 201 ---
.../xwork2/validator/validators/URLValidator.java | 146 --
.../validator/validators/ValidatorSupport.java | 221 ---
.../validators/VisitorFieldValidator.java | 241 ---
core/src/main/java/org/apache/struts2/Action.java | 88 +
.../java/org/apache/struts2/ActionChainResult.java | 278 +++
.../java/org/apache/struts2/ActionContext.java | 542 ++++++
.../org/apache/struts2/ActionEventListener.java | 44 +
.../java/org/apache/struts2/ActionInvocation.java | 179 ++
.../main/java/org/apache/struts2/ActionProxy.java | 107 ++
.../org/apache/struts2/ActionProxyFactory.java | 85 +
.../java/org/apache/struts2/ActionSupport.java | 362 ++++
.../main/java/org/apache/struts2/AsyncManager.java | 35 +
.../org/apache/struts2/CompositeTextProvider.java | 295 ++++
.../apache/struts2/DefaultActionInvocation.java | 511 ++++++
.../org/apache/struts2/DefaultActionProxy.java | 222 +++
.../apache/struts2/DefaultActionProxyFactory.java | 87 +
.../org/apache/struts2/DefaultLocaleProvider.java | 68 +
.../struts2/DefaultLocaleProviderFactory.java | 28 +
.../org/apache/struts2/DefaultTextProvider.java | 157 ++
.../struts2/DefaultUnknownHandlerManager.java | 152 ++
.../main/java/org/apache/struts2/FileManager.java | 93 +
.../org/apache/struts2/FileManagerFactory.java | 32 +
.../java/org/apache/struts2/LocaleProvider.java | 77 +
.../org/apache/struts2/LocaleProviderFactory.java | 35 +
.../org/apache/struts2/LocalizedTextProvider.java | 49 +
.../main/java/org/apache/struts2/ModelDriven.java | 36 +
.../java/org/apache/struts2/ObjectFactory.java | 268 +++
.../main/java/org/apache/struts2/Preparable.java | 37 +
.../apache/struts2/ResourceBundleTextProvider.java | 51 +
core/src/main/java/org/apache/struts2/Result.java | 50 +
.../org/apache/struts2/ServletActionContext.java | 4 +-
.../java/org/apache/struts2/StrutsConstants.java | 29 +-
.../java/org/apache/struts2/StrutsException.java | 6 +-
.../java/org/apache/struts2/StrutsStatics.java | 10 +-
.../apache/struts2/StrutsTextProviderFactory.java | 87 +
.../main/java/org/apache/struts2/TextProvider.java | 189 ++
.../org/apache/struts2/TextProviderFactory.java | 29 +
.../org/apache/struts2/TextProviderSupport.java | 339 ++++
.../main/java/org/apache/struts2/Unchainable.java | 27 +
.../java/org/apache/struts2/UnknownHandler.java | 66 +
.../org/apache/struts2/UnknownHandlerManager.java | 50 +
.../main/java/org/apache/struts2/Validateable.java | 35 +
.../org/apache/struts2/ValidationAwareSupport.java | 183 ++
.../org/apache/struts2/XWorkJUnit4TestCase.java | 86 +
.../java/org/apache/struts2/XWorkTestCase.java | 144 ++
.../org/apache/struts2/action/CspReportAction.java | 2 +-
.../apache/struts2/components/ActionComponent.java | 14 +-
.../org/apache/struts2/components/ActionError.java | 2 +-
.../apache/struts2/components/ActionMessage.java | 2 +-
.../java/org/apache/struts2/components/Anchor.java | 4 +-
.../apache/struts2/components/AppendIterator.java | 2 +-
.../java/org/apache/struts2/components/Bean.java | 8 +-
.../org/apache/struts2/components/Checkbox.java | 4 +-
.../apache/struts2/components/CheckboxList.java | 2 +-
.../apache/struts2/components/ClosingUIBean.java | 2 +-
.../org/apache/struts2/components/ComboBox.java | 2 +-
.../org/apache/struts2/components/Component.java | 12 +-
.../struts2/components/ComponentUrlProvider.java | 2 +-
.../org/apache/struts2/components/ContextBean.java | 8 +-
.../java/org/apache/struts2/components/Date.java | 6 +-
.../apache/struts2/components/DateTextField.java | 2 +-
.../java/org/apache/struts2/components/Debug.java | 6 +-
.../struts2/components/DoubleListUIBean.java | 2 +-
.../apache/struts2/components/DoubleSelect.java | 2 +-
.../java/org/apache/struts2/components/Else.java | 2 +-
.../java/org/apache/struts2/components/ElseIf.java | 2 +-
.../org/apache/struts2/components/FieldError.java | 2 +-
.../java/org/apache/struts2/components/File.java | 2 +-
.../java/org/apache/struts2/components/Form.java | 30 +-
.../org/apache/struts2/components/FormButton.java | 2 +-
.../apache/struts2/components/GenericUIBean.java | 2 +-
.../java/org/apache/struts2/components/Head.java | 4 +-
.../java/org/apache/struts2/components/Hidden.java | 2 +-
.../java/org/apache/struts2/components/I18n.java | 15 +-
.../java/org/apache/struts2/components/If.java | 2 +-
.../org/apache/struts2/components/Include.java | 4 +-
.../struts2/components/InputTransferSelect.java | 2 +-
.../struts2/components/IteratorComponent.java | 4 +-
.../java/org/apache/struts2/components/Label.java | 2 +-
.../java/org/apache/struts2/components/Link.java | 2 +-
.../org/apache/struts2/components/ListUIBean.java | 2 +-
.../apache/struts2/components/MergeIterator.java | 2 +-
.../java/org/apache/struts2/components/Number.java | 4 +-
.../org/apache/struts2/components/OptGroup.java | 6 +-
.../struts2/components/OptionTransferSelect.java | 2 +-
.../java/org/apache/struts2/components/Param.java | 6 +-
.../org/apache/struts2/components/Password.java | 2 +-
.../org/apache/struts2/components/Property.java | 2 +-
.../java/org/apache/struts2/components/Push.java | 4 +-
.../java/org/apache/struts2/components/Radio.java | 2 +-
.../java/org/apache/struts2/components/Reset.java | 2 +-
.../java/org/apache/struts2/components/Script.java | 4 +-
.../java/org/apache/struts2/components/Select.java | 2 +-
.../struts2/components/ServletUrlRenderer.java | 10 +-
.../java/org/apache/struts2/components/Set.java | 2 +-
.../java/org/apache/struts2/components/Submit.java | 2 +-
.../java/org/apache/struts2/components/Text.java | 6 +-
.../org/apache/struts2/components/TextArea.java | 2 +-
.../org/apache/struts2/components/TextField.java | 2 +-
.../java/org/apache/struts2/components/Token.java | 2 +-
.../java/org/apache/struts2/components/UIBean.java | 8 +-
.../java/org/apache/struts2/components/URL.java | 4 +-
.../apache/struts2/components/UpDownSelect.java | 2 +-
.../org/apache/struts2/components/UrlProvider.java | 2 +-
.../components/date/DateTimeFormatterAdapter.java | 2 +-
.../components/date/SimpleDateFormatAdapter.java | 2 +-
.../components/template/BaseTemplateEngine.java | 2 +-
.../template/FreemarkerTemplateEngine.java | 10 +-
.../components/template/JspTemplateEngine.java | 4 +-
.../components/template/TemplateEngineManager.java | 6 +-
.../template/TemplateRenderingContext.java | 2 +-
.../config/AbstractBeanSelectionProvider.java | 17 +-
.../struts2/config/BeanSelectionProvider.java | 26 +
.../org/apache/struts2/config/Configuration.java | 95 +
.../struts2/config/ConfigurationException.java | 98 ++
.../struts2/config/ConfigurationManager.java | 232 +++
.../struts2/config/ConfigurationProvider.java | 25 +
.../apache/struts2/config/ConfigurationUtil.java | 97 ++
.../apache/struts2/config/ContainerProvider.java | 60 +
.../struts2/config/DefaultPropertiesProvider.java | 6 +-
.../org/apache/struts2/config/DefaultSettings.java | 6 +-
.../apache/struts2/config/DelegatingSettings.java | 2 +-
.../struts2/config/FileManagerFactoryProvider.java | 55 +
.../apache/struts2/config/FileManagerProvider.java | 57 +
.../java/org/apache/struts2/config/NullResult.java | 4 +-
.../org/apache/struts2/config/PackageProvider.java | 49 +
.../config/PropertiesConfigurationProvider.java | 10 +-
.../apache/struts2/config/PropertiesSettings.java | 8 +-
.../struts2/config/RuntimeConfiguration.java | 56 +
.../ServletContextAwareConfigurationProvider.java | 35 +
.../java/org/apache/struts2/config/Settings.java | 4 +-
.../config/StrutsBeanSelectionProvider.java | 154 +-
.../config/StrutsJavaConfigurationProvider.java | 24 +-
.../config/StrutsXmlConfigurationProvider.java | 21 +-
.../struts2/config/entities/ActionConfig.java | 373 ++++
.../struts2/config/entities/AllowedMethods.java | 220 +++
.../apache/struts2/config/entities/BeanConfig.java | 4 +-
.../config/entities/BeanSelectionConfig.java | 4 +-
.../config/entities/ExceptionMappingConfig.java | 179 ++
.../struts2/config/entities/InterceptorConfig.java | 162 ++
.../config/entities/InterceptorListHolder.java | 34 +
.../config/entities/InterceptorLocator.java | 32 +
.../config/entities/InterceptorMapping.java | 84 +
.../config/entities/InterceptorStackConfig.java | 201 +++
.../struts2/config/entities/PackageConfig.java | 648 +++++++
.../struts2/config/entities/Parameterizable.java | 45 +
.../struts2/config/entities/ResultConfig.java | 163 ++
.../struts2/config/entities/ResultTypeConfig.java | 160 ++
.../config/entities/UnknownHandlerConfig.java | 46 +
.../apache/struts2}/config/entities/package.html | 0
.../struts2/config/impl/AbstractMatcher.java | 227 +++
.../struts2/config/impl/ActionConfigMatcher.java | 153 ++
.../struts2/config/impl/DefaultConfiguration.java | 674 ++++++++
.../config/impl/LocatableConstantFactory.java | 50 +
.../struts2/config/impl/LocatableFactory.java | 64 +
.../struts2/config/impl/MockConfiguration.java | 132 ++
.../apache/struts2/config/impl/NamespaceMatch.java | 50 +
.../struts2/config/impl/NamespaceMatcher.java | 68 +
.../apache/struts2}/config/impl/package.html | 0
.../struts2/config/providers/CycleDetector.java | 77 +
.../struts2/config/providers/DirectedGraph.java | 162 ++
.../config/providers/EnvsValueSubstitutor.java | 52 +
.../config/providers/InterceptorBuilder.java | 218 +++
.../StrutsDefaultConfigurationProvider.java | 168 ++
.../struts2/config/providers/ValueSubstitutor.java | 28 +
.../config/providers/XmlConfigurationProvider.java | 246 +++
.../providers/XmlDocConfigurationProvider.java | 1013 +++++++++++
.../apache/struts2/config/providers/XmlHelper.java | 144 ++
.../apache/struts2}/config/providers/package.html | 0
.../conversion/ConversionAnnotationProcessor.java | 41 +
.../conversion/ConversionFileProcessor.java | 37 +
.../conversion/ConversionPropertiesProcessor.java | 40 +
.../org/apache/struts2/conversion/NullHandler.java | 57 +
.../struts2/conversion/ObjectTypeDeterminer.java | 44 +
.../StrutsConversionPropertiesProcessor.java | 10 +-
.../conversion/StrutsTypeConverterCreator.java | 6 +-
.../conversion/StrutsTypeConverterHolder.java | 3 -
.../apache/struts2/conversion/TypeConverter.java | 51 +
.../struts2/conversion/TypeConverterCreator.java | 44 +
.../struts2/conversion/TypeConverterHolder.java | 100 ++
.../struts2/conversion/UploadedFileConverter.java | 2 +-
.../struts2/conversion/annotations/Conversion.java | 102 ++
.../conversion/annotations/ConversionRule.java | 36 +
.../conversion/annotations/ConversionType.java | 37 +
.../conversion/annotations/TypeConversion.java | 213 +++
.../struts2}/conversion/annotations/package.html | 0
.../struts2/conversion/impl/ArrayConverter.java | 54 +
.../conversion/impl/CollectionConverter.java | 113 ++
.../struts2/conversion/impl/ConversionData.java | 46 +
.../struts2/conversion/impl/DateConverter.java | 257 +++
.../impl/DefaultConversionAnnotationProcessor.java | 119 ++
.../impl/DefaultConversionFileProcessor.java | 116 ++
.../impl/DefaultObjectTypeDeterminer.java | 296 ++++
.../conversion/impl/DefaultTypeConverter.java | 325 ++++
.../conversion/impl/InstantiatingNullHandler.java | 162 ++
.../struts2/conversion/impl/NumberConverter.java | 233 +++
.../struts2/conversion/impl/StringConverter.java | 100 ++
.../conversion/impl/XWorkBasicConverter.java | 219 +++
.../struts2/conversion/impl/XWorkConverter.java | 628 +++++++
.../apache/struts2/conversion/impl/XWorkList.java | 245 +++
.../apache/struts2/dispatcher/ContainerHolder.java | 2 +-
.../struts2/dispatcher/DefaultActionSupport.java | 4 +-
.../dispatcher/DefaultDispatcherErrorHandler.java | 6 +-
.../dispatcher/DefaultStaticContentLoader.java | 4 +-
.../org/apache/struts2/dispatcher/Dispatcher.java | 60 +-
.../apache/struts2/dispatcher/InitOperations.java | 2 +-
.../apache/struts2/dispatcher/MockDispatcher.java | 2 +-
.../struts2/dispatcher/PrepareOperations.java | 4 +-
.../struts2/dispatcher/StrutsRequestWrapper.java | 4 +-
.../struts2/dispatcher/mapper/ActionMapper.java | 2 +-
.../struts2/dispatcher/mapper/ActionMapping.java | 6 +-
.../dispatcher/mapper/CompositeActionMapper.java | 6 +-
.../dispatcher/mapper/DefaultActionMapper.java | 14 +-
.../dispatcher/mapper/PrefixBasedActionMapper.java | 6 +-
.../dispatcher/mapper/Restful2ActionMapper.java | 4 +-
.../dispatcher/mapper/RestfulActionMapper.java | 4 +-
.../multipart/AbstractMultiPartRequest.java | 2 +-
.../multipart/MultiPartRequestWrapper.java | 2 +-
.../org/apache/struts2/factory/ActionFactory.java | 45 +
.../apache/struts2/factory/ConverterFactory.java | 42 +
.../struts2/factory/DefaultActionFactory.java | 43 +
.../struts2/factory/DefaultInterceptorFactory.java | 99 ++
.../struts2/factory/DefaultResultFactory.java | 72 +
.../factory/DefaultUnknownHandlerFactory.java | 44 +
.../struts2/factory/DefaultValidatorFactory.java | 52 +
.../apache/struts2/factory/InterceptorFactory.java | 50 +
.../factory/PrefixBasedActionProxyFactory.java | 10 +-
.../org/apache/struts2/factory/ResultFactory.java | 33 +
.../apache/struts2/factory/StrutsActionProxy.java | 6 +-
.../struts2/factory/StrutsActionProxyFactory.java | 8 +-
.../struts2/factory/StrutsConverterFactory.java | 48 +
.../struts2/factory/StrutsResultFactory.java | 19 +-
.../struts2/factory/UnknownHandlerFactory.java | 42 +
.../apache/struts2/factory/ValidatorFactory.java | 43 +
.../apache/struts2/inject/ConstructionContext.java | 119 ++
.../java/org/apache/struts2/inject/Container.java | 133 ++
.../apache/struts2/inject/ContainerBuilder.java | 658 +++++++
.../org/apache/struts2/inject/ContainerImpl.java | 607 +++++++
.../java/org/apache/struts2/inject/Context.java | 57 +
.../apache/struts2/inject/DependencyException.java | 37 +
.../apache/struts2/inject/EarlyInitializable.java | 22 +
.../org/apache/struts2/inject/ExternalContext.java | 77 +
.../java/org/apache/struts2/inject/Factory.java | 41 +
.../org/apache/struts2/inject/Initializable.java | 34 +
.../struts2/inject/InitializableFactory.java | 56 +
.../java/org/apache/struts2/inject/Inject.java | 49 +
.../org/apache/struts2/inject/InternalContext.java | 77 +
.../org/apache/struts2/inject/InternalFactory.java | 42 +
.../main/java/org/apache/struts2/inject/Key.java | 80 +
.../main/java/org/apache/struts2/inject/Scope.java | 286 +++
.../java/org/apache/struts2/inject/Scoped.java | 38 +
.../org/apache/struts2/inject/package-info.java | 30 +
.../inject/util/FinalizablePhantomReference.java | 35 +
.../struts2/inject/util/FinalizableReference.java | 32 +
.../inject/util/FinalizableReferenceQueue.java | 77 +
.../inject/util/FinalizableSoftReference.java | 34 +
.../inject/util/FinalizableWeakReference.java | 34 +
.../org/apache/struts2/inject/util/Function.java | 44 +
.../apache/struts2/inject/util/ReferenceCache.java | 205 +++
.../apache/struts2/inject/util/ReferenceMap.java | 609 +++++++
.../apache/struts2/inject/util/ReferenceType.java | 55 +
.../apache/struts2}/inject/util/package.html | 0
.../interceptor/AbstractFileUploadInterceptor.java | 18 +-
.../struts2/interceptor/AbstractInterceptor.java | 64 +
.../interceptor/ActionFileUploadInterceptor.java | 11 +-
.../ActionMappingParametersInterceptor.java | 2 +-
.../struts2/interceptor/AliasInterceptor.java | 291 ++++
.../struts2/interceptor/ChainingInterceptor.java | 275 +++
.../struts2/interceptor/CheckboxInterceptor.java | 4 +-
.../interceptor/ClearSessionInterceptor.java | 8 +-
.../struts2/interceptor/CoepInterceptor.java | 8 +-
.../interceptor/ConditionalInterceptor.java | 39 +
.../interceptor/ConversionErrorInterceptor.java | 146 ++
.../struts2/interceptor/CookieInterceptor.java | 16 +-
.../interceptor/CookieProviderInterceptor.java | 8 +-
.../struts2/interceptor/CoopInterceptor.java | 8 +-
.../interceptor/CreateSessionInterceptor.java | 6 +-
.../interceptor/DateTextFieldInterceptor.java | 4 +-
.../interceptor/DefaultWorkflowInterceptor.java | 247 +++
.../struts2/interceptor/ExceptionHolder.java | 82 +
.../interceptor/ExceptionMappingInterceptor.java | 322 ++++
.../interceptor/ExecuteAndWaitInterceptor.java | 18 +-
.../interceptor/FetchMetadataInterceptor.java | 10 +-
.../struts2/interceptor/I18nInterceptor.java | 12 +-
.../apache/struts2/interceptor/Interceptor.java | 222 +++
.../struts2/interceptor/LoggingInterceptor.java | 90 +
.../interceptor/MessageStoreInterceptor.java | 8 +-
.../interceptor/MessageStorePreResultListener.java | 8 +-
.../interceptor/MethodFilterInterceptor.java | 123 ++
.../interceptor/MethodFilterInterceptorUtil.java | 144 ++
.../interceptor/ModelDrivenInterceptor.java | 147 ++
.../interceptor/MultiselectInterceptor.java | 6 +-
.../struts2/interceptor/NoOpInterceptor.java | 4 +-
.../interceptor/ParameterRemoverInterceptor.java | 124 ++
.../struts2/interceptor/PreResultListener.java | 41 +
.../interceptor/PrefixMethodInvocationUtil.java | 176 ++
.../struts2/interceptor/PrepareInterceptor.java | 178 ++
.../struts2/interceptor/RolesInterceptor.java | 4 +-
.../struts2/interceptor/ScopeInterceptor.java | 16 +-
.../struts2/interceptor/ScopedModelDriven.java | 43 +
.../interceptor/ScopedModelDrivenInterceptor.java | 164 ++
.../interceptor/ServletConfigInterceptor.java | 6 +-
.../interceptor/StaticParametersInterceptor.java | 241 +++
.../StrutsConversionErrorInterceptor.java | 8 +-
.../struts2/interceptor/TokenInterceptor.java | 14 +-
.../interceptor/TokenSessionStoreInterceptor.java | 8 +-
.../struts2/interceptor/ValidationAware.java | 131 ++
.../struts2/interceptor/ValidationErrorAware.java | 40 +
.../interceptor/ValidationWorkflowAware.java | 30 +
.../apache/struts2/interceptor/WithLazyParams.java | 78 +
.../struts2/interceptor/annotations/After.java | 84 +
.../annotations/AnnotationWorkflowInterceptor.java | 179 ++
.../struts2/interceptor/annotations/Before.java | 83 +
.../interceptor/annotations/BeforeResult.java | 83 +
.../interceptor/annotations/InputConfig.java | 95 +
.../struts2}/interceptor/annotations/package.html | 0
.../struts2/interceptor/csp/CspInterceptor.java | 8 +-
.../debugging/DebuggingInterceptor.java | 16 +-
.../interceptor/debugging/ObjectToHTMLWriter.java | 4 +-
.../interceptor/exec/BackgroundProcess.java | 2 +-
.../interceptor/exec/StrutsBackgroundProcess.java | 4 +-
.../httpmethod/HttpMethodInterceptor.java | 6 +-
.../apache/struts2}/interceptor/package.html | 0
.../parameter/ParametersInterceptor.java | 34 +-
.../interceptor/parameter/StrutsParameter.java | 2 +-
.../AnnotationValidationInterceptor.java | 6 +-
.../apache/struts2/mock/MockActionInvocation.java | 127 ++
.../org/apache/struts2/mock/MockActionProxy.java | 129 ++
.../org/apache/struts2/mock/MockContainer.java | 59 +
.../org/apache/struts2/mock/MockInterceptor.java | 111 ++
.../struts2/mock/MockObjectTypeDeterminer.java | 128 ++
.../java/org/apache/struts2/mock/MockResult.java | 61 +
.../apache/struts2}/mock/package.html | 0
.../apache/struts2/ognl/BeanInfoCacheFactory.java | 23 +
.../ognl/DefaultOgnlBeanInfoCacheFactory.java | 38 +
.../struts2/ognl/DefaultOgnlCacheFactory.java | 71 +
.../ognl/DefaultOgnlExpressionCacheFactory.java | 38 +
.../apache/struts2/ognl/ErrorMessageBuilder.java | 76 +
.../struts2/ognl/ExpressionCacheFactory.java | 23 +
.../java/org/apache/struts2/ognl/ObjectProxy.java | 57 +
.../java/org/apache/struts2/ognl/OgnlCache.java | 41 +
.../org/apache/struts2/ognl/OgnlCacheFactory.java | 46 +
.../org/apache/struts2/ognl/OgnlCaffeineCache.java | 78 +
.../org/apache/struts2/ognl/OgnlDefaultCache.java | 88 +
.../java/org/apache/struts2/ognl/OgnlGuard.java | 2 +-
.../java/org/apache/struts2/ognl/OgnlLRUCache.java | 89 +
.../struts2/ognl/OgnlNullHandlerWrapper.java | 44 +
.../struts2/ognl/OgnlReflectionContextFactory.java | 33 +
.../struts2/ognl/OgnlReflectionProvider.java | 161 ++
.../struts2/ognl/OgnlTypeConverterWrapper.java | 48 +
.../java/org/apache/struts2/ognl/OgnlUtil.java | 705 ++++++++
.../org/apache/struts2/ognl/OgnlValueStack.java | 524 ++++++
.../apache/struts2/ognl/OgnlValueStackFactory.java | 161 ++
.../apache/struts2/ognl/SecurityMemberAccess.java | 533 ++++++
.../org/apache/struts2/ognl/StrutsOgnlGuard.java | 6 +-
.../struts2/ognl/XWorkTypeConverterWrapper.java | 41 +
.../ognl/accessor/CompoundRootAccessor.java | 371 ++++
.../accessor/HttpParametersPropertyAccessor.java | 39 +
.../struts2/ognl/accessor/ObjectAccessor.java | 43 +
.../ognl/accessor/ObjectProxyPropertyAccessor.java | 84 +
.../ognl/accessor/ParameterPropertyAccessor.java | 48 +
.../apache/struts2/ognl/accessor/RootAccessor.java | 29 +
.../accessor/XWorkCollectionPropertyAccessor.java | 312 ++++
.../ognl/accessor/XWorkEnumerationAccessor.java | 39 +
.../accessor/XWorkIteratorPropertyAccessor.java | 39 +
.../ognl/accessor/XWorkListPropertyAccessor.java | 194 +++
.../ognl/accessor/XWorkMapPropertyAccessor.java | 162 ++
.../struts2/ognl/accessor/XWorkMethodAccessor.java | 140 ++
.../ognl/accessor/XWorkObjectPropertyAccessor.java | 43 +
.../xwork2 => org/apache/struts2}/package.html | 0
.../apache/struts2/result/HttpHeaderResult.java | 8 +-
.../struts2/result/ParamNameAwareResult.java | 28 +
.../org/apache/struts2/result/PlainResult.java | 4 +-
.../org/apache/struts2/result/PlainTextResult.java | 5 +-
.../org/apache/struts2/result/PostbackResult.java | 6 +-
.../result/ServletActionRedirectResult.java | 6 +-
.../struts2/result/ServletDispatcherResult.java | 4 +-
.../struts2/result/ServletRedirectResult.java | 12 +-
.../org/apache/struts2/result/StreamResult.java | 8 +-
.../apache/struts2/result/StrutsResultSupport.java | 24 +-
.../struts2/security/AcceptedPatternsChecker.java | 100 ++
.../security/DefaultAcceptedPatternsChecker.java | 138 ++
.../security/DefaultExcludedPatternsChecker.java | 121 ++
.../DefaultNotExcludedAcceptedPatternsChecker.java | 105 ++
.../struts2/security/ExcludedPatternsChecker.java | 100 ++
.../NotExcludedAcceptedPatternsChecker.java | 70 +
.../struts2/test/StubConfigurationProvider.java | 59 +
.../struts2/url/StrutsQueryStringBuilder.java | 2 +-
.../struts2/url/StrutsQueryStringParser.java | 2 +-
.../org/apache/struts2/url/StrutsUrlDecoder.java | 2 +-
.../org/apache/struts2/url/StrutsUrlEncoder.java | 2 +-
.../util/AbstractLocalizedTextProvider.java | 697 ++++++++
.../org/apache/struts2/util/AnnotationUtils.java | 211 +++
.../apache/struts2/util/AppendIteratorFilter.java | 2 +-
.../org/apache/struts2/util/ClassLoaderUtil.java | 285 +++
.../org/apache/struts2/util/ClassPathFinder.java | 193 +++
.../apache/struts2/util/ClearableValueStack.java | 30 +
.../java/org/apache/struts2/util/CompoundRoot.java | 60 +
.../org/apache/struts2/util/ConfigParseUtil.java | 105 ++
.../apache/struts2/util/ContentTypeMatcher.java | 2 +-
.../java/org/apache/struts2/util/CreateIfNull.java | 77 +
.../java/org/apache/struts2/util/DebugUtils.java | 53 +
.../struts2/util/DefaultContentTypeMatcher.java | 4 +-
.../java/org/apache/struts2/util/DomHelper.java | 397 +++++
.../main/java/org/apache/struts2/util/Element.java | 81 +
.../java/org/apache/struts2/util/Evaluated.java | 36 +
.../struts2/util/GlobalLocalizedTextProvider.java | 221 +++
.../struts2/util/InvocationSessionStore.java | 4 +-
.../org/apache/struts2/util/IteratorGenerator.java | 2 +-
.../src/main/java/org/apache/struts2/util/Key.java | 78 +
.../java/org/apache/struts2/util/KeyProperty.java | 80 +
.../struts2/util/MemberAccessValueStack.java | 34 +
.../apache/struts2/util/MergeIteratorFilter.java | 2 +-
.../struts2/util/NamedVariablePatternMatcher.java | 160 ++
.../org/apache/struts2/util/OgnlTextParser.java | 101 ++
.../org/apache/struts2/util/PatternMatcher.java | 58 +
.../org/apache/struts2/util/PropertiesReader.java | 556 ++++++
.../java/org/apache/struts2/util/ProxyUtil.java | 291 ++++
.../apache/struts2/util/RegexPatternMatcher.java | 2 +-
.../java/org/apache/struts2/util/ResolverUtil.java | 479 +++++
.../apache/struts2/util/SortIteratorFilter.java | 2 +-
.../struts2/util/StrutsLocalizedTextProvider.java | 382 ++++
.../apache/struts2/util/StrutsTestCaseHelper.java | 8 +-
.../apache/struts2/util/StrutsTypeConverter.java | 2 +-
.../java/org/apache/struts2/util/StrutsUtil.java | 8 +-
.../apache/struts2/util/SubsetIteratorFilter.java | 2 +-
.../org/apache/struts2/util/TextParseUtil.java | 291 ++++
.../java/org/apache/struts2/util/TextParser.java | 31 +
.../apache/struts2/util/TextProviderHelper.java | 4 +-
.../java/org/apache/struts2/util/TokenHelper.java | 4 +-
.../main/java/org/apache/struts2/util/URLBean.java | 2 +-
.../java/org/apache/struts2/util/ValueStack.java | 166 ++
.../org/apache/struts2/util/ValueStackFactory.java | 41 +
.../apache/struts2/util/ValueStackProvider.java | 2 +-
.../org/apache/struts2/util/WildcardHelper.java | 447 +++++
.../java/org/apache/struts2/util/WildcardUtil.java | 71 +
.../apache/struts2/util/XWorkTestCaseHelper.java | 88 +
.../util/classloader/AbstractResourceStore.java | 55 +
.../util/classloader/FileResourceStore.java | 61 +
.../struts2/util/classloader/JarResourceStore.java | 72 +
.../util/classloader/ReloadingClassLoader.java | 191 ++
.../struts2/util/classloader/ResourceStore.java | 30 +
.../util/classloader/ResourceStoreClassLoader.java | 99 ++
.../apache/struts2/util/finder/ClassFinder.java | 337 ++++
.../struts2/util/finder/ClassFinderFactory.java | 32 +
.../struts2/util/finder/ClassLoaderInterface.java | 44 +
.../util/finder/ClassLoaderInterfaceDelegate.java | 60 +
.../apache/struts2/util/finder/ResourceFinder.java | 1404 +++++++++++++++
.../java/org/apache/struts2/util/finder/Test.java | 32 +
.../org/apache/struts2/util/finder/UrlSet.java | 295 ++++
.../apache/struts2/util/fs/DefaultFileManager.java | 168 ++
.../struts2/util/fs/DefaultFileManagerFactory.java | 109 ++
.../org/apache/struts2/util/fs/FileRevision.java | 71 +
.../apache/struts2/util/fs/JBossFileManager.java | 4 -
.../apache/struts2/util/fs/JarEntryRevision.java | 73 +
.../java/org/apache/struts2/util/fs/Revision.java | 39 +
.../struts2/util/fs/StrutsJarURLConnection.java | 187 ++
.../apache/struts2/util/location/Locatable.java | 32 +
.../struts2/util/location/LocatableProperties.java | 98 ++
.../org/apache/struts2/util/location/Located.java | 46 +
.../org/apache/struts2/util/location/Location.java | 72 +
.../struts2/util/location/LocationAttributes.java | 356 ++++
.../apache/struts2/util/location/LocationImpl.java | 224 +++
.../struts2/util/location/LocationUtils.java | 307 ++++
.../apache/struts2}/util/location/package.html | 0
.../apache/struts2}/util/package.html | 0
.../util/reflection/ReflectionContextFactory.java | 33 +
.../util/reflection/ReflectionContextState.java | 173 ++
.../util/reflection/ReflectionException.java | 59 +
.../reflection/ReflectionExceptionHandler.java | 32 +
.../util/reflection/ReflectionProvider.java | 190 ++
.../struts2/validator/ActionValidatorManager.java | 90 +
.../AnnotationActionValidatorManager.java | 82 +
.../AnnotationValidationConfigurationBuilder.java | 952 ++++++++++
.../validator/DefaultActionValidatorManager.java | 351 ++++
.../struts2/validator/DefaultValidatorFactory.java | 202 +++
.../validator/DefaultValidatorFileParser.java | 261 +++
.../validator/DelegatingValidatorContext.java | 402 +++++
.../apache/struts2/validator/FieldValidator.java | 42 +
.../validator/ShortCircuitableValidator.java | 46 +
.../struts2/validator/ValidationException.java | 46 +
.../struts2/validator/ValidationInterceptor.java | 296 ++++
.../org/apache/struts2/validator/Validator.java | 488 ++++++
.../apache/struts2/validator/ValidatorConfig.java | 173 ++
.../apache/struts2/validator/ValidatorContext.java | 40 +
.../apache/struts2/validator/ValidatorFactory.java | 255 +++
.../struts2/validator/ValidatorFileParser.java | 66 +
.../ConditionalVisitorFieldValidator.java | 184 ++
.../annotations/ConversionErrorFieldValidator.java | 141 ++
.../validator/annotations/CreditCardValidator.java | 68 +
.../validator/annotations/CustomValidator.java | 125 ++
.../annotations/DateRangeFieldValidator.java | 201 +++
.../annotations/DoubleRangeFieldValidator.java | 235 +++
.../validator/annotations/EmailValidator.java | 135 ++
.../validator/annotations/ExpressionValidator.java | 125 ++
.../annotations/FieldExpressionValidator.java | 136 ++
.../annotations/IntRangeFieldValidator.java | 196 +++
.../annotations/LongRangeFieldValidator.java | 196 +++
.../validator/annotations/RegexFieldValidator.java | 184 ++
.../annotations/RequiredFieldValidator.java | 136 ++
.../annotations/RequiredStringValidator.java | 150 ++
.../annotations/ShortRangeFieldValidator.java | 194 +++
.../annotations/StringLengthFieldValidator.java | 205 +++
.../validator/annotations/UrlValidator.java | 82 +
.../validator/annotations/ValidationParameter.java | 85 +
.../struts2/validator/annotations/Validations.java | 197 +++
.../validator/annotations/ValidatorType.java | 36 +
.../annotations/VisitorFieldValidator.java | 167 ++
.../struts2}/validator/annotations/package.html | 0
.../apache/struts2}/validator/package.html | 0
.../ConditionalVisitorFieldValidator.java | 106 ++
.../validators/ConversionErrorFieldValidator.java | 84 +
.../validator/validators/CreditCardValidator.java | 48 +
.../validators/DateRangeFieldValidator.java | 95 +
.../validators/DoubleRangeFieldValidator.java | 223 +++
.../validator/validators/EmailValidator.java | 90 +
.../validator/validators/ExpressionValidator.java | 87 +
.../validators/FieldExpressionValidator.java | 98 ++
.../validators/FieldValidatorSupport.java | 62 +
.../validators/IntRangeFieldValidator.java | 86 +
.../validators/LongRangeFieldValidator.java | 85 +
.../validators/RangeValidatorSupport.java | 125 ++
.../validator/validators/RegexFieldValidator.java | 241 +++
...pulateConversionErrorFieldValidatorSupport.java | 199 +++
.../validators/RequiredFieldValidator.java | 77 +
.../validators/RequiredStringValidator.java | 139 ++
.../validators/ShortRangeFieldValidator.java | 85 +
.../validators/StringLengthFieldValidator.java | 201 +++
.../struts2/validator/validators/URLValidator.java | 146 ++
.../validator/validators/ValidatorSupport.java | 221 +++
.../validators/VisitorFieldValidator.java | 241 +++
.../struts2}/validator/validators/package.html | 0
.../apache/struts2/views/DefaultTagLibrary.java | 4 +-
.../struts2/views/TagLibraryModelProvider.java | 2 +-
.../views/freemarker/FreemarkerManager.java | 12 +-
.../struts2/views/freemarker/FreemarkerResult.java | 10 +-
.../freemarker/FreemarkerThemeTemplateLoader.java | 10 +-
.../struts2/views/freemarker/ScopesHashModel.java | 2 +-
.../freemarker/StrutsClassTemplateLoader.java | 2 +-
.../views/freemarker/tags/ActionErrorModel.java | 2 +-
.../views/freemarker/tags/ActionMessageModel.java | 2 +-
.../struts2/views/freemarker/tags/ActionModel.java | 2 +-
.../struts2/views/freemarker/tags/AnchorModel.java | 2 +-
.../struts2/views/freemarker/tags/BeanModel.java | 2 +-
.../views/freemarker/tags/CheckboxListModel.java | 2 +-
.../views/freemarker/tags/CheckboxModel.java | 2 +-
.../views/freemarker/tags/ComboBoxModel.java | 2 +-
.../views/freemarker/tags/ComponentModel.java | 2 +-
.../struts2/views/freemarker/tags/DateModel.java | 2 +-
.../views/freemarker/tags/DoubleSelectModel.java | 2 +-
.../struts2/views/freemarker/tags/ElseIfModel.java | 2 +-
.../struts2/views/freemarker/tags/ElseModel.java | 2 +-
.../views/freemarker/tags/FieldErrorModel.java | 2 +-
.../struts2/views/freemarker/tags/FileModel.java | 2 +-
.../struts2/views/freemarker/tags/FormModel.java | 2 +-
.../struts2/views/freemarker/tags/HeadModel.java | 2 +-
.../struts2/views/freemarker/tags/HiddenModel.java | 2 +-
.../struts2/views/freemarker/tags/I18nModel.java | 2 +-
.../struts2/views/freemarker/tags/IfModel.java | 2 +-
.../views/freemarker/tags/IncludeModel.java | 2 +-
.../freemarker/tags/InputTransferSelectModel.java | 2 +-
.../views/freemarker/tags/IteratorModel.java | 2 +-
.../struts2/views/freemarker/tags/LabelModel.java | 2 +-
.../struts2/views/freemarker/tags/LinkModel.java | 2 +-
.../views/freemarker/tags/OptGroupModel.java | 2 +-
.../freemarker/tags/OptionTransferSelectModel.java | 2 +-
.../struts2/views/freemarker/tags/ParamModel.java | 2 +-
.../views/freemarker/tags/PasswordModel.java | 2 +-
.../views/freemarker/tags/PropertyModel.java | 2 +-
.../struts2/views/freemarker/tags/PushModel.java | 2 +-
.../struts2/views/freemarker/tags/RadioModel.java | 2 +-
.../struts2/views/freemarker/tags/ResetModel.java | 2 +-
.../struts2/views/freemarker/tags/ScriptModel.java | 2 +-
.../struts2/views/freemarker/tags/SelectModel.java | 2 +-
.../struts2/views/freemarker/tags/SetModel.java | 2 +-
.../views/freemarker/tags/StrutsModels.java | 2 +-
.../struts2/views/freemarker/tags/SubmitModel.java | 2 +-
.../struts2/views/freemarker/tags/TagModel.java | 4 +-
.../views/freemarker/tags/TextAreaModel.java | 2 +-
.../views/freemarker/tags/TextFieldModel.java | 2 +-
.../struts2/views/freemarker/tags/TextModel.java | 2 +-
.../struts2/views/freemarker/tags/TokenModel.java | 2 +-
.../struts2/views/freemarker/tags/URLModel.java | 2 +-
.../views/freemarker/tags/UpDownSelectModel.java | 2 +-
.../org/apache/struts2/views/jsp/ActionTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/BeanTag.java | 2 +-
.../struts2/views/jsp/ComponentTagSupport.java | 4 +-
.../java/org/apache/struts2/views/jsp/DateTag.java | 2 +-
.../org/apache/struts2/views/jsp/ElseIfTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/ElseTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/I18nTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/IfTag.java | 2 +-
.../org/apache/struts2/views/jsp/IncludeTag.java | 2 +-
.../org/apache/struts2/views/jsp/IteratorTag.java | 2 +-
.../org/apache/struts2/views/jsp/NumberTag.java | 2 +-
.../org/apache/struts2/views/jsp/ParamTag.java | 2 +-
.../org/apache/struts2/views/jsp/PropertyTag.java | 6 +-
.../java/org/apache/struts2/views/jsp/PushTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/SetTag.java | 2 +-
.../struts2/views/jsp/StrutsBodyTagSupport.java | 4 +-
.../org/apache/struts2/views/jsp/TagUtils.java | 6 +-
.../java/org/apache/struts2/views/jsp/TextTag.java | 2 +-
.../java/org/apache/struts2/views/jsp/URLTag.java | 2 +-
.../views/jsp/iterator/AppendIteratorTag.java | 2 +-
.../views/jsp/iterator/MergeIteratorTag.java | 2 +-
.../struts2/views/jsp/ui/ActionErrorTag.java | 2 +-
.../struts2/views/jsp/ui/ActionMessageTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/AnchorTag.java | 2 +-
.../struts2/views/jsp/ui/CheckboxListTag.java | 2 +-
.../apache/struts2/views/jsp/ui/CheckboxTag.java | 2 +-
.../apache/struts2/views/jsp/ui/ComboBoxTag.java | 2 +-
.../apache/struts2/views/jsp/ui/ComponentTag.java | 2 +-
.../struts2/views/jsp/ui/DateTextFieldTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/DebugTag.java | 2 +-
.../struts2/views/jsp/ui/DoubleSelectTag.java | 2 +-
.../apache/struts2/views/jsp/ui/FieldErrorTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/FileTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/FormTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/HeadTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/HiddenTag.java | 2 +-
.../views/jsp/ui/InputTransferSelectTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/LabelTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/LinkTag.java | 2 +-
.../apache/struts2/views/jsp/ui/OptGroupTag.java | 2 +-
.../views/jsp/ui/OptionTransferSelectTag.java | 2 +-
.../apache/struts2/views/jsp/ui/PasswordTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/RadioTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/ResetTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/ScriptTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/SelectTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/SubmitTag.java | 2 +-
.../apache/struts2/views/jsp/ui/TextFieldTag.java | 2 +-
.../apache/struts2/views/jsp/ui/TextareaTag.java | 2 +-
.../org/apache/struts2/views/jsp/ui/TokenTag.java | 2 +-
.../struts2/views/jsp/ui/UpDownSelectTag.java | 2 +-
.../org/apache/struts2/views/util/ContextUtil.java | 4 +-
.../struts2/views/util/DefaultUrlHelper.java | 2 +-
.../xwork2/validator/validators/default.xml | 46 -
.../org/apache/struts2/default.properties | 8 +-
.../struts2/validator/validators/default.xml | 46 +
.../apache/struts2}/xwork-messages.properties | 0
core/src/main/resources/struts-beans.xml | 220 +--
core/src/main/resources/struts-default.xml | 26 +-
.../src/main/resources/struts-excluded-classes.xml | 23 +-
core/src/main/resources/xwork-default.xml | 48 +-
core/src/test/java/PackagelessAction.java | 2 +-
.../opensymphony/xwork2/ActionChainResultTest.java | 39 -
.../com/opensymphony/xwork2/ActionContextTest.java | 117 --
.../xwork2/ActionContextThreadLocalTest.java | 46 -
.../opensymphony/xwork2/ActionInvocationTest.java | 120 --
.../com/opensymphony/xwork2/ActionNestingTest.java | 152 --
.../com/opensymphony/xwork2/ActionSupportTest.java | 347 ----
.../com/opensymphony/xwork2/AnnotatedTestBean.java | 92 -
.../com/opensymphony/xwork2/ChainResultTest.java | 197 ---
.../xwork2/CompositeTextProviderTest.java | 114 --
.../xwork2/DefaultActionInvocationTest.java | 566 ------
.../xwork2/DefaultActionProxyTest.java | 42 -
.../com/opensymphony/xwork2/DefaultClasstTest.java | 63 -
.../xwork2/DefaultLocaleProviderTest.java | 174 --
.../xwork2/DefaultTextProviderTest.java | 147 --
.../xwork2/DefaultUnknownHandlerManagerTest.java | 83 -
.../xwork2/ExternalReferenceAction.java | 43 -
.../src/test/java/com/opensymphony/xwork2/Foo.java | 38 -
.../java/com/opensymphony/xwork2/GenericsBean.java | 75 -
.../com/opensymphony/xwork2/LocaleAwareTest.java | 75 -
.../opensymphony/xwork2/LocaleProviderTest.java | 82 -
.../com/opensymphony/xwork2/ModelDrivenAction.java | 52 -
.../xwork2/ModelDrivenAnnotationAction.java | 52 -
.../java/com/opensymphony/xwork2/NestedAction.java | 70 -
.../com/opensymphony/xwork2/ObjectFactoryTest.java | 46 -
.../opensymphony/xwork2/ProxyInvocationAction.java | 30 -
.../xwork2/ProxyInvocationInterface.java | 26 -
.../opensymphony/xwork2/ProxyInvocationTest.java | 71 -
.../opensymphony/xwork2/ProxyObjectFactory.java | 67 -
.../java/com/opensymphony/xwork2/SimpleAction.java | 285 ---
.../xwork2/SimpleAnnotationAction.java | 250 ---
.../com/opensymphony/xwork2/SimpleFooAction.java | 44 -
.../com/opensymphony/xwork2/StubTextProvider.java | 96 --
.../com/opensymphony/xwork2/StubValueStack.java | 112 --
.../java/com/opensymphony/xwork2/TestBean.java | 74 -
.../com/opensymphony/xwork2/TestChildBean.java | 65 -
.../xwork2/TextProviderSupportTest.java | 141 --
.../xwork2/UnknownHandlerManagerMock.java | 33 -
.../xwork2/UserSpecifiedDefaultAction.java | 28 -
.../opensymphony/xwork2/ValidationOrderAction.java | 194 ---
.../java/com/opensymphony/xwork2/VoidResult.java | 41 -
.../opensymphony/xwork2/WildCardResultTest.java | 60 -
.../xwork2/config/ConfigurationManagerTest.java | 176 --
.../xwork2/config/ConfigurationTest.java | 371 ----
.../xwork2/config/entities/ActionConfigTest.java | 47 -
.../xwork2/config/entities/AllowedMethodsTest.java | 120 --
.../xwork2/config/entities/PackageConfigTest.java | 95 -
.../xwork2/config/impl/AbstractMatcherTest.java | 57 -
.../config/impl/ActionConfigMatcherTest.java | 257 ---
.../xwork2/config/impl/NamespaceMatcherTest.java | 44 -
.../ConfigurationProviderOgnlAllowlistTest.java | 114 --
.../config/providers/ConfigurationTestBase.java | 45 -
.../config/providers/EnvsValueSubstitutorTest.java | 67 -
.../config/providers/InterceptorBuilderTest.java | 288 ----
.../providers/InterceptorForTestPurpose.java | 49 -
.../providers/MockConfigurationProvider.java | 209 ---
.../providers/NoNoArgsConstructorAction.java | 44 -
.../config/providers/PrivateConstructorAction.java | 48 -
.../config/providers/SomeUnknownHandler.java | 51 -
.../XmlConfigurationProviderActionsTest.java | 221 ---
...XmlConfigurationProviderAllowedMethodsTest.java | 163 --
...lConfigurationProviderEnvsSubstitutionTest.java | 68 -
...ConfigurationProviderExceptionMappingsTest.java | 83 -
...urationProviderGlobalResultInheritenceTest.java | 72 -
...tionProviderInterceptorParamOverridingTest.java | 105 --
...roviderInterceptorStackParamOverridingTest.java | 108 --
...onfigurationProviderInterceptorsSpringTest.java | 83 -
.../XmlConfigurationProviderInterceptorsTest.java | 234 ---
.../XmlConfigurationProviderInvalidFileTest.java | 43 -
.../XmlConfigurationProviderMultilevelTest.java | 73 -
.../XmlConfigurationProviderPackagesTest.java | 204 ---
.../XmlConfigurationProviderResultTypesTest.java | 122 --
.../XmlConfigurationProviderResultsTest.java | 178 --
.../providers/XmlConfigurationProviderTest.java | 1101 ------------
...nfigurationProviderUnknownHandlerStackTest.java | 58 -
...mlConfigurationProviderWildCardIncludeTest.java | 55 -
.../xwork2/config/providers/XmlHelperTest.java | 203 ---
.../xwork2/conversion/ConversionTestAction.java | 101 --
.../impl/AnnotationXWorkConverterTest.java | 483 ------
.../xwork2/conversion/impl/DateConverterTest.java | 203 ---
.../xwork2/conversion/impl/FooBarConverter.java | 75 -
.../xwork2/conversion/impl/FooNumberConverter.java | 36 -
.../impl/InstantiatingNullHandlerTest.java | 57 -
.../conversion/impl/NumberConverterTest.java | 305 ----
.../xwork2/conversion/impl/ParentClass.java | 45 -
.../conversion/impl/StringConverterTest.java | 129 --
.../conversion/impl/XWorkBasicConverterTest.java | 420 -----
.../xwork2/conversion/impl/XWorkConverterTest.java | 802 ---------
.../xwork2/conversion/impl/XWorkListTest.java | 89 -
.../xwork2/inject/ContainerImplTest.java | 335 ----
.../xwork2/inject/EarlyInitializableBean.java | 34 -
.../xwork2/inject/InitializableBean.java | 34 -
.../xwork2/interceptor/AliasInterceptorTest.java | 259 ---
.../interceptor/ChainingInterceptorTest.java | 170 --
.../ChainingInterceptorWithConfigTest.java | 127 --
.../ConversionErrorInterceptorTest.java | 150 --
.../DefaultWorkflowInterceptorTest.java | 207 ---
.../ExceptionMappingInterceptorTest.java | 311 ----
.../MethodFilterInterceptorUtilTest.java | 86 -
.../interceptor/ModelDrivenInterceptorTest.java | 189 --
.../ParameterRemoverInterceptorTest.java | 131 --
.../xwork2/interceptor/PreResultListenerTest.java | 120 --
.../PrefixMethodInvocationUtilTest.java | 268 ---
.../xwork2/interceptor/PrepareInterceptorTest.java | 212 ---
.../ScopedModelDrivenInterceptorTest.java | 253 ---
.../StaticParametersInterceptorTest.java | 258 ---
.../interceptor/ValidationErrorAwareTest.java | 111 --
...ationInterceptorPrefixMethodInvocationTest.java | 108 --
.../interceptor/annotations/AnnotatedAction.java | 49 -
.../AnnotationWorkflowInterceptorTest.java | 112 --
.../annotations/BaseAnnotatedAction.java | 67 -
.../annotations/InterfaceAnnotatedAction.java | 30 -
.../annotations/ShortcircuitedAction.java | 38 -
.../xwork2/mock/DummyTextProvider.java | 87 -
.../opensymphony/xwork2/mock/InjectableAction.java | 36 -
.../xwork2/mock/MockLazyInterceptor.java | 42 -
.../com/opensymphony/xwork2/ognl/MyCustomMap.java | 28 -
.../xwork2/ognl/OgnlUtilStrutsTest.java | 48 -
.../com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 1823 --------------------
.../xwork2/ognl/OgnlValueStackTest.java | 1364 ---------------
.../xwork2/ognl/SecurityMemberAccessTest.java | 1132 ------------
.../xwork2/ognl/SetPropertiesTest.java | 382 ----
.../accessor/XWorkListPropertyAccessorTest.java | 88 -
.../accessor/XWorkMapPropertyAccessorTest.java | 72 -
.../DefaultAcceptedPatternsCheckerTest.java | 264 ---
.../DefaultExcludedPatternsCheckerTest.java | 248 ---
...aultNotExcludedAcceptedPatternsCheckerTest.java | 91 -
.../xwork2/test/AnnotationDataAware.java | 48 -
.../xwork2/test/AnnotationDataAware2.java | 36 -
.../xwork2/test/AnnotationTestBean2.java | 67 -
.../opensymphony/xwork2/test/AnnotationUser.java | 109 --
.../xwork2/test/AnnotationUserMarker.java | 38 -
.../com/opensymphony/xwork2/test/DataAware.java | 38 -
.../com/opensymphony/xwork2/test/DataAware2.java | 32 -
.../java/com/opensymphony/xwork2/test/Equidae.java | 55 -
.../xwork2/test/ModelDrivenAction2.java | 43 -
.../xwork2/test/ModelDrivenAnnotationAction2.java | 44 -
.../opensymphony/xwork2/test/SimpleAction2.java | 43 -
.../opensymphony/xwork2/test/SimpleAction3.java | 57 -
.../xwork2/test/SimpleAnnotationAction2.java | 47 -
.../xwork2/test/SimpleAnnotationAction3.java | 58 -
.../opensymphony/xwork2/test/TestArrayBean.java | 35 -
.../com/opensymphony/xwork2/test/TestBean2.java | 61 -
.../java/com/opensymphony/xwork2/test/User.java | 94 -
.../com/opensymphony/xwork2/test/UserMarker.java | 28 -
.../xwork2/test/annotations/Address.java | 58 -
.../test/annotations/AddressTypeConverter.java | 47 -
.../xwork2/test/annotations/Person.java | 40 -
.../xwork2/test/annotations/PersonAction.java | 65 -
.../xwork2/test/annotations/PersonActionTest.java | 105 --
.../test/annotations/PersonTypeConverter.java | 45 -
.../ValidateAnnotatedMethodOnlyAction.java | 71 -
.../xwork2/test/subtest/NullModelDrivenAction.java | 37 -
.../java/com/opensymphony/xwork2/util/Animal.java | 23 -
.../com/opensymphony/xwork2/util/AnnotatedCat.java | 68 -
.../xwork2/util/AnnotationUtilsTest.java | 70 -
.../java/com/opensymphony/xwork2/util/Bar.java | 67 -
.../com/opensymphony/xwork2/util/BarJunior.java | 22 -
.../java/com/opensymphony/xwork2/util/Cat.java | 61 -
.../xwork2/util/ClassLoaderUtilTest.java | 127 --
.../xwork2/util/ClassPathFinderTest.java | 108 --
.../xwork2/util/DefaultFileManagerTest.java | 207 ---
.../java/com/opensymphony/xwork2/util/Dog.java | 126 --
.../opensymphony/xwork2/util/DomHelperTest.java | 77 -
.../xwork2/util/DummyObjectFactory.java | 25 -
.../java/com/opensymphony/xwork2/util/Foo.java | 260 ---
.../com/opensymphony/xwork2/util/FurColor.java | 23 -
.../xwork2/util/GetPropertiesTest.java | 52 -
.../java/com/opensymphony/xwork2/util/Indexed.java | 59 -
.../com/opensymphony/xwork2/util/ListHolder.java | 55 -
.../java/com/opensymphony/xwork2/util/MyBean.java | 57 -
.../com/opensymphony/xwork2/util/MyBeanAction.java | 89 -
.../opensymphony/xwork2/util/MyBeanActionTest.java | 138 --
.../com/opensymphony/xwork2/util/MyNumber.java | 22 -
.../util/NamedVariablePatternMatcherTest.java | 117 --
.../java/com/opensymphony/xwork2/util/Owner.java | 40 -
.../opensymphony/xwork2/util/ResolverUtilTest.java | 63 -
.../util/StrutsLocalizedTextProviderTest.java | 631 -------
.../xwork2/util/TextParseUtilTest.java | 217 ---
.../java/com/opensymphony/xwork2/util/Tiger.java | 42 -
.../xwork2/util/UnknownHandlerManagerTest.java | 105 --
.../com/opensymphony/xwork2/util/UrlUtilTest2.java | 53 -
.../xwork2/util/WildcardHelperTest.java | 57 -
.../opensymphony/xwork2/util/WildcardUtilTest.java | 57 -
.../xwork2/util/annotation/Dummy2Class.java | 27 -
.../xwork2/util/annotation/Dummy3Class.java | 25 -
.../xwork2/util/annotation/DummyClass.java | 32 -
.../xwork2/util/annotation/DummyClassExt.java | 26 -
.../xwork2/util/annotation/MyAnnotation.java | 29 -
.../xwork2/util/annotation/MyAnnotation2.java | 28 -
.../xwork2/util/annotation/package-info.java | 20 -
.../pkg1/AbstractAbstractDummyAction.java | 25 -
.../util/annotation/pkg1/AbstractDummyAction.java | 22 -
.../annotation/pkg2/Package2DummyInterface.java | 25 -
.../xwork2/util/annotation/pkg2/package-info.java | 23 -
.../util/fs/DefaultFileManagerFactoryTest.java | 153 --
.../xwork2/util/fs/JarEntryRevisionTest.java | 165 --
.../util/location/LocationAttributesTest.java | 90 -
.../xwork2/util/location/LocationImplTest.java | 90 -
.../xwork2/util/location/LocationUtilsTest.java | 89 -
.../validator/ActionValidatorManagerTest.java | 239 ---
.../AnnotationActionValidatorManagerTest.java | 419 -----
.../validator/AnnotationValidationAction.java | 95 -
...notationValidationConfigurationBuilderTest.java | 354 ----
.../validator/AnnotationValidationExpAction.java | 158 --
.../ConversionErrorFieldValidatorTest.java | 89 -
.../xwork2/validator/DateRangeValidatorTest.java | 87 -
.../DefaultActionValidatorManagerTest.java | 377 ----
.../validator/DefaultValidatorFactoryTest.java | 41 -
.../validator/DefaultValidatorFileParserTest.java | 218 ---
.../validator/DoubleRangeFieldValidatorTest.java | 370 ----
.../xwork2/validator/DummyValidatorContext.java | 147 --
.../xwork2/validator/EmailValidatorTest.java | 170 --
.../xwork2/validator/ExpressionValidatorTest.java | 146 --
.../xwork2/validator/IntRangeValidatorTest.java | 70 -
.../xwork2/validator/LongRangeValidatorTest.java | 67 -
.../validator/ModelDrivenValidationTest.java | 61 -
.../opensymphony/xwork2/validator/MyValidator.java | 114 --
.../xwork2/validator/RegexFieldValidatorTest.java | 256 ---
...teConversionErrorFieldValidatorSupportTest.java | 135 --
.../xwork2/validator/ShortRangeValidatorTest.java | 67 -
.../validator/SimpleActionValidationTest.java | 253 ---
.../validator/StringLengthFieldValidatorTest.java | 275 ---
.../xwork2/validator/StringValidatorTest.java | 225 ---
.../xwork2/validator/URLValidatorTest.java | 353 ----
.../xwork2/validator/ValidatorAnnotationTest.java | 130 --
.../validator/VisitorFieldValidatorModelTest.java | 126 --
.../validator/VisitorFieldValidatorTest.java | 236 ---
.../validator/VisitorValidatorModelAction.java | 41 -
.../validator/VisitorValidatorTestAction.java | 97 --
.../validators/AppendingValidatorContextTest.java | 80 -
.../validators/CreditCardValidatorTest.java | 248 ---
.../validators/DateRangeFieldValidatorTest.java | 117 --
.../validators/IntRangeFieldValidatorTest.java | 125 --
.../validators/LongRangeFieldValidatorTest.java | 102 --
.../validators/RequiredFieldValidatorTest.java | 96 --
.../validators/RequiredStringValidatorTest.java | 153 --
.../validators/ShortRangeFieldValidatorTest.java | 102 --
.../validator/validators/ValidationAction.java | 193 ---
.../validator/validators/ValidatorSupportTest.java | 46 -
.../com/test/ExternalSecurityMemberAccess.java | 35 -
.../com/test/ExternalSecurityMemberAccessTest.java | 33 -
.../org/apache/struts2/ActionChainResultTest.java | 39 +
.../java/org/apache/struts2/ActionContextTest.java | 117 ++
.../struts2/ActionContextThreadLocalTest.java | 46 +
.../org/apache/struts2/ActionInvocationTest.java | 120 ++
.../java/org/apache/struts2/ActionNestingTest.java | 151 ++
.../java/org/apache/struts2/ActionSupportTest.java | 347 ++++
.../java/org/apache/struts2/AnnotatedTestBean.java | 91 +
.../java/org/apache/struts2/ChainResultTest.java | 197 +++
.../apache/struts2/CompositeTextProviderTest.java | 114 ++
.../struts2/DefaultActionInvocationTest.java | 566 ++++++
.../org/apache/struts2/DefaultActionProxyTest.java | 42 +
.../java/org/apache/struts2/DefaultClasstTest.java | 63 +
.../apache/struts2/DefaultLocaleProviderTest.java | 174 ++
.../apache/struts2/DefaultTextProviderTest.java | 147 ++
.../struts2/DefaultUnknownHandlerManagerTest.java | 83 +
.../apache/struts2/ExecutionCountTestAction.java | 2 +-
.../apache/struts2/ExternalReferenceAction.java | 43 +
core/src/test/java/org/apache/struts2/Foo.java | 38 +
.../test/java/org/apache/struts2/GenericsBean.java | 75 +
.../org/apache/struts2/HttpMethodsTestAction.java | 2 +-
.../java/org/apache/struts2/LocaleAwareTest.java | 75 +
.../org/apache/struts2/LocaleProviderTest.java | 82 +
.../java/org/apache/struts2/ModelDrivenAction.java | 52 +
.../struts2/ModelDrivenAnnotationAction.java | 52 +
.../test/java/org/apache/struts2/NestedAction.java | 70 +
.../java/org/apache/struts2/ObjectFactoryTest.java | 45 +
.../org/apache/struts2/ProxyInvocationAction.java | 30 +
.../apache/struts2/ProxyInvocationInterface.java | 26 +
.../org/apache/struts2/ProxyInvocationTest.java | 71 +
.../org/apache/struts2/ProxyObjectFactory.java | 67 +
.../apache/struts2/ServletActionContextTest.java | 2 +-
.../test/java/org/apache/struts2/SimpleAction.java | 285 +++
.../org/apache/struts2/SimpleAnnotationAction.java | 250 +++
.../java/org/apache/struts2/SimpleFooAction.java | 44 +
.../org/apache/struts2/StrutsExceptionTest.java | 4 +-
.../org/apache/struts2/StrutsInternalTestCase.java | 4 +-
.../struts2/StrutsJUnit4InternalTestCase.java | 4 +-
.../java/org/apache/struts2/StubTextProvider.java | 96 ++
.../java/org/apache/struts2/StubValueStack.java | 112 ++
.../test/java/org/apache/struts2/TestAction.java | 14 +-
.../org/apache/struts2/TestActionTagResult.java | 4 +-
.../src/test/java/org/apache/struts2/TestBean.java | 74 +
.../java/org/apache/struts2/TestChildBean.java | 65 +
.../apache/struts2/TestConfigurationProvider.java | 38 +-
.../test/java/org/apache/struts2/TestResult.java | 8 +-
.../apache/struts2/TextProviderSupportTest.java | 141 ++
.../apache/struts2/UnknownHandlerManagerMock.java | 33 +
.../apache/struts2/UserSpecifiedDefaultAction.java | 28 +
.../org/apache/struts2/ValidationOrderAction.java | 194 +++
.../test/java/org/apache/struts2/VoidResult.java | 41 +
.../org/apache/struts2/WildCardResultTest.java | 60 +
.../apache/struts2/action/CspReportActionTest.java | 2 +-
.../struts2/components/ActionComponentTest.java | 4 +-
.../apache/struts2/components/ComponentTest.java | 2 +-
.../org/apache/struts2/components/DateTest.java | 6 +-
.../apache/struts2/components/FormButtonTest.java | 6 +-
.../org/apache/struts2/components/FormTest.java | 22 +-
.../struts2/components/IteratorComponentTest.java | 6 +-
.../apache/struts2/components/PropertyTest.java | 6 +-
.../org/apache/struts2/components/UIBeanTest.java | 8 +-
.../apache/struts2/components/UIComponentTest.java | 2 +-
.../struts2/config/ConfigurationManagerTest.java | 177 ++
.../apache/struts2/config/ConfigurationTest.java | 370 ++++
.../PropertiesConfigurationProviderTest.java | 6 +-
.../org/apache/struts2/config/SettingsTest.java | 2 +-
.../config/StrutsBeanSelectionProviderTest.java | 14 +-
.../StrutsJavaConfigurationProviderTest.java | 14 +-
.../struts2/config/TestBeanSelectionProvider.java | 10 +-
.../org/apache/struts2/config/TestSettings.java | 2 +-
.../struts2/config/entities/ActionConfigTest.java | 47 +
.../config/entities/AllowedMethodsTest.java | 120 ++
.../struts2/config/entities/BeanConfigTest.java | 6 +-
.../config/entities/ConstantConfigTest.java | 4 +-
.../struts2/config/entities/PackageConfigTest.java | 95 +
.../struts2/config/impl/AbstractMatcherTest.java | 57 +
.../config/impl/ActionConfigMatcherTest.java | 257 +++
.../struts2/config/impl/NamespaceMatcherTest.java | 44 +
.../ConfigurationProviderOgnlAllowlistTest.java | 114 ++
.../config/providers/ConfigurationTestBase.java | 45 +
.../config/providers/EnvsValueSubstitutorTest.java | 67 +
.../config/providers/InterceptorBuilderTest.java | 288 ++++
.../providers/InterceptorForTestPurpose.java | 49 +
.../providers/MockConfigurationProvider.java | 209 +++
.../providers/NoNoArgsConstructorAction.java | 44 +
.../config/providers/PrivateConstructorAction.java | 48 +
.../config/providers/SomeUnknownHandler.java | 51 +
.../XmlConfigurationProviderActionsTest.java | 224 +++
...XmlConfigurationProviderAllowedMethodsTest.java | 163 ++
...lConfigurationProviderEnvsSubstitutionTest.java | 68 +
...ConfigurationProviderExceptionMappingsTest.java | 83 +
...urationProviderGlobalResultInheritenceTest.java | 72 +
...tionProviderInterceptorParamOverridingTest.java | 105 ++
...roviderInterceptorStackParamOverridingTest.java | 108 ++
...onfigurationProviderInterceptorsSpringTest.java | 83 +
.../XmlConfigurationProviderInterceptorsTest.java | 234 +++
.../XmlConfigurationProviderInvalidFileTest.java | 43 +
.../XmlConfigurationProviderMultilevelTest.java | 73 +
.../XmlConfigurationProviderPackagesTest.java | 204 +++
.../XmlConfigurationProviderResultTypesTest.java | 122 ++
.../XmlConfigurationProviderResultsTest.java | 178 ++
.../providers/XmlConfigurationProviderTest.java | 1101 ++++++++++++
...nfigurationProviderUnknownHandlerStackTest.java | 58 +
...mlConfigurationProviderWildCardIncludeTest.java | 55 +
.../struts2/config/providers/XmlHelperTest.java | 203 +++
.../struts2/conversion/ConversionTestAction.java | 101 ++
.../impl/AnnotationXWorkConverterTest.java | 481 ++++++
.../struts2/conversion/impl/DateConverterTest.java | 203 +++
.../struts2/conversion/impl/FooBarConverter.java | 69 +
.../conversion/impl/FooNumberConverter.java | 36 +
.../impl/InstantiatingNullHandlerTest.java | 57 +
.../conversion/impl/NumberConverterTest.java | 305 ++++
.../struts2/conversion/impl/ParentClass.java | 45 +
.../conversion/impl/StringConverterTest.java | 129 ++
.../conversion/impl/XWorkBasicConverterTest.java | 420 +++++
.../conversion/impl/XWorkConverterTest.java | 809 +++++++++
.../struts2/conversion/impl/XWorkListTest.java | 89 +
.../apache/struts2/dispatcher/DispatcherTest.java | 32 +-
.../struts2/dispatcher/NullActionMapper.java | 2 +-
.../struts2/dispatcher/PrepareOperationsTest.java | 4 +-
...rutsPrepareAndExecuteFilterIntegrationTest.java | 2 +-
.../dispatcher/TwoFilterIntegrationTest.java | 2 +-
.../mapper/CompositeActionMapperTest.java | 14 +-
.../dispatcher/mapper/DefaultActionMapperTest.java | 74 +-
.../mapper/Restful2ActionMapperTest.java | 10 +-
.../factory/PrefixBasedActionProxyFactoryTest.java | 24 +-
.../struts2/factory/StrutsResultFactoryTest.java | 11 +-
.../apache/struts2/inject/ContainerImplTest.java | 335 ++++
.../struts2/inject/EarlyInitializableBean.java | 34 +
.../apache/struts2/inject/InitializableBean.java | 34 +
.../ActionFileUploadInterceptorTest.java | 14 +-
.../ActionMappingParametersInterceptorTest.java | 8 +-
.../struts2/interceptor/AliasInterceptorTest.java | 259 +++
.../interceptor/ChainingInterceptorTest.java | 172 ++
.../ChainingInterceptorWithConfigTest.java | 127 ++
.../interceptor/CheckboxInterceptorTest.java | 6 +-
.../interceptor/ClearSessionInterceptorTest.java | 4 +-
.../struts2/interceptor/CoepInterceptorTest.java | 4 +-
.../ConversionErrorInterceptorTest.java | 152 ++
.../struts2/interceptor/CookieInterceptorTest.java | 14 +-
.../interceptor/CookieProviderInterceptorTest.java | 4 +-
.../struts2/interceptor/CoopInterceptorTest.java | 4 +-
.../interceptor/CreateSessionInterceptorTest.java | 4 +-
.../struts2/interceptor/CspInterceptorTest.java | 6 +-
.../interceptor/DateTextFieldInterceptorTest.java | 4 +-
.../DefaultWorkflowInterceptorTest.java | 213 +++
.../ExceptionMappingInterceptorTest.java | 312 ++++
.../interceptor/ExecuteAndWaitDelayAction.java | 2 +-
.../interceptor/ExecuteAndWaitInterceptorTest.java | 34 +-
.../interceptor/FetchMetadataInterceptorTest.java | 19 +-
.../struts2/interceptor/I18nInterceptorTest.java | 12 +-
.../interceptor/MessageStoreInterceptorTest.java | 8 +-
.../MessageStorePreResultListenerTest.java | 16 +-
.../MethodFilterInterceptorUtilTest.java | 86 +
.../interceptor/ModelDrivenInterceptorTest.java | 189 ++
.../interceptor/MultiselectInterceptorTest.java | 4 +-
.../ParameterRemoverInterceptorTest.java | 128 ++
.../struts2/interceptor/PreResultListenerTest.java | 127 ++
.../PrefixMethodInvocationUtilTest.java | 268 +++
.../interceptor/PrepareInterceptorTest.java | 219 +++
.../ScopedModelDrivenInterceptorTest.java | 253 +++
.../interceptor/ServletConfigInterceptorTest.java | 6 +-
.../StaticParametersInterceptorTest.java | 258 +++
.../StrutsConversionErrorInterceptorTest.java | 12 +-
.../struts2/interceptor/TokenInterceptorTest.java | 8 +-
.../TokenSessionStoreInterceptorTest.java | 4 +-
.../interceptor/ValidationErrorAwareTest.java | 111 ++
...ationInterceptorPrefixMethodInvocationTest.java | 108 ++
.../interceptor/annotations/AnnotatedAction.java | 49 +
.../AnnotationWorkflowInterceptorTest.java | 112 ++
.../annotations/BaseAnnotatedAction.java | 67 +
.../annotations/InterfaceAnnotatedAction.java | 30 +
.../annotations/ShortcircuitedAction.java | 38 +
.../exec/StrutsBackgroundProcessTest.java | 7 +-
.../httpmethod/HttpMethodInterceptorTest.java | 6 +-
.../parameter/ParametersInterceptorTest.java | 48 +-
.../parameter/StrutsParameterAnnotationTest.java | 4 +-
.../AnnotationValidationInterceptorTest.java | 8 +-
.../org/apache/struts2/mock/DummyTextProvider.java | 87 +
.../org/apache/struts2/mock/InjectableAction.java | 36 +
.../apache/struts2/mock/MockLazyInterceptor.java | 41 +
.../java/org/apache/struts2/ognl/MyCustomMap.java | 28 +
.../struts2/ognl/OgnlSetPossiblePropertyTest.java | 6 +-
.../apache/struts2/ognl/OgnlUtilStrutsTest.java | 48 +
.../java/org/apache/struts2/ognl/OgnlUtilTest.java | 1822 +++++++++++++++++++
.../apache/struts2/ognl/OgnlValueStackTest.java | 1364 +++++++++++++++
.../struts2/ognl/SecurityMemberAccessTest.java | 1130 ++++++++++++
.../org/apache/struts2/ognl/SetPropertiesTest.java | 382 ++++
.../apache/struts2/ognl/StrutsOgnlGuardTest.java | 2 +-
.../accessor/XWorkListPropertyAccessorTest.java | 88 +
.../accessor/XWorkMapPropertyAccessorTest.java | 72 +
.../struts2/result/HttpHeaderResultTest.java | 16 +-
.../org/apache/struts2/result/PlainResultTest.java | 6 +-
.../apache/struts2/result/PlainTextResultTest.java | 10 +-
.../apache/struts2/result/PostbackResultTest.java | 10 +-
.../result/ServletActionRedirectResultTest.java | 14 +-
.../result/ServletDispatcherResultTest.java | 6 +-
.../struts2/result/ServletRedirectResultTest.java | 18 +-
.../apache/struts2/result/StreamResultTest.java | 16 +-
.../struts2/result/StrutsResultSupportTest.java | 8 +-
.../DefaultAcceptedPatternsCheckerTest.java | 264 +++
.../DefaultExcludedPatternsCheckerTest.java | 248 +++
...aultNotExcludedAcceptedPatternsCheckerTest.java | 91 +
.../apache/struts2/test/AnnotationDataAware.java | 48 +
.../apache/struts2/test/AnnotationDataAware2.java | 36 +
.../apache/struts2/test/AnnotationTestBean2.java | 67 +
.../org/apache/struts2/test/AnnotationUser.java | 109 ++
.../apache/struts2/test/AnnotationUserMarker.java | 38 +
.../java/org/apache/struts2/test/DataAware.java | 38 +
.../java/org/apache/struts2/test/DataAware2.java | 32 +
.../test/java/org/apache/struts2/test/Equidae.java | 55 +
.../apache/struts2/test/ModelDrivenAction2.java | 43 +
.../struts2/test/ModelDrivenAnnotationAction2.java | 44 +
.../org/apache/struts2/test/SimpleAction2.java | 43 +
.../org/apache/struts2/test/SimpleAction3.java | 57 +
.../struts2/test/SimpleAnnotationAction2.java | 47 +
.../struts2/test/SimpleAnnotationAction3.java | 58 +
.../org/apache/struts2/test/TestArrayBean.java | 35 +
.../java/org/apache/struts2/test/TestBean2.java | 61 +
.../test/java/org/apache/struts2/test/User.java | 94 +
.../java/org/apache/struts2/test/UserMarker.java | 28 +
.../apache/struts2/test/annotations/Address.java | 58 +
.../test/annotations/AddressTypeConverter.java | 47 +
.../apache/struts2/test/annotations/Person.java | 40 +
.../struts2/test/annotations/PersonAction.java | 65 +
.../struts2/test/annotations/PersonActionTest.java | 105 ++
.../test/annotations/PersonTypeConverter.java | 45 +
.../ValidateAnnotatedMethodOnlyAction.java | 71 +
.../test/subtest/NullModelDrivenAction.java | 37 +
.../test/java/org/apache/struts2/util/Animal.java | 23 +
.../java/org/apache/struts2/util/AnnotatedCat.java | 68 +
.../apache/struts2/util/AnnotationUtilsTest.java | 70 +
.../src/test/java/org/apache/struts2/util/Bar.java | 67 +
.../java/org/apache/struts2/util/BarJunior.java | 22 +
.../src/test/java/org/apache/struts2/util/Cat.java | 61 +
.../apache/struts2/util/ClassLoaderUtilTest.java | 127 ++
.../apache/struts2/util/ClassPathFinderTest.java | 108 ++
.../struts2/util/DefaultFileManagerTest.java | 207 +++
.../src/test/java/org/apache/struts2/util/Dog.java | 126 ++
.../org/apache/struts2/util/DomHelperTest.java | 77 +
.../apache/struts2/util/DummyObjectFactory.java | 25 +
.../src/test/java/org/apache/struts2/util/Foo.java | 259 +++
.../java/org/apache/struts2/util/FurColor.java | 23 +
.../org/apache/struts2/util/GetPropertiesTest.java | 52 +
.../test/java/org/apache/struts2/util/Indexed.java | 59 +
.../struts2/util/InvocationSessionStoreTest.java | 8 +-
.../java/org/apache/struts2/util/ListHolder.java | 55 +
.../test/java/org/apache/struts2/util/MyBean.java | 57 +
.../java/org/apache/struts2/util/MyBeanAction.java | 88 +
.../org/apache/struts2/util/MyBeanActionTest.java | 138 ++
.../java/org/apache/struts2/util/MyNumber.java | 22 +
.../util/NamedVariablePatternMatcherTest.java | 117 ++
.../test/java/org/apache/struts2/util/Owner.java | 40 +
.../org/apache/struts2/util/ResolverUtilTest.java | 63 +
.../util/SecurityMemberAccessInServletsTest.java | 2 +-
.../util/StrutsLocalizedTextProviderTest.java | 631 +++++++
.../org/apache/struts2/util/StrutsUtilTest.java | 4 +-
.../org/apache/struts2/util/TextParseUtilTest.java | 217 +++
.../test/java/org/apache/struts2/util/Tiger.java | 42 +
.../org/apache/struts2/util/TokenHelperTest.java | 2 +-
.../struts2/util/UnknownHandlerManagerTest.java | 105 ++
.../java/org/apache/struts2/util/UrlUtilTest2.java | 53 +
.../apache/struts2/util/WildcardHelperTest.java | 57 +
.../org/apache/struts2/util/WildcardUtilTest.java | 57 +
.../struts2/util/annotation/Dummy2Class.java | 27 +
.../struts2/util/annotation/Dummy3Class.java | 25 +
.../apache/struts2/util/annotation/DummyClass.java | 32 +
.../struts2/util/annotation/DummyClassExt.java | 26 +
.../struts2/util/annotation/MyAnnotation.java | 29 +
.../struts2/util/annotation/MyAnnotation2.java | 28 +
.../struts2/util/annotation/package-info.java | 20 +
.../pkg1/AbstractAbstractDummyAction.java | 25 +
.../util/annotation/pkg1/AbstractDummyAction.java | 22 +
.../annotation/pkg2/Package2DummyInterface.java | 25 +
.../struts2/util/annotation/pkg2/package-info.java | 23 +
.../util/fs/DefaultFileManagerFactoryTest.java | 153 ++
.../struts2/util/fs/JarEntryRevisionTest.java | 167 ++
.../util/location/LocationAttributesTest.java | 90 +
.../struts2/util/location/LocationImplTest.java | 90 +
.../struts2/util/location/LocationUtilsTest.java | 89 +
.../validator/ActionValidatorManagerTest.java | 239 +++
.../AnnotationActionValidatorManagerTest.java | 419 +++++
.../validator/AnnotationValidationAction.java | 95 +
...notationValidationConfigurationBuilderTest.java | 354 ++++
.../validator/AnnotationValidationExpAction.java | 158 ++
.../ConversionErrorFieldValidatorTest.java | 89 +
.../struts2/validator/DateRangeValidatorTest.java | 87 +
.../DefaultActionValidatorManagerTest.java | 378 ++++
.../validator/DefaultValidatorFactoryTest.java | 41 +
.../validator/DefaultValidatorFileParserTest.java | 218 +++
.../validator/DoubleRangeFieldValidatorTest.java | 370 ++++
.../struts2/validator/DummyValidatorContext.java | 147 ++
.../struts2/validator/EmailValidatorTest.java | 170 ++
.../struts2/validator/ExpressionValidatorTest.java | 153 ++
.../struts2/validator/IntRangeValidatorTest.java | 70 +
.../struts2/validator/LongRangeValidatorTest.java | 67 +
.../validator/ModelDrivenValidationTest.java | 61 +
.../org/apache/struts2/validator/MyValidator.java | 114 ++
.../struts2/validator/RegexFieldValidatorTest.java | 255 +++
...teConversionErrorFieldValidatorSupportTest.java | 135 ++
.../struts2/validator/ShortRangeValidatorTest.java | 67 +
.../validator/SimpleActionValidationTest.java | 253 +++
.../validator/StringLengthFieldValidatorTest.java | 275 +++
.../struts2/validator/StringValidatorTest.java | 225 +++
.../apache/struts2/validator/URLValidatorTest.java | 353 ++++
.../struts2/validator/ValidatorAnnotationTest.java | 130 ++
.../validator/VisitorFieldValidatorModelTest.java | 124 ++
.../validator/VisitorFieldValidatorTest.java | 236 +++
.../validator/VisitorValidatorModelAction.java | 41 +
.../validator/VisitorValidatorTestAction.java | 97 ++
.../validators/AppendingValidatorContextTest.java | 80 +
.../validators/CreditCardValidatorTest.java | 248 +++
.../validators/DateRangeFieldValidatorTest.java | 117 ++
.../validators/IntRangeFieldValidatorTest.java | 125 ++
.../validators/LongRangeFieldValidatorTest.java | 102 ++
.../validators/RequiredFieldValidatorTest.java | 96 ++
.../validators/RequiredStringValidatorTest.java | 153 ++
.../validators/ShortRangeFieldValidatorTest.java | 102 ++
.../validator/validators/ValidationAction.java | 193 +++
.../validator/validators/ValidatorSupportTest.java | 46 +
.../struts2/views/TemplateEngineManagerTest.java | 10 +-
.../views/freemarker/FreeMarkerResultTest.java | 10 +-
.../views/freemarker/FreemarkerManagerTest.java | 8 +-
.../freemarker/FreemarkerResultMockedTest.java | 8 +-
.../struts2/views/freemarker/FreemarkerTest.java | 2 +-
.../struts2/views/freemarker/TestAction.java | 2 +-
.../views/freemarker/tags/TagModelTest.java | 6 +-
.../apache/struts2/views/jsp/AbstractTagTest.java | 18 +-
.../struts2/views/jsp/AbstractUITagTest.java | 2 +-
.../apache/struts2/views/jsp/ActionTagTest.java | 10 +-
.../struts2/views/jsp/AppendIteratorTagTest.java | 4 +-
.../org/apache/struts2/views/jsp/BeanTagTest.java | 6 +-
.../apache/struts2/views/jsp/ElseIfTagTest.java | 10 +-
.../org/apache/struts2/views/jsp/ElseTagTest.java | 10 +-
.../org/apache/struts2/views/jsp/I18nTagTest.java | 10 +-
.../org/apache/struts2/views/jsp/IfTagTest.java | 10 +-
.../views/jsp/IteratorGeneratorTagTest.java | 4 +-
.../struts2/views/jsp/MergeIteratorTagTest.java | 4 +-
.../apache/struts2/views/jsp/NumberTagTest.java | 2 +-
.../apache/struts2/views/jsp/PropertyTagTest.java | 154 +-
.../struts2/views/jsp/SortIteratorTagTest.java | 4 +-
.../struts2/views/jsp/SubsetIteratorTagTest.java | 4 +-
.../org/apache/struts2/views/jsp/TextTagTest.java | 8 +-
.../org/apache/struts2/views/jsp/URLTagTest.java | 10 +-
.../struts2/views/jsp/ui/ActionErrorTagTest.java | 4 +-
.../struts2/views/jsp/ui/ActionMessageTagTest.java | 4 +-
.../apache/struts2/views/jsp/ui/CheckboxTest.java | 11 +-
.../apache/struts2/views/jsp/ui/DateTagTest.java | 2 +-
.../apache/struts2/views/jsp/ui/DebugTagTest.java | 6 +-
.../views/jsp/ui/DoubleValidationAction.java | 2 +-
.../struts2/views/jsp/ui/FieldErrorTagTest.java | 4 +-
.../apache/struts2/views/jsp/ui/FormTagTest.java | 10 +-
.../apache/struts2/views/jsp/ui/HiddenTest.java | 4 +-
.../struts2/views/jsp/ui/IntValidationAction.java | 2 +-
.../struts2/views/jsp/ui/LocaleTestAction.java | 2 +-
.../apache/struts2/views/jsp/ui/SubmitTest.java | 2 +-
.../apache/struts2/views/jsp/ui/TestAction1.java | 2 +-
.../struts2/views/jsp/ui/UpDownSelectTagTest.java | 4 +-
.../struts2/views/util/DefaultUrlHelperTest.java | 6 +-
.../org/test/ExternalSecurityMemberAccess.java | 35 +
.../org/test/ExternalSecurityMemberAccessTest.java | 33 +
.../xwork2/config/providers/xwork- test.xml | 100 --
.../providers/xwork-include-after-package-2.xml | 33 -
.../providers/xwork-include-after-package.xml | 39 -
.../providers/xwork-include-before-package-2.xml | 33 -
.../providers/xwork-include-before-package.xml | 41 -
.../config/providers/xwork-include-parent.xml | 41 -
.../xwork-test-actions-packagedefaultclassref.xml | 58 -
.../xwork2/config/providers/xwork-test-actions.xml | 100 --
.../config/providers/xwork-test-allowlist-2.xml | 41 -
.../config/providers/xwork-test-allowlist.xml | 48 -
.../xwork-test-defaultclassref-package.xml | 30 -
.../providers/xwork-test-exception-mappings.xml | 52 -
.../xwork-test-global-result-inheritence.xml | 66 -
.../providers/xwork-test-include-wildcard.xml | 27 -
.../xwork-test-interceptor-defaultref.xml | 49 -
.../xwork-test-interceptor-param-overriding.xml | 62 -
.../providers/xwork-test-interceptor-params.xml | 56 -
...ork-test-interceptor-stack-param-overriding.xml | 73 -
.../providers/xwork-test-interceptors-basic.xml | 46 -
.../config/providers/xwork-test-invalid-file.xml | 30 -
.../config/providers/xwork-test-multilevel.xml | 64 -
.../providers/xwork-test-package-extends-final.xml | 37 -
.../config/providers/xwork-test-package-final.xml | 37 -
.../providers/xwork-test-package-inheritance.xml | 46 -
.../providers/xwork-test-result-inheritance.xml | 45 -
.../config/providers/xwork-test-result-names.xml | 67 -
.../config/providers/xwork-test-result-types.xml | 72 -
.../xwork2/config/providers/xwork-test-results.xml | 51 -
.../providers/xwork-test-wildcard-include.xml | 31 -
.../providers/xwork-unknownhandler-stack-empty.xml | 31 -
.../providers/xwork-unknownhandler-stack.xml | 33 -
.../impl/test-struts-conversion.properties | 19 -
.../xwork2/test/DataAware-conversion.properties | 19 -
.../xwork2/test/TestBean2-conversion.properties | 19 -
.../xwork2/util/Foo-conversion.properties | 30 -
.../xwork2/util/MyBeanAction-conversion.properties | 26 -
.../xwork2/util/Tiger-conversion.properties | 19 -
.../xwork2/validator/validators-fail.xml | 41 -
core/src/test/resources/includeTest.xml | 2 +-
core/src/test/resources/my-validators.xml | 2 +-
core/src/test/resources/myOther-validators.xml | 2 +-
...ActionSupportTest$MyActionSupport_da.properties | 0
.../apache/struts2}/AnnotatedTestBean.properties | 0
.../DefaultTextProviderTest_en_CA.properties | 0
.../struts2}/ModelDrivenAction-validation.xml | 0
.../apache/struts2}/ModelDrivenAction.properties | 0
.../ModelDrivenAnnotationAction.properties | 0
.../SimpleAction-some-alias-validation.xml | 0
.../SimpleAction-subproperty-validation.xml | 0
.../apache/struts2}/SimpleAction-validation.xml | 0
.../SimpleAction-validationAlias-validation.xml | 0
.../apache/struts2}/SimpleAction.properties | 0
.../apache/struts2}/SimpleAction_de.properties | 0
.../apache/struts2}/SimpleAction_en.properties | 0
.../struts2}/SimpleAnnotationAction.properties | 0
.../struts2}/SimpleAnnotationAction_de.properties | 0
.../struts2}/SimpleAnnotationAction_en.properties | 0
.../TestBean-anotherContext-validation.xml | 0
.../struts2}/TestBean-badtest-validation.xml | 0
.../TestBean-beanMessageBundle-validation.xml | 0
.../TestBean-expressionValidation-validation.xml | 0
.../apache/struts2}/TestBean-validation.xml | 0
.../TestBean-visitorChildValidation-validation.xml | 0
.../TestBean-visitorValidation-validation.xml | 0
.../apache/struts2}/TestBean.properties | 0
.../apache/struts2}/TestChildBean-validation.xml | 0
.../struts2}/TextProviderSupportTest_en.properties | 0
.../struts2}/ValidationOrderAction-validation.xml | 0
.../providers/loadorder1/xwork-test-load-order.xml | 0
.../providers/loadorder2/xwork-test-load-order.xml | 0
.../providers/loadorder3/xwork-test-load-order.xml | 0
.../struts2/config/providers/xwork- test.xml | 100 ++
.../providers/xwork-include-after-package-2.xml | 33 +
.../providers/xwork-include-after-package.xml | 39 +
.../providers/xwork-include-before-package-2.xml | 33 +
.../providers/xwork-include-before-package.xml | 41 +
.../config/providers/xwork-include-parent.xml | 41 +
.../config/providers/xwork-test-action-invalid.xml | 0
.../xwork-test-actions-packagedefaultclassref.xml | 58 +
.../config/providers/xwork-test-actions.xml | 100 ++
.../providers/xwork-test-allowed-methods.xml | 0
.../config/providers/xwork-test-allowlist-2.xml | 41 +
.../config/providers/xwork-test-allowlist.xml | 48 +
.../providers/xwork-test-bad-inheritance.xml | 0
.../config/providers/xwork-test-basic-packages.xml | 0
.../providers/xwork-test-default-package.xml | 0
.../xwork-test-defaultclassref-package.xml | 30 +
.../providers/xwork-test-envs-substitution.xml | 0
.../providers/xwork-test-exception-mappings.xml | 52 +
.../xwork-test-global-result-inheritence.xml | 66 +
.../providers/xwork-test-include-wildcard.xml | 27 +
.../xwork-test-interceptor-defaultref.xml | 49 +
.../xwork-test-interceptor-inheritance.xml | 0
.../xwork-test-interceptor-param-overriding.xml | 62 +
.../providers/xwork-test-interceptor-params.xml | 56 +
...ork-test-interceptor-stack-param-overriding.xml | 73 +
.../providers/xwork-test-interceptors-basic.xml | 46 +
.../providers/xwork-test-interceptors-spring.xml | 0
.../config/providers/xwork-test-invalid-file.xml | 30 +
.../config/providers/xwork-test-multilevel.xml | 64 +
.../providers/xwork-test-package-extends-final.xml | 37 +
.../config/providers/xwork-test-package-final.xml | 37 +
.../providers/xwork-test-package-inheritance.xml | 46 +
.../config/providers/xwork-test-reload.xml | 0
.../providers/xwork-test-result-inheritance.xml | 45 +
.../config/providers/xwork-test-result-names.xml | 67 +
.../config/providers/xwork-test-result-types.xml | 72 +
.../config/providers/xwork-test-results.xml | 51 +
.../config/providers/xwork-test-wildcard-1.xml | 0
.../config/providers/xwork-test-wildcard-2.xml | 0
.../providers/xwork-test-wildcard-include.xml | 31 +
.../providers/xwork-unknownhandler-stack-empty.xml | 31 +
.../providers/xwork-unknownhandler-stack.xml | 33 +
.../impl/test-struts-conversion.properties | 19 +
.../xwork2 => org/apache/struts2}/somefile.txt | 0
.../xwork2 => org/apache/struts2}/test.properties | 0
.../struts2/test/DataAware-conversion.properties | 19 +
.../apache/struts2}/test/DataAware-validation.xml | 0
.../test/DataAware-validationAlias-validation.xml | 0
.../apache/struts2}/test/DataAware.properties | 0
.../apache/struts2}/test/DataAware2-validation.xml | 0
.../apache/struts2}/test/Equidae-validation.xml | 0
.../struts2}/test/SimpleAction2-validation.xml | 0
.../SimpleAction2-validationAlias-validation.xml | 0
.../struts2/test/TestBean2-conversion.properties | 19 +
.../struts2}/test/User-conversion.properties | 0
.../apache/struts2}/test/User-validation.xml | 0
.../apache/struts2}/test/UserMarker-validation.xml | 0
.../apache/struts2}/test/package.properties | 0
.../apache/struts2}/util/Bar.properties | 0
.../apache/struts2}/util/Cat-conversion.properties | 0
.../apache/struts2}/util/FindMe.properties | 0
.../apache/struts2/util/Foo-conversion.properties | 30 +
.../struts2}/util/ListHolder-conversion.properties | 0
.../struts2}/util/LocalizedTextUtilTest.properties | 0
.../util/MyBeanAction-conversion.properties | 26 +
.../struts2/util/Tiger-conversion.properties | 19 +
.../apache/struts2}/util/XW404_de.properties | 0
.../apache/struts2}/util/XW404_fr.properties | 0
.../struts2}/util/location/xml-with-location.xml | 0
...ositeTextProviderTestResourceBundle1.properties | 0
...ositeTextProviderTestResourceBundle2.properties | 0
.../VisitorValidatorModelAction-validation.xml | 0
...atorTestAction-beanMessageBundle-validation.xml | 0
...alidatorTestAction-validateArray-validation.xml | 0
...ValidatorTestAction-validateList-validation.xml | 0
.../VisitorValidatorTestAction-validation.xml | 0
...estAction-visitorChildValidation-validation.xml | 0
...atorTestAction-visitorValidation-validation.xml | 0
...estAction-visitorValidationAlias-validation.xml | 0
.../VisitorValidatorTestAction.properties | 0
.../struts2}/validator/validator-parser-test.xml | 0
.../struts2}/validator/validator-parser-test2.xml | 0
.../struts2}/validator/validator-parser-test3.xml | 0
.../struts2}/validator/validator-parser-test4.xml | 0
.../struts2}/validator/validator-parser-test5.xml | 0
.../struts2}/validator/validator-parser-test6.xml | 0
.../apache/struts2/validator/validators-fail.xml | 41 +
.../struts-object-factory-result-builder.xml | 2 +-
core/src/test/resources/struts-testing.xml | 6 +-
core/src/test/resources/struts.xml | 24 +-
core/src/test/resources/validators.xml | 34 +-
core/src/test/resources/xwork - jar.jar | Bin 2063 -> 4396 bytes
core/src/test/resources/xwork - zip.zip | Bin 2572 -> 3184 bytes
core/src/test/resources/xwork-jar.jar | Bin 2059 -> 4396 bytes
core/src/test/resources/xwork-proxyinvoke.xml | 26 +-
core/src/test/resources/xwork-sample.xml | 68 +-
core/src/test/resources/xwork-test-beans.xml | 2 +-
core/src/test/resources/xwork-test-default.xml | 22 +-
core/src/test/resources/xwork-test-validation.xml | 24 +-
core/src/test/resources/xwork-zip.zip | Bin 2564 -> 3152 bytes
.../apache/struts2/async/DefaultAsyncManager.java | 2 +-
plugins/async/src/main/resources/struts-plugin.xml | 2 +-
.../struts2/async/DefaultAsyncManagerTest.java | 2 +-
.../interceptor/BeanValidationInterceptor.java | 16 +-
.../interceptor/DefaultBeanValidationManager.java | 4 +-
.../BeanValidationInterceptorTest.java | 8 +-
.../apache/struts/beanvalidation/VoidResult.java | 4 +-
.../struts/beanvalidation/actions/FieldAction.java | 2 +-
.../actions/FieldActionDoExecute.java | 4 +-
.../beanvalidation/actions/FieldMatchAction.java | 2 +-
.../beanvalidation/actions/ModelDrivenAction.java | 4 +-
.../actions/ValidateGroupAction.java | 4 +-
.../org/apache/struts2/cdi/CdiObjectFactory.java | 4 +-
plugins/cdi/src/main/resources/struts-plugin.xml | 2 +-
.../struts2/config_browser/ActionNamesAction.java | 6 +-
.../config_browser/ConfigurationHelper.java | 14 +-
.../config_browser/ListValidatorsAction.java | 12 +-
.../struts2/config_browser/ShowBeansAction.java | 12 +-
.../struts2/config_browser/ShowConfigAction.java | 8 +-
.../config_browser/ShowConstantsAction.java | 4 +-
.../struts2/config_browser/ShowJarsAction.java | 2 +-
.../config_browser/ShowValidatorAction.java | 10 +-
.../convention/AbstractActionNameBuilder.java | 4 +-
.../convention/ClasspathConfigurationProvider.java | 14 +-
.../convention/ClasspathPackageProvider.java | 10 +-
.../convention/ConventionUnknownHandler.java | 18 +-
.../struts2/convention/ConventionsService.java | 6 +-
.../struts2/convention/ConventionsServiceImpl.java | 14 +-
.../convention/DefaultActionNameBuilder.java | 2 +-
.../struts2/convention/DefaultClassFinder.java | 12 +-
.../convention/DefaultInterceptorMapBuilder.java | 14 +-
.../convention/DefaultResultMapBuilder.java | 24 +-
.../struts2/convention/InterceptorMapBuilder.java | 4 +-
.../PackageBasedActionConfigBuilder.java | 50 +-
.../struts2/convention/ResultMapBuilder.java | 4 +-
.../struts2/convention/SEOActionNameBuilder.java | 2 +-
.../org/apache/struts2/convention/StringTools.java | 2 +-
.../convention/annotation/AllowedMethods.java | 2 +-
.../src/main/resources/struts-plugin.xml | 6 +-
.../src/test/java/actions/MessageAction.java | 2 +-
.../convention/ConventionUnknownHandlerTest.java | 12 +-
.../convention/DefaultResultMapBuilderTest.java | 8 +-
.../PackageBasedActionConfigBuilderTest.java | 50 +-
.../apache/struts2/convention/TestInterceptor.java | 4 +-
.../apache/struts2/convention/actions/Skip.java | 2 +-
.../convention/actions/action/TestBase.java | 2 +-
.../SingleActionNameAction2.java | 2 +-
.../struts2/convention/actions/idx/Index.java | 2 +-
.../struts2/convention/actions/idx/idx2/Index.java | 2 +-
.../actions/result/InheritedResultTestBase.java | 2 +-
.../struts2/convention/actions/skip/Index.java | 2 +-
.../views/jasperreports/JasperReportsResult.java | 8 +-
.../views/jasperreports/ValueStackDataSource.java | 2 +-
.../views/jasperreports/ValueStackShadowMap.java | 2 +-
.../jasperreports/JasperReportsResultTest.java | 10 +-
.../struts2/views/java/JavaTemplateEngine.java | 8 +-
.../views/java/simple/AbstractTagHandler.java | 4 +-
.../views/java/simple/CheckboxListHandler.java | 8 +-
.../struts2/views/java/simple/RadioHandler.java | 8 +-
.../struts2/views/java/simple/SelectHandler.java | 8 +-
.../struts2/views/java/simple/AbstractTest.java | 12 +-
.../struts2/views/java/simple/AnchorTest.java | 2 +-
.../struts2/views/java/simple/CheckboxTest.java | 2 +-
.../apache/struts2/views/java/simple/LinkTest.java | 2 +-
.../struts2/views/java/simple/ScriptTest.java | 4 +-
.../struts2/views/java/simple/TokenTest.java | 2 +-
.../org/apache/struts2/dispatcher/ChartResult.java | 14 +-
.../apache/struts2/dispatcher/ChartResultTest.java | 8 +-
.../org/apache/struts2/json/DefaultJSONWriter.java | 8 +-
.../java/org/apache/struts2/json/JSONCleaner.java | 6 +-
.../org/apache/struts2/json/JSONInterceptor.java | 36 +-
.../java/org/apache/struts2/json/JSONResult.java | 14 +-
.../java/org/apache/struts2/json/JSONUtil.java | 30 +-
.../struts2/json/JSONValidationInterceptor.java | 10 +-
.../org/apache/struts2/json/smd/SMDGenerator.java | 4 +-
.../struts2/json/JSONActionRedirectResultTest.java | 10 +-
.../apache/struts2/json/JSONInterceptorTest.java | 6 +-
.../org/apache/struts2/json/JSONResultTest.java | 8 +-
.../json/JSONValidationInterceptorTest.java | 20 +-
.../java/org/apache/struts2/json/TestAction.java | 4 +-
.../apache/struts2/junit/StrutsJUnit4TestCase.java | 14 +-
.../apache/struts2/junit/StrutsRestTestCase.java | 8 +-
.../org/apache/struts2/junit/StrutsTestCase.java | 12 +-
.../org/apache/struts2/junit/JUnitTestAction.java | 2 +-
.../struts2/junit/StrutsJUnit4TestCaseTest.java | 2 +-
.../junit/StrutsSpringJUnit4TestCaseTest.java | 4 +-
.../apache/struts2/junit/StrutsTestCaseTest.java | 4 +-
.../struts2/junit/session/SessionGetAction.java | 2 +-
.../struts2/junit/session/SessionSetAction.java | 4 +-
.../struts2/rest/ContentTypeHandlerManager.java | 2 +-
.../struts2/rest/ContentTypeInterceptor.java | 8 +-
.../rest/DefaultContentTypeHandlerManager.java | 8 +-
.../apache/struts2/rest/RestActionInvocation.java | 14 +-
.../org/apache/struts2/rest/RestActionMapper.java | 44 +-
.../struts2/rest/RestActionProxyFactory.java | 8 +-
.../org/apache/struts2/rest/RestActionSupport.java | 30 +-
.../struts2/rest/RestWorkflowInterceptor.java | 14 +-
.../struts2/rest/handler/ContentTypeHandler.java | 2 +-
.../rest/handler/FormUrlEncodedHandler.java | 2 +-
.../apache/struts2/rest/handler/HtmlHandler.java | 2 +-
.../struts2/rest/handler/JacksonJsonHandler.java | 4 +-
.../struts2/rest/handler/JacksonXmlHandler.java | 2 +-
.../struts2/rest/handler/JuneauXmlHandler.java | 2 +-
.../rest/handler/MultipartFormDataHandler.java | 2 +-
.../struts2/rest/handler/XStreamHandler.java | 4 +-
plugins/rest/src/main/resources/struts-plugin.xml | 2 +-
.../rest/ContentTypeHandlerManagerTest.java | 12 +-
.../struts2/rest/ContentTypeInterceptorTest.java | 8 +-
.../rest/DefaultContentTypeHandlerManagerTest.java | 8 +-
.../struts2/rest/RestActionInvocationTest.java | 30 +-
.../apache/struts2/rest/RestActionMapperTest.java | 22 +-
.../struts2/rest/RestWorkflowInterceptorTest.java | 8 +-
.../rest/handler/JacksonJsonHandlerTest.java | 2 +-
.../rest/handler/JacksonXmlHandlerTest.java | 8 +-
.../struts2/rest/handler/JuneauXmlHandlerTest.java | 9 +-
.../struts2/rest/handler/XStreamHandlerTest.java | 10 +-
.../sitemesh/FreemarkerDecoratorServlet.java | 2 +-
.../struts2/sitemesh/FreemarkerPageFilter.java | 2 +-
.../sitemesh/OldDecorator2NewStrutsDecorator.java | 18 +-
.../OldDecorator2NewStrutsFreemarkerDecorator.java | 2 +-
.../OldDecorator2NewStrutsVelocityDecorator.java | 4 +-
.../struts2/sitemesh/StrutsSiteMeshFactory.java | 2 +-
.../struts2/sitemesh/VelocityDecoratorServlet.java | 2 +-
.../struts2/sitemesh/VelocityPageFilter.java | 2 +-
.../xwork2/spring/SpringObjectFactory.java | 9 +-
.../spring/SpringProxyableObjectFactory.java | 2 +-
.../interceptor/ActionAutowiringInterceptor.java | 10 +-
.../ClassReloadingXMLWebApplicationContext.java | 6 +-
.../struts2/spring/StrutsSpringObjectFactory.java | 10 +-
.../spring/src/main/resources/struts-plugin.xml | 4 +-
.../com/opensymphony/xwork2/ModelDrivenAction.java | 52 -
.../java/com/opensymphony/xwork2/SimpleAction.java | 284 ---
.../java/com/opensymphony/xwork2/TestBean.java | 75 -
.../com/opensymphony/xwork2/TestChildBean.java | 65 -
.../java/com/opensymphony/xwork2/TestSubBean.java | 32 -
.../xwork2/mock/DummyTextProvider.java | 87 -
.../xwork2/ognl/SecurityMemberAccessProxyTest.java | 90 -
.../xwork2/spring/ActionsFromSpringTest.java | 152 --
.../xwork2/spring/ExecuteInterceptor.java | 36 -
.../xwork2/spring/SpringObjectFactoryTest.java | 409 -----
.../xwork2/spring/SpringProxyUtilTest.java | 121 --
.../opensymphony/xwork2/spring/SpringResult.java | 54 -
.../com/opensymphony/xwork2/spring/TestAspect.java | 69 -
.../ActionAutowiringInterceptorTest.java | 131 --
.../spring/interceptor/TestActionInvocation.java | 89 -
.../com/test/SecurityMemberAccessProxyTest.java | 22 -
.../java/org/apache/struts2/ModelDrivenAction.java | 52 +
.../test/java/org/apache/struts2/SimpleAction.java | 281 +++
.../src/test/java/org/apache/struts2/TestBean.java | 75 +
.../java/org/apache/struts2/TestChildBean.java | 65 +
.../test/java/org/apache/struts2/TestSubBean.java | 32 +
.../org/apache/struts2/mock/DummyTextProvider.java | 87 +
.../ognl/SecurityMemberAccessProxyTest.java | 90 +
.../struts2/spring/ActionsFromSpringTest.java | 152 ++
.../apache/struts2/spring/ExecuteInterceptor.java | 36 +
.../struts2/spring/SpringObjectFactoryTest.java | 409 +++++
.../apache/struts2/spring/SpringProxyUtilTest.java | 121 ++
.../org/apache/struts2/spring/SpringResult.java | 54 +
.../spring/StrutsSpringObjectFactoryTest.java | 4 +-
.../java/org/apache/struts2/spring/TestAspect.java | 69 +
.../ActionAutowiringInterceptorTest.java | 131 ++
.../spring/interceptor/TestActionInvocation.java | 89 +
.../xwork2/spring/actionContext-spring.xml | 30 +-
.../xwork2/spring/actionContext-xwork.xml | 10 +-
.../struts2/testng/TestNGStrutsTestCase.java | 2 +-
.../apache/struts2/testng/TestNGXWorkTestCase.java | 14 +-
.../struts2/testng/TestNGStrutsTestCaseTest.java | 2 +-
.../struts2/testng/TestNGXWorkTestCaseTest.java | 2 +-
.../struts2/tiles/I18NAttributeEvaluator.java | 8 +-
.../struts2/tiles/StrutsAttributeEvaluator.java | 6 +-
.../tiles/StrutsFreeMarkerAttributeRenderer.java | 8 +-
.../struts2/tiles/StrutsPreparerFactory.java | 4 +-
.../struts2/tiles/StrutsTilesContainerFactory.java | 2 +-
.../struts2/tiles/StrutsTilesLocaleResolver.java | 6 +-
.../StrutsWildcardServletApplicationContext.java | 6 +-
.../apache/struts2/views/tiles/TilesResult.java | 2 +-
.../main/java/org/apache/tiles/api/Attribute.java | 2 +-
.../views/velocity/StrutsResourceLoader.java | 2 +-
.../views/velocity/StrutsVelocityContext.java | 2 +-
.../views/velocity/StrutsVelocityManager.java | 8 +-
.../velocity/VelocityBeanSelectionProvider.java | 6 +-
.../struts2/views/velocity/VelocityManager.java | 2 +-
.../struts2/views/velocity/VelocityStrutsUtil.java | 2 +-
.../struts2/views/velocity/VelocityTools.java | 2 +-
.../velocity/components/AbstractDirective.java | 5 +-
.../views/velocity/components/ActionDirective.java | 2 +-
.../velocity/components/ActionErrorDirective.java | 2 +-
.../components/ActionMessageDirective.java | 2 +-
.../views/velocity/components/AnchorDirective.java | 2 +-
.../views/velocity/components/BeanDirective.java | 2 +-
.../velocity/components/CheckBoxDirective.java | 2 +-
.../velocity/components/CheckBoxListDirective.java | 2 +-
.../velocity/components/ComboBoxDirective.java | 2 +-
.../velocity/components/ComponentDirective.java | 2 +-
.../views/velocity/components/DateDirective.java | 2 +-
.../velocity/components/DoubleSelectDirective.java | 2 +-
.../velocity/components/FieldErrorDirective.java | 2 +-
.../views/velocity/components/FileDirective.java | 2 +-
.../views/velocity/components/FormDirective.java | 2 +-
.../views/velocity/components/HeadDirective.java | 2 +-
.../views/velocity/components/HiddenDirective.java | 2 +-
.../views/velocity/components/I18nDirective.java | 2 +-
.../velocity/components/IncludeDirective.java | 2 +-
.../components/InputTransferSelectDirective.java | 2 +-
.../views/velocity/components/LabelDirective.java | 2 +-
.../velocity/components/OptGroupDirective.java | 2 +-
.../components/OptionTransferSelectDirective.java | 2 +-
.../views/velocity/components/ParamDirective.java | 2 +-
.../velocity/components/PasswordDirective.java | 2 +-
.../velocity/components/PropertyDirective.java | 2 +-
.../views/velocity/components/PushDirective.java | 2 +-
.../views/velocity/components/RadioDirective.java | 2 +-
.../views/velocity/components/ResetDirective.java | 2 +-
.../views/velocity/components/SelectDirective.java | 2 +-
.../views/velocity/components/SetDirective.java | 2 +-
.../views/velocity/components/SubmitDirective.java | 2 +-
.../velocity/components/TextAreaDirective.java | 2 +-
.../views/velocity/components/TextDirective.java | 2 +-
.../velocity/components/TextFieldDirective.java | 2 +-
.../views/velocity/components/TokenDirective.java | 2 +-
.../views/velocity/components/URLDirective.java | 2 +-
.../velocity/components/UpDownSelectDirective.java | 2 +-
.../views/velocity/result/VelocityResult.java | 8 +-
.../velocity/template/VelocityTemplateEngine.java | 2 +-
.../views/velocity/StrutsVelocityContextTest.java | 2 +-
.../views/velocity/StrutsVelocityManagerTest.java | 4 +-
.../views/velocity/result/VelocityResultTest.java | 8 +-
.../template/VelocityTemplateEngineTest.java | 4 +-
.../apache/struts2/result/xslt/StringAdapter.java | 2 +-
.../org/apache/struts2/result/xslt/XSLTResult.java | 10 +-
.../apache/struts2/result/xslt/XSLTResultTest.java | 14 +-
.../xslt/src/test/resources/XSLTResultTest-val.xml | 26 +-
2066 files changed, 89940 insertions(+), 90019 deletions(-)
diff --git a/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java b/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java
index 50d9c8fa6..64ef99dfa 100644
--- a/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java
+++ b/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java
@@ -18,9 +18,9 @@
*/
package org.demo.rest.example;
-import com.opensymphony.xwork2.ModelDriven;
-import com.opensymphony.xwork2.Validateable;
-import com.opensymphony.xwork2.ValidationAwareSupport;
+import org.apache.struts2.ModelDriven;
+import org.apache.struts2.Validateable;
+import org.apache.struts2.ValidationAwareSupport;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.convention.annotation.Result;
diff --git a/apps/rest-showcase/src/main/resources/log4j2.xml b/apps/rest-showcase/src/main/resources/log4j2.xml
index c88415742..f6836e06a 100644
--- a/apps/rest-showcase/src/main/resources/log4j2.xml
+++ b/apps/rest-showcase/src/main/resources/log4j2.xml
@@ -26,7 +26,6 @@
</Console>
</Appenders>
<Loggers>
- <Logger name="com.opensymphony.xwork2" level="info"/>
<Logger name="org.apache.struts2" level="info"/>
<Logger name="org.demo.rest" level="debug"/>
<Root level="warn">
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java
index 21aa14840..df1fbe511 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.text.DateFormat;
import java.util.Calendar;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java
index c194ca386..67bdba155 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import org.apache.struts2.showcase.ajax.tree.Category;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java
index 9d861c920..e82d72187 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java
index ac18342a5..e4a0667a3 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java
index 72f554bed..7f0d68394 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java
index 242790c9f..c2bab811d 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import org.apache.struts2.showcase.ajax.tree.Category;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java
index cec997465..22561463e 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.showcase.ajax.tree.Category;
// START SNIPPET: treeExampleDynamicJavaShow
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java
index c04114c2e..da7373de8 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java
@@ -20,9 +20,9 @@
*/
package org.apache.struts2.showcase;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Validateable;
-import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.Validateable;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java
index e5204a1fa..871136c64 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java
index e8a411fe3..634b549ef 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.Preparable;
+import org.apache.struts2.Preparable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java
index 771d49cbc..b8ef9bdb6 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.Arrays;
import java.util.Date;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java
index 7683a9701..8e0e71a9a 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java
@@ -18,8 +18,8 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.interceptor.annotations.After;
+import org.apache.struts2.Action;
+import org.apache.struts2.interceptor.annotations.After;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java
index 0c3ff4f7c..351a6a24e 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import org.apache.struts2.showcase.model.MyDto;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java
index ce462095b..651c3c86d 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.action;
-import com.opensymphony.xwork2.Preparable;
+import org.apache.struts2.Preparable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java
index e57006f2b..34989dad6 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.actionchaining;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class ActionChain1 extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java
index 32e7f6767..14196c0a7 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.actionchaining;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class ActionChain2 extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java
index 402a1b578..d00d87f47 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.actionchaining;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class ActionChain3 extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java
index ec146c05d..02cd9f1f8 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.ajax;
-import com.opensymphony.xwork2.Action;
+import org.apache.struts2.Action;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.io.Serializable;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java
index 9193ec918..44b7938db 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.ajax;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java
index c698da86d..f3c9c6420 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.ajax;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.text.SimpleDateFormat;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java
index d5f7b1c3d..2873c5592 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.ajax;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class Example5Action extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java
index cbb7ec1e4..54b5fded9 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.ajax.tree;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java
index be05ce1a9..bdf7bd4e6 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.async;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
index e820f552c..ad352ff52 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
@@ -21,10 +21,10 @@
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.struts2.Action;
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.ActionInvocation;
+import org.apache.struts2.interceptor.AbstractInterceptor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
index 324226b2d..52678d288 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
@@ -20,10 +20,10 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.struts2.Action;
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.ActionInvocation;
+import org.apache.struts2.interceptor.AbstractInterceptor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java
index d40232e0b..34ff5788a 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.SessionAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java
index 452ce0d08..03c48087e 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.Map;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java
index ca546792a..64af60e91 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class CrudRoomAction extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
index eb784b62d..0689f3af0 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.inject.Inject;
+import org.apache.struts2.conversion.impl.XWorkConverter;
+import org.apache.struts2.inject.Inject;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.struts2.util.StrutsTypeConverter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java
index bf5c6df9a..b25ac7ee8 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.SessionAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java
index e87dfdc95..38009ace3 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.SessionAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java
index 3489bac71..1dad05aa3 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java
index 8ed8b4e82..f511c0bf4 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.ArrayList;
import java.util.List;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java
index 51843179d..b179f9494 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.SessionAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java
index c2a15c107..e0d61b436 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.ArrayList;
import java.util.List;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java
index 0f97a3401..4cf1acaec 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.ArrayList;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java
index 0f764b787..d0eb196b4 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.conversion;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.LinkedHashSet;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java
index a3fb3b827..17d7cbe28 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.conversion;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.Arrays;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java
index 27df30a97..1f7cd4d29 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.conversion;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.List;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java
index 5f23c19d7..da35e7bb8 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.filedownload;
-import com.opensymphony.xwork2.Action;
+import org.apache.struts2.Action;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
index 279c1e928..096cff42a 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.fileupload;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.UploadedFilesAware;
import org.apache.struts2.dispatcher.multipart.UploadedFile;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
index ff2635613..8b7c630be 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
@@ -21,7 +21,7 @@
// START SNIPPET: entire-file
package org.apache.struts2.showcase.fileupload;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.UploadedFilesAware;
import org.apache.struts2.dispatcher.multipart.UploadedFile;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
index e60b0df3e..f32e643de 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
@@ -21,7 +21,7 @@
// START SNIPPET: entire-file
package org.apache.struts2.showcase.fileupload;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.UploadedFilesAware;
import org.apache.struts2.dispatcher.multipart.UploadedFile;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java
index 207a09004..45c58ab05 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.freemarker;
-import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.apache.struts2.views.freemarker.ScopesHashModel;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java
index c79480ff0..36831c780 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.freemarker;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Preparable;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.Preparable;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.text.DateFormatSymbols;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java
index 660c5e9e8..83946bdff 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.hangman;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.Map;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java
index 3df913d58..c823eabbc 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.hangman;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.action.SessionAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java
index bc4138a23..fe9f2333d 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.hangman;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import java.util.Map;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java
index 60692b0e6..2ca9492a4 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.modelDriven;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.ModelDriven;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.ModelDriven;
import org.apache.struts2.showcase.modelDriven.model.Gangster;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
index 8fbdee0b2..3e52dbf02 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.person;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java
index 2d2158787..34e5d2f3c 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.person;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java
index d5888af85..71054aa10 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.person;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java
index d1ba0a412..2cd4b5a1b 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.source;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.util.ClassLoaderUtil;
import org.apache.struts2.action.ServletContextAware;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java
index 6e5afa806..176e9449b 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.tag.nonui.actionPrefix;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
public class SubmitAction extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java
index d39f877a2..e105449ed 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.tag.nonui.actiontag;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
/**
*/
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java
index 4d732fecd..be740d506 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java
@@ -18,7 +18,7 @@
*/
package org.apache.struts2.showcase.tag.nonui.debugtag;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.dispatcher.PrepareOperations;
public class DebugTagAction extends ActionSupport {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java
index deca54ab0..ada4ccb68 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.tag.nonui.iteratortag;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Validateable;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.Validateable;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java
index ca66f63de..735c38fd6 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.tag.nonui.iteratortag;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java
index 6bb4c9b1c..33c5cdd59 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.tag.nonui.iteratortag;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Validateable;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.Validateable;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java
index ccbd31013..3d5567abe 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.tag.nonui.iteratortag;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Validateable;
+import org.apache.struts2.ActionSupport;
+import org.apache.struts2.Validateable;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java
index 2b789c2d8..f60a673e5 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java
@@ -24,7 +24,7 @@ import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.tiles.annotation.TilesDefinition;
import org.apache.struts2.tiles.annotation.TilesPutAttribute;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
@Namespace("/tiles")
@ParentPackage("tiles")
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java
index 297c19c75..0b731e325 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.token;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.util.Date;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java
index 53228a952..775de0044 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.validation;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
/**
*/
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
index 4c831c754..6fdafed61 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
@@ -18,15 +18,15 @@
*/
package org.apache.struts2.showcase.validation;
-import com.opensymphony.xwork2.validator.annotations.DateRangeFieldValidator;
-import com.opensymphony.xwork2.validator.annotations.EmailValidator;
-import com.opensymphony.xwork2.validator.annotations.FieldExpressionValidator;
-import com.opensymphony.xwork2.validator.annotations.IntRangeFieldValidator;
-import com.opensymphony.xwork2.validator.annotations.RegexFieldValidator;
-import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;
-import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
-import com.opensymphony.xwork2.validator.annotations.StringLengthFieldValidator;
-import com.opensymphony.xwork2.validator.annotations.UrlValidator;
+import org.apache.struts2.validator.annotations.DateRangeFieldValidator;
+import org.apache.struts2.validator.annotations.EmailValidator;
+import org.apache.struts2.validator.annotations.FieldExpressionValidator;
+import org.apache.struts2.validator.annotations.IntRangeFieldValidator;
+import org.apache.struts2.validator.annotations.RegexFieldValidator;
+import org.apache.struts2.validator.annotations.RequiredFieldValidator;
+import org.apache.struts2.validator.annotations.RequiredStringValidator;
+import org.apache.struts2.validator.annotations.StringLengthFieldValidator;
+import org.apache.struts2.validator.annotations.UrlValidator;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.sql.Date;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java
index 2383aa3ad..96a53942e 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.validation;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts.beanvalidation.constraints.FieldMatch;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java
index 35fc1c3ca..7ac1f15f7 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.validation;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java
index ca01f8993..bdaa8aa2c 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.validation;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java
index cd14a3674..1814c0fa5 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.wait;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
/**
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java
index 76f412e48..0075e451e 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java
@@ -20,7 +20,7 @@
*/
package org.apache.struts2.showcase.xslt;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
import jakarta.servlet.http.HttpServletRequest;
diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt
index 4342f8b21..c3e913b20 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt
+++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt
@@ -20,7 +20,7 @@ package org.apache.struts2.showcase.conversion;
import java.util.LinkedHashSet;
import java.util.Set;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
/**
* @version $Date$ $Id$
@@ -28,15 +28,15 @@ import com.opensymphony.xwork2.ActionSupport;
public class AddressAction extends ActionSupport {
private Set addresses = new LinkedHashSet();
-
+
public Set getAddresses() { return addresses; }
public void setAddresses(Set addresses) { this.addresses = addresses; }
-
-
+
+
public String input() throws Exception {
return SUCCESS;
}
-
+
public String submit() throws Exception {
System.out.println(addresses);
return SUCCESS;
diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt
index 35e117572..e2ad8d76c 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt
+++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt
@@ -21,28 +21,28 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
/**
- *
+ *
* @version $Date$ $Id$
*/
public class OperationsEnumAction extends ActionSupport {
private static final long serialVersionUID = -2229489704988870318L;
-
+
private List<OperationsEnum> selectedOperations = new LinkedList<OperationsEnum>();
-
+
public List<OperationsEnum> getSelectedOperations() { return this.selectedOperations; }
public void setSelectedOperations(List<OperationsEnum> selectedOperations) {
this.selectedOperations = selectedOperations;
}
-
-
+
+
public List<OperationsEnum> getAvailableOperations() {
return Arrays.asList(OperationsEnum.values());
}
-
+
public String input() throws Exception {
return SUCCESS;
}
diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt
index 1e0bd55e3..fbbcf2dc4 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt
+++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt
@@ -19,24 +19,24 @@ package org.apache.struts2.showcase.conversion;
import java.util.List;
-import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.ActionSupport;
/**
- *
+ *
*/
public class PersonAction extends ActionSupport {
-
+
private List persons;
-
+
public List getPersons() { return persons; }
public void setPersons(List persons) { this.persons = persons; }
-
-
-
+
+
+
public String input() throws Exception {
return SUCCESS;
}
-
+
public String submit() throws Exception {
return SUCCESS;
}
diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
index 9003e52ed..d38ae98ac 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
+++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
@@ -31,11 +31,11 @@
// Calculate the view sources url
String sourceUrl = request.getContextPath() + "/viewSource.action";
- com.opensymphony.xwork2.ActionInvocation inv = com.opensymphony.xwork2.ActionContext.getContext().getActionInvocation();
+ org.apache.struts2.ActionInvocation inv = org.apache.struts2.ActionContext.getContext().getActionInvocation();
org.apache.struts2.dispatcher.mapper.ActionMapping mapping = org.apache.struts2.ServletActionContext.getActionMapping();
if (inv != null) {
try {
- com.opensymphony.xwork2.util.location.Location loc = inv.getProxy().getConfig().getLocation();
+ org.apache.struts2.util.location.Location loc = inv.getProxy().getConfig().getLocation();
sourceUrl += "?config=" + (loc != null ? loc.getURI() + ":" + loc.getLineNumber() : "");
} catch (Exception e) {
sourceUrl += "?config=";
diff --git a/apps/showcase/src/main/webapp/WEB-INF/dwr.xml b/apps/showcase/src/main/webapp/WEB-INF/dwr.xml
index e2ce2bef3..2837fed6d 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/dwr.xml
+++ b/apps/showcase/src/main/webapp/WEB-INF/dwr.xml
@@ -20,8 +20,8 @@
*/
-->
<!-- START SNIPPET: dwr -->
-<!DOCTYPE dwr PUBLIC
- "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
+<!DOCTYPE dwr PUBLIC
+ "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
"http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
@@ -29,7 +29,7 @@
<create creator="new" javascript="validator">
<param name="class" value="org.apache.struts2.validators.DWRValidator"/>
</create>
- <convert converter="bean" match="com.opensymphony.xwork2.ValidationAwareSupport"/>
+ <convert converter="bean" match="org.apache.struts2.ValidationAwareSupport"/>
</allow>
<signatures>
diff --git a/core/pom.xml b/core/pom.xml
index 49ffa39c9..965351898 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -186,7 +186,7 @@
<artifactId>commons-text</artifactId>
</dependency>
- <!-- Optional used in com.opensymphony.xwork2.util.ProxyUtil to detect if object is HibernateProxy -->
+ <!-- Optional used in org.apache.struts2.util.ProxyUtil to detect if object is HibernateProxy -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
diff --git a/core/src/main/java/com/opensymphony/xwork2/Action.java b/core/src/main/java/com/opensymphony/xwork2/Action.java
deleted file mode 100644
index 768ca2678..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/Action.java
+++ /dev/null
@@ -1,88 +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 com.opensymphony.xwork2;
-
-/**
- * All actions <b>may</b> implement this interface, which exposes the <code>execute()</code> method.
- * <p>
- * However, as of XWork 1.1, this is <b>not</b> required and is only here to assist users. You are free to create POJOs
- * that honor the same contract defined by this interface without actually implementing the interface.
- * </p>
- */
-public interface Action {
-
- /**
- * The action execution was successful. Show result
- * view to the end user.
- */
- String SUCCESS = "success";
-
- /**
- * The action execution was successful but do not
- * show a view. This is useful for actions that are
- * handling the view in another fashion like redirect.
- */
- String NONE = "none";
-
- /**
- * The action execution was a failure.
- * Show an error view, possibly asking the
- * user to retry entering data.
- */
- String ERROR = "error";
-
- /**
- * <p>
- * The action execution require more input
- * in order to succeed.
- * This result is typically used if a form
- * handling action has been executed so as
- * to provide defaults for a form. The
- * form associated with the handler should be
- * shown to the end user.
- * </p>
- *
- * <p>
- * This result is also used if the given input
- * params are invalid, meaning the user
- * should try providing input again.
- * </p>
- */
- String INPUT = "input";
-
- /**
- * The action could not execute, since the
- * user most was not logged in. The login view
- * should be shown.
- */
- String LOGIN = "login";
-
-
- /**
- * Where the logic of the action is executed.
- *
- * @return a string representing the logical result of the execution.
- * See constants in this interface for a list of standard result values.
- * @throws Exception thrown if a system level exception occurs.
- * <b>Note:</b> Application level exceptions should be handled by returning
- * an error value, such as <code>Action.ERROR</code>.
- */
- String execute() throws Exception;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java b/core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
deleted file mode 100644
index 6b6c2813e..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
+++ /dev/null
@@ -1,279 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.TextParseUtil;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.StrutsException;
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-
-/**
-* <!-- START SNIPPET: description -->
-*
-* This result invokes an entire other action, complete with it's own interceptor stack and result.
-*
-* <!-- END SNIPPET: description -->
-*
-* <b>This result type takes the following parameters:</b>
-*
-* <!-- START SNIPPET: params -->
-*
-* <ul>
-*
-* <li><b>actionName (default)</b> - the name of the action that will be chained to</li>
-*
-* <li><b>namespace</b> - used to determine which namespace the Action is in that we're chaining. If namespace is null,
-* this defaults to the current namespace</li>
-*
-* <li><b>method</b> - used to specify another method on target action to be invoked.
-* If null, this defaults to execute method</li>
-*
-* <li><b>skipActions</b> - (optional) the list of comma separated action names for the
-* actions that could be chained to</li>
-*
-* </ul>
-*
-* <!-- END SNIPPET: params -->
-*
-* <b>Example:</b>
-*
-* <pre><!-- START SNIPPET: example -->
-* <package name="public" extends="struts-default">
-* <!-- Chain creatAccount to login, using the default parameter -->
-* <action name="createAccount" class="...">
-* <result type="chain">login</result>
-* </action>
-*
-* <action name="login" class="...">
-* <!-- Chain to another namespace -->
-* <result type="chain">
-* <param name="actionName">dashboard</param>
-* <param name="namespace">/secure</param>
-* </result>
-* </action>
-* </package>
-*
-* <package name="secure" extends="struts-default" namespace="/secure">
-* <action name="dashboard" class="...">
-* <result>dashboard.jsp</result>
-* </action>
-* </package>
-* <!-- END SNIPPET: example --></pre>
-*
-* @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
-*/
-public class ActionChainResult implements Result {
-
- private static final Logger LOG = LogManager.getLogger(ActionChainResult.class);
-
- /**
- * The result parameter name to set the name of the action to chain to.
- */
- public static final String DEFAULT_PARAM = "actionName";
-
- /**
- * The action context key to save the chain history.
- */
- private static final String CHAIN_HISTORY = "CHAIN_HISTORY";
-
- private ActionProxy proxy;
- private String actionName;
-
- private String namespace;
-
- private String methodName;
-
- /**
- * The list of actions to skip.
- */
- private String skipActions;
-
- private ActionProxyFactory actionProxyFactory;
-
- public ActionChainResult() {
- super();
- }
-
- public ActionChainResult(String namespace, String actionName, String methodName) {
- this.namespace = namespace;
- this.actionName = actionName;
- this.methodName = methodName;
- }
-
- public ActionChainResult(String namespace, String actionName, String methodName, String skipActions) {
- this.namespace = namespace;
- this.actionName = actionName;
- this.methodName = methodName;
- this.skipActions = skipActions;
- }
-
- /**
- * @param actionProxyFactory the actionProxyFactory to set
- */
- @Inject
- public void setActionProxyFactory(ActionProxyFactory actionProxyFactory) {
- this.actionProxyFactory = actionProxyFactory;
- }
-
- /**
- * Set the action name.
- *
- * @param actionName The action name.
- */
- public void setActionName(String actionName) {
- this.actionName = actionName;
- }
-
- /**
- * sets the namespace of the Action that we're chaining to. if namespace
- * is null, this defaults to the current namespace.
- *
- * @param namespace the name of the namespace we're chaining to
- */
- public void setNamespace(String namespace) {
- this.namespace = namespace;
- }
-
- /**
- * Set the list of actions to skip.
- * To test if an action should not throe an infinite recursion,
- * only the action name is used, not the namespace.
- *
- * @param actions The list of action name separated by a white space.
- */
- public void setSkipActions(String actions) {
- this.skipActions = actions;
- }
-
- public void setMethod(String method) {
- this.methodName = method;
- }
-
- public ActionProxy getProxy() {
- return proxy;
- }
-
- /**
- * Get the XWork chain history.
- * The stack is a list of <code>namespace/action!method</code> keys.
- *
- * @return the chain history as string list
- */
- public static LinkedList<String> getChainHistory() {
- LinkedList<String> chainHistory = (LinkedList<String>) ActionContext.getContext().get(CHAIN_HISTORY);
- // Add if not exists
- if (chainHistory == null) {
- chainHistory = new LinkedList<>();
- ActionContext.getContext().put(CHAIN_HISTORY, chainHistory);
- }
-
- return chainHistory;
- }
-
- /**
- * @param invocation the DefaultActionInvocation calling the action call stack
- */
- public void execute(ActionInvocation invocation) throws Exception {
- if (invocation == null) {
- throw new IllegalArgumentException("Invocation cannot be null!");
- }
-
- String finalNamespace = namespace != null ? translateVariables(namespace) : invocation.getProxy()
- .getNamespace();
- String finalActionName = translateVariables(actionName);
- String finalMethodName = methodName != null ? translateVariables(methodName) : null;
-
- if (isInChainHistory(finalNamespace, finalActionName, finalMethodName)) {
- addToHistory(finalNamespace, finalActionName, finalMethodName);
- throw new StrutsException("Infinite recursion detected: " + ActionChainResult.getChainHistory());
- }
-
- if (ActionChainResult.getChainHistory().isEmpty() && invocation.getProxy() != null) {
- addToHistory(finalNamespace, invocation.getProxy().getActionName(), invocation.getProxy().getMethod());
- }
- addToHistory(finalNamespace, finalActionName, finalMethodName);
-
- Map<String, Object> extraContext = ActionContext.of()
- .withValueStack(invocation.getInvocationContext().getValueStack())
- .withParameters(invocation.getInvocationContext().getParameters())
- .with(CHAIN_HISTORY, ActionChainResult.getChainHistory())
- .getContextMap();
-
- LOG.debug("Chaining to action {}", finalActionName);
-
- proxy = actionProxyFactory.createActionProxy(finalNamespace, finalActionName, finalMethodName, extraContext);
- proxy.execute();
- }
-
- protected String translateVariables(String text) {
- return TextParseUtil.translateVariables(text, ActionContext.getContext().getValueStack());
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- ActionChainResult that = (ActionChainResult) o;
- return Objects.equals(actionName, that.actionName) && Objects.equals(methodName,
- that.methodName) && Objects.equals(namespace, that.namespace);
- }
-
- @Override
- public int hashCode() {
- int result;
- result = (actionName != null ? actionName.hashCode() : 0);
- result = 31 * result + (namespace != null ? namespace.hashCode() : 0);
- result = 31 * result + (methodName != null ? methodName.hashCode() : 0);
- return result;
- }
-
- private boolean isInChainHistory(String namespace, String actionName, String methodName) {
- LinkedList<? extends String> chainHistory = ActionChainResult.getChainHistory();
- Set<String> skipActionsList = new HashSet<>();
- if (skipActions != null && !skipActions.isEmpty()) {
- String finalSkipActions = translateVariables(skipActions);
- skipActionsList.addAll(TextParseUtil.commaDelimitedStringToSet(finalSkipActions));
- }
- if (!skipActionsList.contains(actionName)) {
- return chainHistory.contains(makeKey(namespace, actionName, methodName));
- }
- return false;
- }
-
- private void addToHistory(String namespace, String actionName, String methodName) {
- List<String> chainHistory = ActionChainResult.getChainHistory();
- chainHistory.add(makeKey(namespace, actionName, methodName));
- }
-
- private String makeKey(String namespace, String actionName, String methodName) {
- return namespace + "/" + actionName + (methodName != null ? "!" + methodName : "");
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionContext.java b/core/src/main/java/com/opensymphony/xwork2/ActionContext.java
deleted file mode 100644
index 629c65c80..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionContext.java
+++ /dev/null
@@ -1,544 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.conversion.impl.ConversionData;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.struts2.StrutsException;
-import org.apache.struts2.StrutsStatics;
-import org.apache.struts2.dispatcher.HttpParameters;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-
-import jakarta.servlet.ServletContext;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import jakarta.servlet.jsp.PageContext;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * <p>
- * The ActionContext is the context in which an {@link Action} is executed. Each context is basically a
- * container of objects an action needs for execution like the session, parameters, locale, etc.
- * </p>
- *
- * <p>
- * The ActionContext is thread local which means that values stored in the ActionContext are
- * unique per thread. See the {@link ThreadLocal} class for more information. The benefit of
- * this is you don't need to worry about a user specific action context, you just get it:
- * </p>
- *
- * <code>ActionContext context = ActionContext.getContext();</code>
- *
- * <p>
- * Finally, because of the thread local usage you don't need to worry about making your actions thread safe.
- * </p>
- *
- * @author Patrick Lightbody
- * @author Bill Lynch (docs)
- */
-public class ActionContext implements Serializable {
-
- private static final ThreadLocal<ActionContext> actionContext = new ThreadLocal<>();
-
- /**
- * Constant for the name of the action being executed.
- */
- private static final String ACTION_NAME = "org.apache.struts2.ActionContext.name";
-
- /**
- * Constant for the {@link com.opensymphony.xwork2.util.ValueStack OGNL value stack}.
- */
- private static final String VALUE_STACK = ValueStack.VALUE_STACK;
-
- /**
- * Constant for the action's session.
- */
- private static final String SESSION = "org.apache.struts2.ActionContext.session";
-
- /**
- * Constant for the action's application context.
- */
- private static final String APPLICATION = "org.apache.struts2.ActionContext.application";
-
- /**
- * Constant for the action's parameters.
- */
- private static final String PARAMETERS = "org.apache.struts2.ActionContext.parameters";
-
- /**
- * Constant for the action's locale.
- */
- private static final String LOCALE = "org.apache.struts2.ActionContext.locale";
-
- /**
- * Constant for the action's {@link com.opensymphony.xwork2.ActionInvocation invocation} context.
- */
- private static final String ACTION_INVOCATION = "org.apache.struts2.ActionContext.actionInvocation";
-
- /**
- * Constant for the map of type conversion errors.
- */
- private static final String CONVERSION_ERRORS = "org.apache.struts2.ActionContext.conversionErrors";
-
- /**
- * Constant for the container
- */
- private static final String CONTAINER = "org.apache.struts2.ActionContext.container";
-
- private final Map<String, Object> context;
-
- /**
- * Creates a new ActionContext initialized with another context.
- *
- * @param context a context map.
- */
- protected ActionContext(Map<String, Object> context) {
- this.context = context;
- }
-
- /**
- * Creates a new ActionContext based on passed in Map
- *
- * @param context a map with context values
- * @return new ActionContext
- */
- public static ActionContext of(Map<String, Object> context) {
- if (context == null) {
- throw new IllegalArgumentException("Context cannot be null!");
- }
- return new ActionContext(context);
- }
-
- /**
- * Creates a new ActionContext based on empty Map
- *
- * @return new ActionContext
- */
- public static ActionContext of() {
- return of(new HashMap<>());
- }
-
- /**
- * Binds the provided context with the current thread
- *
- * @param actionContext context to bind to the thread
- * @return context which was bound to the thread
- */
- public static ActionContext bind(ActionContext actionContext) {
- ActionContext.setContext(actionContext);
- return ActionContext.getContext();
- }
-
- public static boolean containsValueStack(Map<String, Object> context) {
- return context != null && context.containsKey(VALUE_STACK);
- }
-
- /**
- * Binds this context with the current thread
- *
- * @return this context which was bound to the thread
- */
- public ActionContext bind() {
- ActionContext.setContext(this);
- return ActionContext.getContext();
- }
-
- /**
- * Wipes out current ActionContext, use wisely!
- */
- public static void clear() {
- actionContext.remove();
- }
-
- /**
- * Sets the action context for the current thread.
- *
- * @param context the action context.
- */
- private static void setContext(ActionContext context) {
- actionContext.set(context);
- }
-
- /**
- * Returns the ActionContext specific to the current thread.
- *
- * @return the ActionContext for the current thread, is never <tt>null</tt>.
- */
- public static ActionContext getContext() {
- return actionContext.get();
- }
-
- /**
- * Sets the action invocation (the execution state).
- *
- * @param actionInvocation the action execution state.
- */
- public ActionContext withActionInvocation(ActionInvocation actionInvocation) {
- put(ACTION_INVOCATION, actionInvocation);
- return this;
- }
-
- /**
- * Gets the action invocation (the execution state).
- *
- * @return the action invocation (the execution state).
- */
- public ActionInvocation getActionInvocation() {
- return (ActionInvocation) get(ACTION_INVOCATION);
- }
-
- /**
- * Sets the action's application context.
- *
- * @param application the action's application context.
- */
- public ActionContext withApplication(Map<String, Object> application) {
- put(APPLICATION, application);
- return this;
- }
-
- /**
- * Returns a Map of the ServletContext when in a servlet environment or a generic application level Map otherwise.
- *
- * @return a Map of ServletContext or generic application level Map
- */
- @SuppressWarnings("unchecked")
- public Map<String, Object> getApplication() {
- return (Map<String, Object>) get(APPLICATION);
- }
-
- /**
- * Gets the context map.
- *
- * @return the context map.
- */
- public Map<String, Object> getContextMap() {
- return context;
- }
-
- /**
- * Sets conversion errors which occurred when executing the action.
- *
- * @param conversionErrors a Map of errors which occurred when executing the action.
- */
- public ActionContext withConversionErrors(Map<String, ConversionData> conversionErrors) {
- put(CONVERSION_ERRORS, conversionErrors);
- return this;
- }
-
- /**
- * Gets the map of conversion errors which occurred when executing the action.
- *
- * @return the map of conversion errors which occurred when executing the action or an empty map if
- * there were no errors.
- */
- @SuppressWarnings("unchecked")
- public Map<String, ConversionData> getConversionErrors() {
- Map<String, ConversionData> errors = (Map<String, ConversionData>) get(CONVERSION_ERRORS);
-
- if (errors == null) {
- errors = withConversionErrors(new HashMap<>()).getConversionErrors();
- }
-
- return errors;
- }
-
- /**
- * Sets the Locale for the current action.
- *
- * @param locale the Locale for the current action.
- */
- public ActionContext withLocale(Locale locale) {
- put(LOCALE, locale);
- return this;
- }
-
- /**
- * Gets the Locale of the current action. If no locale was ever specified the platform's
- * {@link java.util.Locale#getDefault() default locale} is used.
- *
- * @return the Locale of the current action.
- */
- public Locale getLocale() {
- Locale locale = (Locale) get(LOCALE);
-
- if (locale == null) {
- locale = Locale.getDefault();
- withLocale(locale);
- }
-
- return locale;
- }
-
- /**
- * Sets the name of the current Action in the ActionContext.
- *
- * @param actionName the name of the current action.
- */
- public ActionContext withActionName(String actionName) {
- put(ACTION_NAME, actionName);
- return this;
- }
-
- /**
- * Gets the name of the current Action.
- *
- * @return the name of the current action.
- */
- public String getActionName() {
- return (String) get(ACTION_NAME);
- }
-
- /**
- * Sets the action parameters.
- *
- * @param parameters the parameters for the current action.
- */
- public ActionContext withParameters(HttpParameters parameters) {
- put(PARAMETERS, parameters);
- return this;
- }
-
- /**
- * Returns a Map of the HttpServletRequest parameters when in a servlet environment or a generic Map of
- * parameters otherwise.
- *
- * @return a Map of HttpServletRequest parameters or a multipart map when in a servlet environment, or a
- * generic Map of parameters otherwise.
- */
- public HttpParameters getParameters() {
- return (HttpParameters) get(PARAMETERS);
- }
-
- /**
- * Sets a map of action session values.
- *
- * @param session the session values.
- */
- public ActionContext withSession(Map<String, Object> session) {
- put(SESSION, session);
- return this;
- }
-
- /**
- * Gets the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
- *
- * @return the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
- */
- @SuppressWarnings("unchecked")
- public Map<String, Object> getSession() {
- return (Map<String, Object>) get(SESSION);
- }
-
- /**
- * Sets the OGNL value stack.
- *
- * @param valueStack the OGNL value stack.
- */
- public ActionContext withValueStack(ValueStack valueStack) {
- put(VALUE_STACK, valueStack);
- return this;
- }
-
- /**
- * Gets the OGNL value stack.
- *
- * @return the OGNL value stack.
- */
- public ValueStack getValueStack() {
- return (ValueStack) get(VALUE_STACK);
- }
-
- /**
- * Gets the container for this request
- *
- * @param container The container
- */
- public ActionContext withContainer(Container container) {
- put(CONTAINER, container);
- return this;
- }
-
- /**
- * Sets the container for this request
- *
- * @return The container
- */
- public Container getContainer() {
- return (Container) get(CONTAINER);
- }
-
- public <T> T getInstance(Class<T> type) {
- Container cont = getContainer();
- if (cont != null) {
- return cont.getInstance(type);
- } else {
- throw new StrutsException("Cannot find an initialized container for this request.");
- }
- }
-
- /**
- * Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
- *
- * @param key the key used to find the value.
- * @return the value that was found using the key or <tt>null</tt> if the key was not found.
- */
- public Object get(String key) {
- return context.get(key);
- }
-
- /**
- * Stores a value in the current ActionContext. The value can be looked up using the key.
- *
- * @param key the key of the value.
- * @param value the value to be stored.
- */
- public void put(String key, Object value) {
- context.put(key, value);
- }
-
- /**
- * Gets ServletContext associated with current action
- *
- * @return current ServletContext
- */
- public ServletContext getServletContext() {
- return (ServletContext) get(StrutsStatics.SERVLET_CONTEXT);
- }
-
- /**
- * Assigns ServletContext to action context
- *
- * @param servletContext associated with current request
- * @return ActionContext
- */
- public ActionContext withServletContext(ServletContext servletContext) {
- put(StrutsStatics.SERVLET_CONTEXT, servletContext);
- return this;
- }
-
- /**
- * Gets ServletRequest associated with current action
- *
- * @return current ServletRequest
- */
- public HttpServletRequest getServletRequest() {
- return (HttpServletRequest) get(StrutsStatics.HTTP_REQUEST);
- }
-
- /**
- * Assigns ServletRequest to action context
- *
- * @param request associated with current request
- * @return ActionContext
- */
- public ActionContext withServletRequest(HttpServletRequest request) {
- put(StrutsStatics.HTTP_REQUEST, request);
- return this;
- }
-
- /**
- * Gets ServletResponse associated with current action
- *
- * @return current ServletResponse
- */
- public HttpServletResponse getServletResponse() {
- return (HttpServletResponse) get(StrutsStatics.HTTP_RESPONSE);
- }
-
- /**
- * Assigns ServletResponse to action context
- *
- * @param response associated with current request
- * @return ActionContext
- */
- public ActionContext withServletResponse(HttpServletResponse response) {
- put(StrutsStatics.HTTP_RESPONSE, response);
- return this;
- }
-
- /**
- * Gets PageContext associated with current action
- *
- * @return current PageContext
- */
- public PageContext getPageContext() {
- return (PageContext) get(StrutsStatics.PAGE_CONTEXT);
- }
-
- /**
- * Assigns PageContext to action context
- *
- * @param pageContext associated with current request
- * @return ActionContext
- */
- public ActionContext withPageContext(PageContext pageContext) {
- put(StrutsStatics.PAGE_CONTEXT, pageContext);
- return this;
- }
-
- /**
- * Gets ActionMapping associated with current action
- *
- * @return current ActionMapping
- */
- public ActionMapping getActionMapping() {
- return (ActionMapping) get(StrutsStatics.ACTION_MAPPING);
- }
-
- /**
- * Assigns ActionMapping to action context
- *
- * @param actionMapping associated with current request
- * @return ActionContext
- */
- public ActionContext withActionMapping(ActionMapping actionMapping) {
- put(StrutsStatics.ACTION_MAPPING, actionMapping);
- return this;
- }
-
- /**
- * Assigns an extra context map to action context
- *
- * @param extraContext to add to the current action context
- * @return ActionContext
- */
- public ActionContext withExtraContext(Map<String, Object> extraContext) {
- if (extraContext != null) {
- context.putAll(extraContext);
- }
- return this;
- }
-
- /**
- * Adds arbitrary key to action context
- *
- * @param key a string
- * @param value an object
- * @return ActionContext
- */
- public ActionContext with(String key, Object value) {
- put(key, value);
- return this;
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java b/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java
deleted file mode 100644
index d125a683b..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java
+++ /dev/null
@@ -1,44 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * Provides hooks for handling key action events
- */
-public interface ActionEventListener {
- /**
- * Called after an action has been created.
- *
- * @param action The action
- * @param stack The current value stack
- * @return The action to use
- */
- Object prepare(Object action, ValueStack stack);
-
- /**
- * Called when an exception is thrown by the action
- *
- * @param t The exception/error that was thrown
- * @param stack The current value stack
- * @return A result code to execute, can be null
- */
- String handleException(Throwable t, ValueStack stack);
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java
deleted file mode 100644
index 472f23ea7..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java
+++ /dev/null
@@ -1,179 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.interceptor.PreResultListener;
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * An {@link ActionInvocation} represents the execution state of an {@link Action}. It holds the Interceptors and the Action instance.
- * By repeated re-entrant execution of the <code>invoke()</code> method, initially by the {@link ActionProxy}, then by the Interceptors, the
- * Interceptors are all executed, and then the {@link Action} and the {@link Result}.
- *
- * @author Jason Carreira
- * @see com.opensymphony.xwork2.ActionProxy
- */
-public interface ActionInvocation {
-
- /**
- * Get the Action associated with this ActionInvocation.
- *
- * @return the Action
- */
- Object getAction();
-
- /**
- * Gets whether this ActionInvocation has executed before.
- * This will be set after the Action and the Result have executed.
- *
- * @return <tt>true</tt> if this ActionInvocation has executed before.
- */
- boolean isExecuted();
-
- /**
- * Gets the ActionContext associated with this ActionInvocation. The ActionProxy is
- * responsible for setting this ActionContext onto the ThreadLocal before invoking
- * the ActionInvocation and resetting the old ActionContext afterwards.
- *
- * @return the ActionContext.
- */
- ActionContext getInvocationContext();
-
- /**
- * Get the ActionProxy holding this ActionInvocation.
- *
- * @return the ActionProxy.
- */
- ActionProxy getProxy();
-
- /**
- * If the ActionInvocation has been executed before and the Result is an instance of {@link ActionChainResult}, this method
- * will walk down the chain of <code>ActionChainResult</code>s until it finds a non-chain result, which will be returned. If the
- * ActionInvocation's result has not been executed before, the Result instance will be created and populated with
- * the result params.
- *
- * @return the result.
- * @throws Exception can be thrown.
- */
- Result getResult() throws Exception;
-
- /**
- * Gets the result code returned from this ActionInvocation.
- *
- * @return the result code
- */
- String getResultCode();
-
- /**
- * Sets the result code, possibly overriding the one returned by the
- * action.
- *
- * <p>
- * The "intended" purpose of this method is to allow PreResultListeners to
- * override the result code returned by the Action.
- * </p>
- *
- * <p>
- * If this method is used before the Action executes, the Action's returned
- * result code will override what was set. However the Action could (if
- * specifically coded to do so) inspect the ActionInvocation to see that
- * someone "upstream" (e.g. an Interceptor) had suggested a value as the
- * result, and it could therefore return the same value itself.
- * </p>
- *
- * <p>
- * If this method is called between the Action execution and the Result
- * execution, then the value set here will override the result code the
- * action had returned. Creating an Interceptor that implements
- * {@link PreResultListener} will give you this opportunity.
- * </p>
- *
- * <p>
- * If this method is called after the Result has been executed, it will
- * have the effect of raising an IllegalStateException.
- * </p>
- *
- * @param resultCode the result code.
- * @throws IllegalStateException if called after the Result has been executed.
- * @see #isExecuted()
- */
- void setResultCode(String resultCode);
-
- /**
- * Gets the ValueStack associated with this ActionInvocation.
- *
- * @return the ValueStack
- */
- ValueStack getStack();
-
- /**
- * Register a {@link PreResultListener} to be notified after the Action is executed and
- * before the Result is executed.
- *
- * <p>
- * The ActionInvocation implementation must guarantee that listeners will be called in
- * the order in which they are registered.
- * </p>
- *
- * <p>
- * Listener registration and execution does not need to be thread-safe.
- * </p>
- *
- * @param listener the listener to add.
- */
- void addPreResultListener(PreResultListener listener);
-
- /**
- * Invokes the next step in processing this ActionInvocation.
- *
- * <p>
- * If there are more Interceptors, this will call the next one. If Interceptors choose not to short-circuit
- * ActionInvocation processing and return their own return code, they will call invoke() to allow the next Interceptor
- * to execute. If there are no more Interceptors to be applied, the Action is executed.
- * If the {@link ActionProxy#getExecuteResult()} method returns <tt>true</tt>, the Result is also executed.
- * </p>
- *
- * @throws Exception can be thrown.
- * @return the return code.
- */
- String invoke() throws Exception;
-
- /**
- * Invokes only the Action (not Interceptors or Results).
- *
- * <p>
- * This is useful in rare situations where advanced usage with the interceptor/action/result workflow is
- * being manipulated for certain functionality.
- * </p>
- *
- * @return the return code.
- * @throws Exception can be thrown.
- */
- String invokeActionOnly() throws Exception;
-
- /**
- * Sets the action event listener to respond to key action events.
- *
- * @param listener the listener.
- */
- void setActionEventListener(ActionEventListener listener);
-
- void init(ActionProxy proxy) ;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionProxy.java b/core/src/main/java/com/opensymphony/xwork2/ActionProxy.java
deleted file mode 100644
index 595671462..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionProxy.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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-
-/**
- * ActionProxy is an extra layer between XWork and the action so that different proxies are possible.
- *
- * <p>
- * An example of this would be a remote proxy, where the layer between XWork and the action might be RMI or SOAP.
- * </p>
- *
- * @author Jason Carreira
- */
-public interface ActionProxy {
-
- /**
- * Gets the Action instance for this Proxy.
- *
- * @return the Action instance
- */
- Object getAction();
-
- /**
- * Gets the alias name this ActionProxy is mapped to.
- *
- * @return the alias name
- */
- String getActionName();
-
- /**
- * Gets the ActionConfig this ActionProxy is built from.
- *
- * @return the ActionConfig
- */
- ActionConfig getConfig();
-
- /**
- * Sets whether this ActionProxy should also execute the Result after executing the Action.
- *
- * @param executeResult <tt>true</tt> to also execute the Result.
- */
- void setExecuteResult(boolean executeResult);
-
- /**
- * Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.
- *
- * @return the status
- */
- boolean getExecuteResult();
-
- /**
- * Gets the ActionInvocation associated with this ActionProxy.
- *
- * @return the ActionInvocation
- */
- ActionInvocation getInvocation();
-
- /**
- * Gets the namespace the ActionConfig for this ActionProxy is mapped to.
- *
- * @return the namespace
- */
- String getNamespace();
-
- /**
- * Execute this ActionProxy. This will set the ActionContext from the ActionInvocation into the ActionContext
- * ThreadLocal before invoking the ActionInvocation, then set the old ActionContext back into the ThreadLocal.
- *
- * @return the result code returned from executing the ActionInvocation
- * @throws Exception can be thrown.
- * @see ActionInvocation
- */
- String execute() throws Exception;
-
- /**
- * Gets the method name to execute, or <tt>null</tt> if no method has been specified (meaning <code>execute</code> will be invoked).
- *
- * @return the method to execute
- */
- String getMethod();
-
- /**
- * Gets status of the method value's initialization.
- *
- * @return true if the method returned by getMethod() is not a default initializer value.
- */
- boolean isMethodSpecified();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.java b/core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.java
deleted file mode 100644
index 565afd12c..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.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 com.opensymphony.xwork2;
-
-import java.util.Map;
-
-/**
- * The {@link ActionProxyFactory} is used to create {@link ActionProxy}s to be executed.
- *
- * <p>
- * It is the entry point to XWork that is used by a dispatcher to create an {@link ActionProxy} to execute
- * for a particular namespace and action name.
- * </p>
- *
- * @author Jason Carreira
- * @see DefaultActionProxyFactory
- */
-public interface ActionProxyFactory {
-
- /**
- * Creates an {@link ActionProxy} for the given namespace and action name by looking up the configuration.The ActionProxy
- * should be fully initialized when it is returned, including having an {@link ActionInvocation} instance associated.
- *
- * <p>
- * <b>Note:</b> This is the most used create method.
- * </p>
- *
- * @param namespace the namespace of the action, can be <tt>null</tt>
- * @param actionName the name of the action
- * @param methodName the name of the method to execute
- * @param extraContext a Map of extra parameters to be provided to the ActionProxy, can be <tt>null</tt>
- * @return ActionProxy the created action proxy
- * @since 2.1.1
- */
- ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext);
-
- /**
- * Creates an {@link ActionProxy} for the given namespace and action name by looking up the configuration.The ActionProxy
- * should be fully initialized when it is returned, including having an {@link ActionInvocation} instance associated.
- *
- * @param namespace the namespace of the action, can be <tt>null</tt>
- * @param actionName the name of the action
- * @param methodName the name of the method to execute
- * @param extraContext a Map of extra parameters to be provided to the ActionProxy, can be <tt>null</tt>
- * @param executeResult flag which tells whether the result should be executed after the action
- * @param cleanupContext flag which tells whether the original context should be preserved during execution of the proxy.
- * @return ActionProxy the created action proxy
- * @since 2.1.1
- */
- ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext);
-
-
- /**
- * Creates an {@link ActionProxy} for the given namespace and action name by looking up the configuration.The ActionProxy
- * should be fully initialized when it is returned, including passed {@link ActionInvocation} instance.
- *
- * @param actionInvocation the action invocation instance to associate with
- * @param namespace the namespace of the action, can be <tt>null</tt>
- * @param actionName the name of the action
- * @param methodName the name of the method to execute
- * @param executeResult flag which tells whether the result should be executed after the action
- * @param cleanupContext flag which tells whether the original context should be preserved during execution of the proxy.
- * @return ActionProxy the created action proxy
- * @since 2.1.1
- */
- ActionProxy createActionProxy(ActionInvocation actionInvocation, String namespace, String actionName, String methodName,
- boolean executeResult, boolean cleanupContext);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
deleted file mode 100644
index 33a88be36..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
+++ /dev/null
@@ -1,363 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.conversion.impl.ConversionData;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.interceptor.ValidationAware;
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.StrutsConstants;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-/**
- * Provides a default implementation for the most common actions.
- * See the documentation for all the interfaces this class implements for more detailed information.
- */
-public class ActionSupport implements Action, Validateable, ValidationAware, TextProvider, LocaleProvider, Serializable {
-
- private static final Logger LOG = LogManager.getLogger(ActionSupport.class);
-
- private final ValidationAwareSupport validationAware = new ValidationAwareSupport();
-
- private transient TextProvider textProvider;
- private transient LocaleProvider localeProvider;
-
- protected Container container;
-
- @Override
- public void setActionErrors(Collection<String> errorMessages) {
- validationAware.setActionErrors(errorMessages);
- }
-
- @Override
- public Collection<String> getActionErrors() {
- return validationAware.getActionErrors();
- }
-
- @Override
- public void setActionMessages(Collection<String> messages) {
- validationAware.setActionMessages(messages);
- }
-
- @Override
- public Collection<String> getActionMessages() {
- return validationAware.getActionMessages();
- }
-
- @Override
- public void setFieldErrors(Map<String, List<String>> errorMap) {
- validationAware.setFieldErrors(errorMap);
- }
-
- @Override
- public Map<String, List<String>> getFieldErrors() {
- return validationAware.getFieldErrors();
- }
-
- @Override
- public Locale getLocale() {
- return getLocaleProvider().getLocale();
- }
-
- @Override
- public boolean isValidLocaleString(String localeStr) {
- return getLocaleProvider().isValidLocaleString(localeStr);
- }
-
- @Override
- public boolean isValidLocale(Locale locale) {
- return getLocaleProvider().isValidLocale(locale);
- }
-
- @Override
- public Locale toLocale(String localeStr) {
- return getLocaleProvider().toLocale(localeStr);
- }
-
- @Override
- public boolean hasKey(String key) {
- return getTextProvider().hasKey(key);
- }
-
- @Override
- public String getText(String aTextName) {
- return getTextProvider().getText(aTextName);
- }
-
- @Override
- public String getText(String aTextName, String defaultValue) {
- return getTextProvider().getText(aTextName, defaultValue);
- }
-
- @Override
- public String getText(String aTextName, String defaultValue, String obj) {
- return getTextProvider().getText(aTextName, defaultValue, obj);
- }
-
- @Override
- public String getText(String aTextName, List<?> args) {
- return getTextProvider().getText(aTextName, args);
- }
-
- @Override
- public String getText(String key, String[] args) {
- return getTextProvider().getText(key, args);
- }
-
- @Override
- public String getText(String aTextName, String defaultValue, List<?> args) {
- return getTextProvider().getText(aTextName, defaultValue, args);
- }
-
- @Override
- public String getText(String key, String defaultValue, String[] args) {
- return getTextProvider().getText(key, defaultValue, args);
- }
-
- @Override
- public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
- return getTextProvider().getText(key, defaultValue, args, stack);
- }
-
- @Override
- public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
- return getTextProvider().getText(key, defaultValue, args, stack);
- }
-
- /**
- * Dedicated method to support I10N and conversion errors
- *
- * @param key message which contains formatting string
- * @param expr that should be formatted
- * @return formatted expr with format specified by key
- */
- public String getFormatted(String key, String expr) {
- Map<String, ConversionData> conversionErrors = ActionContext.getContext().getConversionErrors();
- if (conversionErrors.containsKey(expr)) {
- String[] vals = (String[]) conversionErrors.get(expr).getValue();
- return vals[0];
- } else {
- final ValueStack valueStack = ActionContext.getContext().getValueStack();
- final Object val = valueStack.findValue(expr);
- return getText(key, List.of(val));
- }
- }
-
- @Override
- public ResourceBundle getTexts() {
- return getTextProvider().getTexts();
- }
-
- @Override
- public ResourceBundle getTexts(String aBundleName) {
- return getTextProvider().getTexts(aBundleName);
- }
-
- @Override
- public void addActionError(String anErrorMessage) {
- validationAware.addActionError(anErrorMessage);
- }
-
- @Override
- public void addActionMessage(String aMessage) {
- validationAware.addActionMessage(aMessage);
- }
-
- @Override
- public void addFieldError(String fieldName, String errorMessage) {
- validationAware.addFieldError(fieldName, errorMessage);
- }
-
- public String input() throws Exception {
- return INPUT;
- }
-
- /**
- * A default implementation that does nothing an returns "success".
- *
- * <p>
- * Subclasses should override this method to provide their business logic.
- * </p>
- *
- * <p>
- * See also {@link com.opensymphony.xwork2.Action#execute()}.
- * </p>
- *
- * @return returns {@link #SUCCESS}
- * @throws Exception can be thrown by subclasses.
- */
- @Override
- public String execute() throws Exception {
- return SUCCESS;
- }
-
- @Override
- public boolean hasActionErrors() {
- return validationAware.hasActionErrors();
- }
-
- @Override
- public boolean hasActionMessages() {
- return validationAware.hasActionMessages();
- }
-
- @Override
- public boolean hasErrors() {
- return validationAware.hasErrors();
- }
-
- @Override
- public boolean hasFieldErrors() {
- return validationAware.hasFieldErrors();
- }
-
- /**
- * Clears field errors. Useful for Continuations and other situations
- * where you might want to clear parts of the state on the same action.
- */
- public void clearFieldErrors() {
- validationAware.clearFieldErrors();
- }
-
- /**
- * Clears action errors. Useful for Continuations and other situations
- * where you might want to clear parts of the state on the same action.
- */
- public void clearActionErrors() {
- validationAware.clearActionErrors();
- }
-
- /**
- * Clears messages. Useful for Continuations and other situations
- * where you might want to clear parts of the state on the same action.
- */
- public void clearMessages() {
- validationAware.clearMessages();
- }
-
- /**
- * Clears all errors. Useful for Continuations and other situations
- * where you might want to clear parts of the state on the same action.
- */
- public void clearErrors() {
- validationAware.clearErrors();
- }
-
- /**
- * Clears all errors and messages. Useful for Continuations and other situations
- * where you might want to clear parts of the state on the same action.
- */
- public void clearErrorsAndMessages() {
- validationAware.clearErrorsAndMessages();
- }
-
- /**
- * A default implementation that validates nothing.
- * Subclasses should override this method to provide validations.
- */
- @Override
- public void validate() {
- // A default implementation that validates nothing
- }
-
- @Override
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
- /**
- * <!-- START SNIPPET: pause-method -->
- * Stops the action invocation immediately (by throwing a PauseException) and causes the action invocation to return
- * the specified result, such as {@link #SUCCESS}, {@link #INPUT}, etc.
- *
- * <p>
- * The next time this action is invoked (and using the same continuation ID), the method will resume immediately
- * after where this method was called, with the entire call stack in the execute method restored.
- * </p>
- *
- * <p>
- * Note: this method can <b>only</b> be called within the {@link #execute()} method.
- * </p>
- *
- * <!-- END SNIPPET: pause-method -->
- *
- * @param result the result to return - the same type of return value in the {@link #execute()} method.
- */
- public void pause(String result) {
- }
-
- /**
- * If called first time it will create {@link com.opensymphony.xwork2.TextProviderFactory},
- * inject dependency (if {@link com.opensymphony.xwork2.inject.Container} is accesible) into in,
- * then will create new {@link com.opensymphony.xwork2.TextProvider} and store it in a field
- * for future references and at the returns reference to that field
- *
- * @return reference to field with TextProvider
- */
- protected TextProvider getTextProvider() {
- if (textProvider == null) {
- final TextProviderFactory tpf = getContainer().getInstance(TextProviderFactory.class);
- textProvider = tpf.createInstance(getClass());
- }
- return textProvider;
- }
-
- protected LocaleProvider getLocaleProvider() {
- if (localeProvider == null) {
- final LocaleProviderFactory localeProviderFactory = getContainer().getInstance(LocaleProviderFactory.class);
- localeProvider = localeProviderFactory.createLocaleProvider();
- }
- return localeProvider;
- }
-
- /**
- * TODO: This a temporary solution, maybe we should consider stop injecting container into beans
- */
- protected Container getContainer() {
- if (container == null) {
- container = ActionContext.getContext().getContainer();
- if (container != null) {
- boolean devMode = Boolean.parseBoolean(container.getInstance(String.class, StrutsConstants.STRUTS_DEVMODE));
- if (devMode) {
- LOG.warn("Container is null, action was created manually? Fallback to ActionContext");
- } else {
- LOG.debug("Container is null, action was created manually? Fallback to ActionContext");
- }
- } else {
- LOG.warn("Container is null, action was created out of ActionContext scope?!?");
- }
- }
- return container;
- }
-
- @Inject
- public void setContainer(Container container) {
- this.container = container;
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/AsyncManager.java b/core/src/main/java/com/opensymphony/xwork2/AsyncManager.java
deleted file mode 100644
index a4dd07161..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/AsyncManager.java
+++ /dev/null
@@ -1,35 +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 com.opensymphony.xwork2;
-
-import java.util.concurrent.Callable;
-
-/**
- * Adds support for invoke async actions. This allows us to support action methods that return {@link Callable}
- * as well as invoking them in separate not-container thread then executing the result in another container thread.
- *
- * @since 6.0.0
- */
-public interface AsyncManager {
- boolean hasAsyncActionResult();
-
- Object getAsyncActionResult();
-
- void invokeAsyncAction(Callable asyncAction);
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java b/core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
deleted file mode 100644
index 4ab017c11..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
+++ /dev/null
@@ -1,295 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.ResourceBundle;
-
-/**
- * This is a composite {@link TextProvider} that takes in an array or {@link java.util.List} of {@link TextProvider}s, it will
- * consult each of them in order to get a composite result. To know how each method behaves, please refer to the
- * javadoc for each methods.
- *
- * @author tmjee
- */
-public class CompositeTextProvider implements TextProvider {
-
- private static final Logger LOG = LogManager.getLogger(CompositeTextProvider.class);
-
- private final List<TextProvider> textProviders = new ArrayList<>();
-
- /**
- * Instantiates a {@link CompositeTextProvider} with some predefined <code>textProviders</code>.
- *
- * @param textProviders list of text providers
- */
- public CompositeTextProvider(List<TextProvider> textProviders) {
- this.textProviders.addAll(textProviders);
- }
-
- /**
- * Instantiates a {@link CompositeTextProvider} with some predefined <code>textProviders</code>.
- *
- * @param textProviders array of text providers
- */
- public CompositeTextProvider(TextProvider[] textProviders) {
- this(Arrays.asList(textProviders));
- }
-
- /**
- * It will consult each individual {@link TextProvider}s and return true if either one of the {@link TextProvider}" has such a <code>key</code> else false.
- *
- * @param key The key to lookup in resource bundles.
- * @return <tt>true</tt>, if the requested key is found in one of the resource bundles.
- *
- * @see com.opensymphony.xwork2.TextProvider#hasKey(String)
- *
- */
- @Override
- public boolean hasKey(String key) {
- // if there's a key in either text providers we are ok, else try the next text provider
- for (TextProvider tp : textProviders) {
- if (tp.hasKey(key)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>
- *
- * @param key The key to lookup in resource bundles.
- * @return The i18n text for the requested key.
- * @see com.opensymphony.xwork2.TextProvider#getText(String)
- */
- @Override
- public String getText(String key) {
- return getText(key, key, Collections.emptyList());
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code> before returning <code>defaultValue</code> if every else fails.
- *
- * @param key the message key
- * @param defaultValue the default value
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String)
- */
- @Override
- public String getText(String key, String defaultValue) {
- return getText(key, defaultValue, Collections.emptyList());
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>, before returning <code>defaultValue</code>
- * if every else fails.
- *
- * @param key the message key
- * @param defaultValue the default value
- * @param obj object
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String)
- */
- @Override
- public String getText(String key, String defaultValue, final String obj) {
- return getText(key, defaultValue, List.of(obj));
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>.
- *
- * @param key the message key
- * @param args additional arguments
- * @return the first valid message for the key
- * @see com.opensymphony.xwork2.TextProvider#getText(String, java.util.List)
- */
- @Override
- public String getText(String key, List<?> args) {
- return getText(key, key, args);
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>.
- *
- * @param key the message key
- * @param args additional arguments
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String[])
- */
- @Override
- public String getText(String key, String[] args) {
- return getText(key, key, args);
- }
-
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>, before returning <code>defaultValue</code>
- *
- * @param key the message key
- * @param defaultValue the default value
- * @param args additional arguments
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List)
- */
- @Override
- public String getText(String key, String defaultValue, List<?> args) {
- // if there's one text provider that gives us a msg not the same as defaultValue
- // for this key, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- String msg = textProvider.getText(key, defaultValue, args);
- if (msg != null && (!msg.equals(defaultValue))) {
- return msg;
- }
- }
- return defaultValue;
- }
-
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>, before returning <code>defaultValue</code>.
- *
- * @param key the message key
- * @param defaultValue the default value
- * @param args additional arguments
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[])
- */
- @Override
- public String getText(String key, String defaultValue, String[] args) {
- // if there's one text provider that gives us a msg not the same as defaultValue
- // for this key, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- String msg = textProvider.getText(key, defaultValue, args);
- if (msg != null && (!msg.equals(defaultValue))) {
- return msg;
- }
- }
- return defaultValue;
- }
-
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>, before returning <code>defaultValue</code>
- *
- * @param key the message key
- * @param defaultValue the default value
- * @param args additional arguments
- * @param stack the value stack
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List, com.opensymphony.xwork2.util.ValueStack)
- */
- @Override
- public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
- // if there's one text provider that gives us a msg not the same as defaultValue
- // for this key, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- String msg = textProvider.getText(key, defaultValue, args, stack);
- if (msg != null && (!msg.equals(defaultValue))) {
- return msg;
- }
- }
- return defaultValue;
- }
-
- /**
- * It will consult each {@link TextProvider}s and return the first valid message for this
- * <code>key</code>, before returning <code>defaultValue</code>
- *
- * @param key the message key
- * @param defaultValue the default value
- * @param args additional arguments
- * @param stack the value stack
- * @return the first valid message for the key or default value
- * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[], com.opensymphony.xwork2.util.ValueStack)
- */
- @Override
- public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
- // if there's one text provider that gives us a msg not the same as defaultValue
- // for this key, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- String msg = textProvider.getText(key, defaultValue, args, stack);
- if (msg != null && (!msg.equals(defaultValue))) {
- return msg;
- }
- }
- return defaultValue;
- }
-
-
- /**
- * It will consult each {@link TextProvider}s and return the first non-null {@link ResourceBundle}.
- *
- * @param bundleName the bundle name
- * @return the resource bundle found for bundle name
- * @see TextProvider#getTexts(String)
- */
- @Override
- public ResourceBundle getTexts(String bundleName) {
- // if there's one text provider that gives us a non-null resource bundle for this bundleName, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- ResourceBundle bundle = textProvider.getTexts(bundleName);
- if (bundle != null) {
- return bundle;
- }
- }
- return null;
- }
-
- /**
- * It will consult each {@link com.opensymphony.xwork2.TextProvider}s and return the first non-null {@link ResourceBundle}.
- *
- * @return the resource bundle
- * @see TextProvider#getTexts()
- */
- @Override
- public ResourceBundle getTexts() {
- // if there's one text provider that gives us a non-null resource bundle, we are ok, else try the next
- // text provider
- for (TextProvider textProvider : textProviders) {
- ResourceBundle bundle = textProvider.getTexts();
- if (bundle != null) {
- return bundle;
- }
- }
- return null;
- }
-}
-
-
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
deleted file mode 100644
index fe32bde35..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ /dev/null
@@ -1,512 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.InterceptorMapping;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.interceptor.ConditionalInterceptor;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.interceptor.PreResultListener;
-import com.opensymphony.xwork2.interceptor.WithLazyParams;
-import com.opensymphony.xwork2.ognl.OgnlUtil;
-import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
-import ognl.MethodFailedException;
-import ognl.NoSuchPropertyException;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.StrutsException;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
-/**
- * The Default ActionInvocation implementation
- *
- * @author Rainer Hermanns
- * @author tmjee
- * @version $Date$ $Id$
- * @see com.opensymphony.xwork2.DefaultActionProxy
- */
-public class DefaultActionInvocation implements ActionInvocation {
-
- private static final Logger LOG = LogManager.getLogger(DefaultActionInvocation.class);
-
- protected Object action;
- protected ActionProxy proxy;
- protected List<PreResultListener> preResultListeners;
- protected Map<String, Object> extraContext;
- protected ActionContext invocationContext;
- protected Iterator<InterceptorMapping> interceptors;
- protected ValueStack stack;
- protected Result result;
- protected Result explicitResult;
- protected String resultCode;
- protected boolean executed = false;
- protected boolean pushAction;
- protected ObjectFactory objectFactory;
- protected ActionEventListener actionEventListener;
- protected ValueStackFactory valueStackFactory;
- protected Container container;
- protected UnknownHandlerManager unknownHandlerManager;
- protected OgnlUtil ognlUtil;
- protected AsyncManager asyncManager;
- protected Callable<?> asyncAction;
- protected WithLazyParams.LazyParamInjector lazyParamInjector;
-
- public DefaultActionInvocation(final Map<String, Object> extraContext, final boolean pushAction) {
- this.extraContext = extraContext;
- this.pushAction = pushAction;
- }
-
- @Inject
- public void setUnknownHandlerManager(UnknownHandlerManager unknownHandlerManager) {
- this.unknownHandlerManager = unknownHandlerManager;
- }
-
- @Inject
- public void setValueStackFactory(ValueStackFactory fac) {
- this.valueStackFactory = fac;
- }
-
- @Inject
- public void setObjectFactory(ObjectFactory fac) {
- this.objectFactory = fac;
- }
-
- @Inject
- public void setContainer(Container cont) {
- this.container = cont;
- }
-
- @Inject(required = false)
- @Override
- public void setActionEventListener(ActionEventListener listener) {
- this.actionEventListener = listener;
- }
-
- @Inject
- public void setOgnlUtil(OgnlUtil ognlUtil) {
- this.ognlUtil = ognlUtil;
- }
-
- @Inject(required = false)
- public void setAsyncManager(AsyncManager asyncManager) {
- this.asyncManager = asyncManager;
- }
-
- @Override
- public Object getAction() {
- return action;
- }
-
- @Override
- public boolean isExecuted() {
- return executed;
- }
-
- @Override
- public ActionContext getInvocationContext() {
- return invocationContext;
- }
-
- @Override
- public ActionProxy getProxy() {
- return proxy;
- }
-
- /**
- * If the DefaultActionInvocation has been executed before and the Result is an instance of ActionChainResult, this method
- * will walk down the chain of ActionChainResults until it finds a non-chain result, which will be returned. If the
- * DefaultActionInvocation's result has not been executed before, the Result instance will be created and populated with
- * the result params.
- *
- * @return a Result instance
- * @throws Exception in case of any error
- */
- @Override
- public Result getResult() throws Exception {
- Result returnResult = result;
-
- // If we've chained to other Actions, we need to find the last result
- while (returnResult instanceof ActionChainResult) {
- ActionProxy aProxy = ((ActionChainResult) returnResult).getProxy();
-
- if (aProxy != null) {
- Result proxyResult = aProxy.getInvocation().getResult();
-
- if ((proxyResult != null) && (aProxy.getExecuteResult())) {
- returnResult = proxyResult;
- } else {
- break;
- }
- } else {
- break;
- }
- }
-
- return returnResult;
- }
-
- @Override
- public String getResultCode() {
- return resultCode;
- }
-
- @Override
- public void setResultCode(String resultCode) {
- if (isExecuted()) {
- throw new IllegalStateException("Result has already been executed.");
- }
- this.resultCode = resultCode;
- }
-
- @Override
- public ValueStack getStack() {
- return stack;
- }
-
- /**
- * Register a com.opensymphony.xwork2.interceptor.PreResultListener to be notified after the Action is executed and before the
- * Result is executed. The ActionInvocation implementation must guarantee that listeners will be called in the order
- * in which they are registered. Listener registration and execution does not need to be thread-safe.
- *
- * @param listener to register
- */
- @Override
- public void addPreResultListener(PreResultListener listener) {
- if (preResultListeners == null) {
- preResultListeners = new ArrayList<>(1);
- }
-
- preResultListeners.add(listener);
- }
-
- public Result createResult() throws Exception {
- LOG.trace("Creating result related to resultCode [{}]", resultCode);
-
- if (explicitResult != null) {
- Result ret = explicitResult;
- explicitResult = null;
-
- return ret;
- }
- ActionConfig config = proxy.getConfig();
- Map<String, ResultConfig> results = config.getResults();
-
- ResultConfig resultConfig = null;
-
- try {
- resultConfig = results.get(resultCode);
- } catch (NullPointerException e) {
- LOG.debug("Got NPE trying to read result configuration for resultCode [{}]", resultCode);
- }
-
- if (resultConfig == null) {
- // If no result is found for the given resultCode, try to get a wildcard '*' match.
- resultConfig = results.get("*");
- }
-
- if (resultConfig != null) {
- try {
- return objectFactory.buildResult(resultConfig, invocationContext.getContextMap());
- } catch (Exception e) {
- LOG.error("There was an exception while instantiating the result of type {}", resultConfig.getClassName(), e);
- throw new StrutsException(e, resultConfig);
- }
- } else if (resultCode != null && !Action.NONE.equals(resultCode) && unknownHandlerManager.hasUnknownHandlers()) {
- return unknownHandlerManager.handleUnknownResult(invocationContext, proxy.getActionName(), proxy.getConfig(), resultCode);
- }
- return null;
- }
-
- /**
- * @throws ConfigurationException If no result can be found with the returned code
- */
- @Override
- public String invoke() throws Exception {
- if (executed) {
- throw new IllegalStateException("Action has already executed");
- }
-
- if (asyncManager == null || !asyncManager.hasAsyncActionResult()) {
- if (interceptors.hasNext()) {
- final InterceptorMapping interceptorMapping = interceptors.next();
- Interceptor interceptor = interceptorMapping.getInterceptor();
- if (interceptor instanceof WithLazyParams) {
- interceptor = lazyParamInjector.injectParams(interceptor, interceptorMapping.getParams(), invocationContext);
- }
- if (interceptor instanceof ConditionalInterceptor) {
- resultCode = executeConditional((ConditionalInterceptor) interceptor);
- } else {
- LOG.debug("Executing normal interceptor: {}", interceptorMapping.getName());
- resultCode = interceptor.intercept(this);
- }
- } else {
- resultCode = invokeActionOnly();
- }
- } else {
- Object asyncActionResult = asyncManager.getAsyncActionResult();
- if (asyncActionResult instanceof Throwable) {
- throw new Exception((Throwable) asyncActionResult);
- }
- asyncAction = null;
- resultCode = saveResult(proxy.getConfig(), asyncActionResult);
- }
-
- if (asyncManager == null || asyncAction == null) {
- // this is needed because the result will be executed, then control will return to the Interceptor, which will
- // return above and flow through again
- if (!executed) {
- if (preResultListeners != null) {
- LOG.trace("Executing PreResultListeners for result [{}]", result);
-
- for (PreResultListener listener : preResultListeners) {
- listener.beforeResult(this, resultCode);
- }
- }
-
- // now execute the result, if we're supposed to
- if (proxy.getExecuteResult()) {
- executeResult();
- }
-
- executed = true;
- }
- } else {
- asyncManager.invokeAsyncAction(asyncAction);
- }
-
- return resultCode;
- }
-
- protected String executeConditional(ConditionalInterceptor conditionalInterceptor) throws Exception {
- if (conditionalInterceptor.shouldIntercept(this)) {
- LOG.debug("Executing conditional interceptor: {}", conditionalInterceptor.getClass().getSimpleName());
- return conditionalInterceptor.intercept(this);
- } else {
- LOG.debug("Interceptor: {} is disabled, skipping to next", conditionalInterceptor.getClass().getSimpleName());
- return this.invoke();
- }
- }
-
- @Override
- public String invokeActionOnly() throws Exception {
- return invokeAction(getAction(), proxy.getConfig());
- }
-
- protected void createAction(Map<String, Object> contextMap) {
- // load action
- try {
- action = objectFactory.buildAction(proxy.getActionName(), proxy.getNamespace(), proxy.getConfig(), contextMap);
- } catch (InstantiationException e) {
- throw new StrutsException("Unable to instantiate Action!", e, proxy.getConfig());
- } catch (IllegalAccessException e) {
- throw new StrutsException("Illegal access to constructor, is it public?", e, proxy.getConfig());
- } catch (Exception e) {
- String gripe;
-
- if (proxy == null) {
- gripe = "Whoa! No ActionProxy instance found in current ActionInvocation. This is bad ... very bad";
- } else if (proxy.getConfig() == null) {
- gripe = "Sheesh. Where'd that ActionProxy get to? I can't find it in the current ActionInvocation!?";
- } else if (proxy.getConfig().getClassName() == null) {
- gripe = "No Action defined for '" + proxy.getActionName() + "' in namespace '" + proxy.getNamespace() + "'";
- } else {
- gripe = "Unable to instantiate Action, " + proxy.getConfig().getClassName() + ", defined for '" + proxy.getActionName() + "' in namespace '" + proxy.getNamespace() + "'";
- }
-
- gripe += e.getMessage();
- throw new StrutsException(gripe, e, proxy.getConfig());
- }
-
- if (actionEventListener != null) {
- action = actionEventListener.prepare(action, stack);
- }
- }
-
- protected Map<String, Object> createContextMap() {
- ActionContext actionContext;
-
- if (ActionContext.containsValueStack(extraContext)) {
- // In case the ValueStack was passed in
- stack = ActionContext.of(extraContext).getValueStack();
-
- if (stack == null) {
- throw new IllegalStateException("There was a null Stack set into the extra params.");
- }
-
- } else {
- // create the value stack
- // this also adds the ValueStack to its context
- stack = valueStackFactory.createValueStack();
-
- // create the action context
- }
- actionContext = stack.getActionContext();
-
- return actionContext
- .withExtraContext(extraContext)
- .withActionInvocation(this)
- .withContainer(container)
- .getContextMap();
- }
-
- /**
- * Uses getResult to get the final Result and executes it
- *
- * @throws ConfigurationException If not result can be found with the returned code
- */
- private void executeResult() throws Exception {
- result = createResult();
-
- if (result != null) {
- result.execute(this);
- } else if (resultCode != null && !Action.NONE.equals(resultCode)) {
- throw new ConfigurationException("No result defined for action " + getAction().getClass().getName()
- + " and result " + getResultCode(), proxy.getConfig());
- } else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("No result returned for action {} at {}", getAction().getClass().getName(), proxy.getConfig().getLocation());
- }
- }
- }
-
- @Override
- public void init(ActionProxy proxy) {
- this.proxy = proxy;
- Map<String, Object> contextMap = createContextMap();
-
- // Setting this so that other classes, like object factories, can use the ActionProxy and other
- // contextual information to operate
- ActionContext actionContext = ActionContext.getContext();
-
- if (actionContext != null) {
- actionContext.withActionInvocation(this);
- }
-
- createAction(contextMap);
-
- if (pushAction) {
- stack.push(action);
- contextMap.put("action", action);
- }
-
- invocationContext = ActionContext.of(contextMap)
- .withActionName(proxy.getActionName());
-
- createInterceptors(proxy);
-
- prepareLazyParamInjector(invocationContext.getValueStack());
- }
-
- protected void prepareLazyParamInjector(ValueStack valueStack) {
- lazyParamInjector = new WithLazyParams.LazyParamInjector(valueStack);
- container.inject(lazyParamInjector);
- }
-
- protected void createInterceptors(ActionProxy proxy) {
- // Get a new List so we don't get problems with the iterator if someone changes the original list
- List<InterceptorMapping> interceptorList = new ArrayList<>(proxy.getConfig().getInterceptors());
- interceptors = interceptorList.iterator();
- }
-
- protected String invokeAction(Object action, ActionConfig actionConfig) throws Exception {
- String methodName = proxy.getMethod();
-
- LOG.debug("Executing action method = {}", methodName);
-
- try {
- Object methodResult;
- try {
- methodResult = ognlUtil.callMethod(methodName + "()", getStack().getContext(), action);
- } catch (MethodFailedException e) {
- // if reason is missing method, try checking UnknownHandlers
- if (e.getReason() instanceof NoSuchMethodException) {
- if (unknownHandlerManager.hasUnknownHandlers()) {
- try {
- methodResult = unknownHandlerManager.handleUnknownMethod(action, methodName);
- } catch (NoSuchMethodException ignore) {
- // throw the original one
- throw e;
- }
- } else {
- // throw the original one
- throw e;
- }
- // throw the original exception as UnknownHandlers weren't able to handle invocation as well
- if (methodResult == null) {
- throw e;
- }
- } else {
- // exception isn't related to missing action method, throw it
- throw e;
- }
- }
- return saveResult(actionConfig, methodResult);
- } catch (NoSuchPropertyException e) {
- throw new IllegalArgumentException("The " + methodName + "() is not defined in action " + getAction().getClass());
- } catch (MethodFailedException e) {
- // We try to return the source exception.
- Throwable t = e.getCause();
-
- if (actionEventListener != null) {
- String result = actionEventListener.handleException(t, getStack());
- if (result != null) {
- return result;
- }
- }
- if (t instanceof Exception) {
- throw (Exception) t;
- } else {
- throw e;
- }
- }
- }
-
- /**
- * Save the result to be used later.
- *
- * @param actionConfig current ActionConfig
- * @param methodResult the result of the action.
- * @return the result code to process.
- */
- protected String saveResult(ActionConfig actionConfig, Object methodResult) {
- if (methodResult instanceof Result) {
- this.explicitResult = (Result) methodResult;
-
- // Wire the result automatically
- container.inject(explicitResult);
- return null;
- } else if (methodResult instanceof Callable) {
- asyncAction = (Callable<?>) methodResult;
- return null;
- } else {
- return (String) methodResult;
- }
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
deleted file mode 100644
index da8a9dbca..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
+++ /dev/null
@@ -1,222 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.inject.Inject;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StringEscapeUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.io.Serial;
-import java.io.Serializable;
-import java.util.Locale;
-
-/**
- * The Default ActionProxy implementation
- *
- * @author Rainer Hermanns
- * @author Revised by <a href="mailto:hu_pengfei@yahoo.com.cn">Henry Hu</a>
- * @author tmjee
- * @since 2005-8-6
- */
-public class DefaultActionProxy implements ActionProxy, Serializable {
-
- @Serial
- private static final long serialVersionUID = 3293074152487468527L;
-
- private static final Logger LOG = LogManager.getLogger(DefaultActionProxy.class);
-
- protected Configuration configuration;
- protected ActionConfig config;
- protected ActionInvocation invocation;
- protected UnknownHandlerManager unknownHandlerManager;
- protected LocalizedTextProvider localizedTextProvider;
-
- protected String actionName;
- protected String namespace;
- protected String method;
- protected boolean executeResult;
- protected boolean cleanupContext;
-
- protected ObjectFactory objectFactory;
-
- protected ActionEventListener actionEventListener;
-
- private boolean methodSpecified = true;
-
- /**
- * This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy.
- *
- * <p>
- * The reason for the builder methods is so that you can use a subclass to create your own DefaultActionProxy instance
- * </p>
- *
- * (like a RMIActionProxy).
- *
- * @param inv the action invocation
- * @param namespace the namespace
- * @param actionName the action name
- * @param methodName the method name
- * @param executeResult execute result
- * @param cleanupContext cleanup context
- */
- protected DefaultActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) {
-
- this.invocation = inv;
- this.cleanupContext = cleanupContext;
- LOG.debug("Creating an DefaultActionProxy for namespace [{}] and action name [{}]", namespace, actionName);
-
- this.actionName = StringEscapeUtils.escapeHtml4(actionName);
- this.namespace = namespace;
- this.executeResult = executeResult;
- this.method = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(methodName));
- }
-
- @Inject
- public void setObjectFactory(ObjectFactory factory) {
- this.objectFactory = factory;
- }
-
- @Inject
- public void setConfiguration(Configuration config) {
- this.configuration = config;
- }
-
- @Inject
- public void setUnknownHandler(UnknownHandlerManager unknownHandlerManager) {
- this.unknownHandlerManager = unknownHandlerManager;
- }
-
- @Inject(required = false)
- public void setActionEventListener(ActionEventListener listener) {
- this.actionEventListener = listener;
- }
-
- @Inject
- public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) {
- this.localizedTextProvider = localizedTextProvider;
- }
-
- public Object getAction() {
- return invocation.getAction();
- }
-
- public String getActionName() {
- return actionName;
- }
-
- public ActionConfig getConfig() {
- return config;
- }
-
- public void setExecuteResult(boolean executeResult) {
- this.executeResult = executeResult;
- }
-
- public boolean getExecuteResult() {
- return executeResult;
- }
-
- public ActionInvocation getInvocation() {
- return invocation;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public String execute() throws Exception {
- ActionContext nestedContext = ActionContext.getContext();
- ActionContext.bind(invocation.getInvocationContext());
-
- try {
- return invocation.invoke();
- } finally {
- if (cleanupContext) {
- ActionContext.bind(nestedContext);
- }
- }
- }
-
-
- public String getMethod() {
- return method;
- }
-
- private void resolveMethod() {
- // if the method is set to null, use the one from the configuration
- // if the one from the configuration is also null, use "execute"
- if (StringUtils.isEmpty(this.method)) {
- this.method = config.getMethodName();
- if (StringUtils.isEmpty(this.method)) {
- this.method = ActionConfig.DEFAULT_METHOD;
- }
- methodSpecified = false;
- }
- }
-
- protected void prepare() {
- config = configuration.getRuntimeConfiguration().getActionConfig(namespace, actionName);
-
- if (config == null && unknownHandlerManager.hasUnknownHandlers()) {
- config = unknownHandlerManager.handleUnknownAction(namespace, actionName);
- }
- if (config == null) {
- throw new ConfigurationException(getErrorMessage());
- }
-
- resolveMethod();
-
- if (config.isAllowedMethod(method)) {
- invocation.init(this);
- } else {
- throw new ConfigurationException(prepareNotAllowedErrorMessage());
- }
- }
-
- protected String prepareNotAllowedErrorMessage() {
- return localizedTextProvider.findDefaultText(
- "struts.exception.method-not-allowed",
- Locale.getDefault(),
- new String[]{method, actionName}
- );
- }
-
- protected String getErrorMessage() {
- if (namespace != null && !namespace.trim().isEmpty()) {
- return localizedTextProvider.findDefaultText(
- "xwork.exception.missing-package-action",
- Locale.getDefault(),
- new String[]{namespace, actionName});
- } else {
- return localizedTextProvider.findDefaultText(
- "xwork.exception.missing-action",
- Locale.getDefault(),
- new String[]{actionName});
- }
- }
-
- public boolean isMethodSpecified() {
- return methodSpecified;
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java
deleted file mode 100644
index 988c5099b..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-
-import java.util.Map;
-
-/**
- * Default factory for {@link com.opensymphony.xwork2.ActionProxyFactory}.
- *
- * @author Jason Carreira
- */
-public class DefaultActionProxyFactory implements ActionProxyFactory {
-
- protected Container container;
-
- public DefaultActionProxyFactory() {
- super();
- }
-
- @Inject
- public void setContainer(Container container) {
- this.container = container;
- }
-
- public ActionProxy createActionProxy(String namespace, String actionName, Map<String, Object> extraContext) {
- return createActionProxy(namespace, actionName, null, extraContext, true, true);
- }
-
- public ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext) {
- return createActionProxy(namespace, actionName, methodName, extraContext, true, true);
- }
-
- public ActionProxy createActionProxy(String namespace, String actionName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) {
- return createActionProxy(namespace, actionName, null, extraContext, executeResult, cleanupContext);
- }
-
- @Override
- public ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) {
-
- ActionInvocation inv = createActionInvocation(extraContext, true);
- container.inject(inv);
- return createActionProxy(inv, namespace, actionName, methodName, executeResult, cleanupContext);
- }
-
- protected ActionInvocation createActionInvocation(Map<String, Object> extraContext, boolean pushAction) {
- return new DefaultActionInvocation(extraContext, pushAction);
- }
-
- public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName, boolean executeResult, boolean cleanupContext) {
-
- return createActionProxy(inv, namespace, actionName, null, executeResult, cleanupContext);
- }
-
- @Override
- public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) {
-
- DefaultActionProxy proxy = new DefaultActionProxy(inv, namespace, actionName, methodName, executeResult, cleanupContext);
- container.inject(proxy);
- proxy.prepare();
- return proxy;
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName();
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java b/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
deleted file mode 100644
index 35f16191a..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
+++ /dev/null
@@ -1,68 +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 com.opensymphony.xwork2;
-
-import org.apache.commons.lang3.LocaleUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.message.ParameterizedMessage;
-
-import java.util.Locale;
-
-/**
- * Default implementation of {@link LocaleProvider}
- */
-public class DefaultLocaleProvider implements LocaleProvider {
-
- private final static Logger LOG = LogManager.getLogger(DefaultLocaleProvider.class);
-
- @Override
- public Locale getLocale() {
- ActionContext ctx = ActionContext.getContext();
- if (ctx != null) {
- return ctx.getLocale();
- } else {
- LOG.debug("Action context not initialized");
- return null;
- }
- }
-
- @Override
- public boolean isValidLocaleString(String localeStr) {
- Locale locale = this.toLocale(localeStr);
- return isValidLocale(locale);
- }
-
- @Override
- public boolean isValidLocale(Locale locale) {
- return locale != null && LocaleUtils.isAvailableLocale(locale);
- }
-
- @Override
- public Locale toLocale(String localeStr) {
- Locale locale = null;
- try {
- locale = LocaleUtils.toLocale(StringUtils.trimToNull(localeStr));
- } catch (IllegalArgumentException e) {
- LOG.warn(new ParameterizedMessage("Cannot convert [{}] to proper locale", localeStr), e);
- }
- return locale;
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java b/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java
deleted file mode 100644
index 7d04e010c..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java
+++ /dev/null
@@ -1,28 +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 com.opensymphony.xwork2;
-
-public class DefaultLocaleProviderFactory implements LocaleProviderFactory {
-
- @Override
- public LocaleProvider createLocaleProvider() {
- return new DefaultLocaleProvider();
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java b/core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
deleted file mode 100644
index 6d7315a65..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
+++ /dev/null
@@ -1,157 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.ValueStack;
-
-import java.io.Serializable;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.ResourceBundle;
-
-import static java.util.Objects.requireNonNullElse;
-
-/**
- * DefaultTextProvider gets texts from only the default resource bundles associated with the default bundles.
- */
-public class DefaultTextProvider implements TextProvider, Serializable, Unchainable {
-
- private static final Object[] EMPTY_ARGS = new Object[0];
-
- protected LocalizedTextProvider localizedTextProvider;
-
- public DefaultTextProvider() {
- }
-
- @Inject
- public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) {
- this.localizedTextProvider = localizedTextProvider;
- }
-
- @Override
- public boolean hasKey(String key) {
- return getText(key) != null;
- }
-
- @Override
- public String getText(String key) {
- return localizedTextProvider.findDefaultText(key, ActionContext.getContext().getLocale());
- }
-
- @Override
- public String getText(String key, String defaultValue) {
- String text = getText(key);
- if (text == null) {
- return defaultValue;
- }
- return text;
- }
-
- @Override
- public String getText(String key, List<?> args) {
- Object[] params;
- if (args != null) {
- params = args.toArray();
- } else {
- params = EMPTY_ARGS;
- }
-
- return localizedTextProvider.findDefaultText(key, ActionContext.getContext().getLocale(), params);
- }
-
- @Override
- public String getText(String key, String[] args) {
- Object[] params;
- params = requireNonNullElse(args, EMPTY_ARGS);
-
- return localizedTextProvider.findDefaultText(key, ActionContext.getContext().getLocale(), params);
- }
-
- @Override
- public String getText(String key, String defaultValue, List<?> args) {
- String text = getText(key, args);
- if(text == null && defaultValue == null) {
- defaultValue = key;
- }
- if (text == null && defaultValue != null) {
-
- MessageFormat format = new MessageFormat(defaultValue);
- format.setLocale(ActionContext.getContext().getLocale());
- format.applyPattern(defaultValue);
-
- Object[] params;
- if (args != null) {
- params = args.toArray();
- } else {
- params = EMPTY_ARGS;
- }
-
- return format.format(params);
- }
- return text;
- }
-
- @Override
- public String getText(String key, String defaultValue, String[] args) {
- String text = getText(key, args);
- if (text == null) {
- MessageFormat format = new MessageFormat(defaultValue);
- format.setLocale(ActionContext.getContext().getLocale());
- format.applyPattern(defaultValue);
-
- return format.format(requireNonNullElse(args, EMPTY_ARGS));
-
- }
- return text;
- }
-
- @Override
- public String getText(String key, String defaultValue, String obj) {
- List<Object> args = new ArrayList<>(1);
- args.add(obj);
- return getText(key, defaultValue, args);
- }
-
- @Override
- public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
- //we're not using the value stack here
- return getText(key, defaultValue, args);
- }
-
- @Override
- public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
- //we're not using the value stack here
- List<Object> values = new ArrayList<>(Arrays.asList(args));
- return getText(key, defaultValue, values);
- }
-
- @Override
- public ResourceBundle getTexts(String bundleName) {
- return localizedTextProvider.findResourceBundle(bundleName, ActionContext.getContext().getLocale());
- }
-
- @Override
- public ResourceBundle getTexts() {
- return null;
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java b/core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
deleted file mode 100644
index 42f4a17cb..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
+++ /dev/null
@@ -1,152 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Default implementation of UnknownHandlerManager
- *
- * @see com.opensymphony.xwork2.UnknownHandlerManager
- */
-public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
-
- private Container container;
-
- protected ArrayList<UnknownHandler> unknownHandlers;
-
- @Inject
- public void setContainer(Container container) {
- this.container = container;
- try {
- build();
- } catch (Exception e) {
- throw new ConfigurationException(e);
- }
- }
-
- /**
- * Builds a list of UnknownHandlers in the order specified by the configured "unknown-handler-stack".
- * If "unknown-handler-stack" was not configured, all UnknownHandlers will be returned, in no specific order
- *
- * @throws Exception in case of any error
- */
- protected void build() throws Exception {
- Configuration configuration = container.getInstance(Configuration.class);
- ObjectFactory factory = container.getInstance(ObjectFactory.class);
-
- if (configuration != null && container != null) {
- List<UnknownHandlerConfig> unkownHandlerStack = configuration.getUnknownHandlerStack();
- unknownHandlers = new ArrayList<>();
-
- if (unkownHandlerStack != null && !unkownHandlerStack.isEmpty()) {
- //get UnknownHandlers in the specified order
- for (UnknownHandlerConfig unknownHandlerConfig : unkownHandlerStack) {
- UnknownHandler uh = factory.buildUnknownHandler(unknownHandlerConfig.getName(), new HashMap<>());
- unknownHandlers.add(uh);
- }
- } else {
- //add all available UnknownHandlers
- Set<String> unknownHandlerNames = container.getInstanceNames(UnknownHandler.class);
- for (String unknownHandlerName : unknownHandlerNames) {
- UnknownHandler uh = container.getInstance(UnknownHandler.class, unknownHandlerName);
- unknownHandlers.add(uh);
- }
- }
- }
- }
-
- /**
- * Iterate over UnknownHandlers and return the result of the first one that can handle it
- *
- * @param actionContext the action context
- * @param actionName the action name
- * @param actionConfig the action config
- * @param resultCode the result code
- */
- public Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) {
- for (UnknownHandler unknownHandler : unknownHandlers) {
- Result result = unknownHandler.handleUnknownResult(actionContext, actionName, actionConfig, resultCode);
- if (result != null) {
- return result;
- }
- }
-
- return null;
- }
-
- /**
- * Iterate over UnknownHandlers and return the result of the first one that can handle it.
- * Must throw an exception if method cannot be handled.
- *
- * @param action the action
- * @param methodName the method name
- * @throws NoSuchMethodException if method con not be handled
- */
- public Object handleUnknownMethod(Object action, String methodName) throws NoSuchMethodException {
- for (UnknownHandler unknownHandler : unknownHandlers) {
- Object result = unknownHandler.handleUnknownActionMethod(action, methodName);
- if (result != null) {
- return result;
- }
- }
-
- if (unknownHandlers.isEmpty()) {
- throw new NoSuchMethodException(String.format("No UnknownHandlers defined to handle method [%s]", methodName));
- } else {
- throw new NoSuchMethodException(String.format("None of defined UnknownHandlers can handle method [%s]", methodName));
- }
- }
-
- /**
- * Iterate over UnknownHandlers and return the result of the first one that can handle it
- *
- * @param namespace the namespace
- * @param actionName the action name
- */
- public ActionConfig handleUnknownAction(String namespace, String actionName) {
- for (UnknownHandler unknownHandler : unknownHandlers) {
- ActionConfig result = unknownHandler.handleUnknownAction(namespace, actionName);
- if (result != null) {
- return result;
- }
- }
-
- return null;
- }
-
- public boolean hasUnknownHandlers() {
- return unknownHandlers != null && !unknownHandlers.isEmpty();
- }
-
- public List<UnknownHandler> getUnknownHandlers() {
- return unknownHandlers;
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/FileManager.java b/core/src/main/java/com/opensymphony/xwork2/FileManager.java
deleted file mode 100644
index 8c70aa90c..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/FileManager.java
+++ /dev/null
@@ -1,93 +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 com.opensymphony.xwork2;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collection;
-
-/**
- * Basic interface to access file on the File System and to monitor changes
- */
-public interface FileManager {
-
- /**
- * Enables configs reloading when config file changed
- *
- * @param reloadingConfigs {@link org.apache.struts2.StrutsConstants#STRUTS_CONFIGURATION_XML_RELOAD}
- */
- void setReloadingConfigs(boolean reloadingConfigs);
-
- /**
- * Checks if given file changed and must be reloaded
- *
- * @param fileName to check
- * @return true if file changed
- */
- boolean fileNeedsReloading(String fileName);
-
- /**
- * Checks if file represented by provided URL changed and must be reloaded
- *
- * @param fileUrl url to a file
- * @return true if file exists and should be reloaded, if url is null return false
- */
- boolean fileNeedsReloading(URL fileUrl);
-
- /**
- * Loads opens the named file and returns the InputStream
- *
- * @param fileUrl - the URL of the file to open
- * @return an InputStream of the file contents or null
- * @throws IllegalArgumentException if there is no file with the given file name
- */
- InputStream loadFile(URL fileUrl);
-
- /**
- * Adds file to list of monitored files
- *
- * @param fileUrl {@link URL} to file to be monitored
- */
- void monitorFile(URL fileUrl);
-
- /**
- * Convert URLs to URLs with "file" protocol
- * @param url URL to convert to a jar url
- * @return a URL to a file, or null if the URL external form cannot be parsed
- */
- URL normalizeToFileProtocol(URL url);
-
- /**
- * Indicate if given implementation supports current OS File System
- *
- * @return true if supports current OS File System
- */
- boolean support();
-
- /**
- * User's implementation should return false as then it will be taken in first place
- *
- * @return true if it's a framework provided implementation
- */
- boolean internal();
-
- Collection<? extends URL> getAllPhysicalUrls(URL url) throws IOException;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java b/core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java
deleted file mode 100644
index 5bedeaaca..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java
+++ /dev/null
@@ -1,30 +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 com.opensymphony.xwork2;
-
-/**
- * Factory that creates FileManager, default to {@link com.opensymphony.xwork2.util.fs.DefaultFileManager}
- */
-public interface FileManagerFactory {
-
- void setReloadingConfigs(String reloadingConfigs);
-
- FileManager getFileManager();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java b/core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java
deleted file mode 100644
index 00a41a25b..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java
+++ /dev/null
@@ -1,77 +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 com.opensymphony.xwork2;
-
-import org.apache.commons.lang3.LocaleUtils;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.Locale;
-
-
-/**
- * Indicates that the implementing class can provide its own {@link Locale}.
- *
- * <p>
- * This is useful for when an action may wish override the default locale. All that is
- * needed is to implement this interface and return your own custom locale.
- * The {@link TextProvider} interface uses this interface heavily for retrieving
- * internationalized messages from resource bundles.
- * </p>
- *
- * @author Jason Carreira
- */
-public interface LocaleProvider {
-
- /**
- * Gets the provided locale.
- *
- * @return the locale.
- */
- Locale getLocale();
-
- /**
- * Validates if provided string is a valid {@link Locale}
- *
- * @param localeStr a String representing locale, e.g. en_EN
- * @return true if valid
- */
- boolean isValidLocaleString(String localeStr);
-
- /**
- * Validates if provided {@link Locale} is value
- *
- * @param locale instance of {@link Locale} to validate
- * @return true if valid
- */
- boolean isValidLocale(Locale locale);
-
- /**
- * Tries to convert provided locale string into {@link Locale} or returns null
- * @param localeStr a String representing locale, e.g.: en_EN
- * @return instance of {@link Locale} or null
- * @since Struts 6.5.0
- */
- default Locale toLocale(String localeStr) {
- try {
- return LocaleUtils.toLocale(StringUtils.trimToNull(localeStr));
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java b/core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java
deleted file mode 100644
index df3363ef3..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java
+++ /dev/null
@@ -1,35 +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 com.opensymphony.xwork2;
-
-/**
- * Allows delegate creation of {@link LocaleProvider} to another implementation provided
- * by a user. It also allows avoid problems with too many dependencies as {@link LocaleProvider}
- * is implemented by the {@link ActionSupport} which can be defined as a bean in Spring.
- */
-public interface LocaleProviderFactory {
-
- /**
- * Create a new instance of {@link LocaleProvider}.
- *
- * @return the localeProvider.
- */
- LocaleProvider createLocaleProvider();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java b/core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java
deleted file mode 100644
index 0992ec7bd..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java
+++ /dev/null
@@ -1,49 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-import java.io.Serializable;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-public interface LocalizedTextProvider extends Serializable {
-
- String findDefaultText(String aTextName, Locale locale);
-
- String findDefaultText(String aTextName, Locale locale, Object[] params);
-
- ResourceBundle findResourceBundle(String aBundleName, Locale locale);
-
- String findText(Class aClass, String aTextName, Locale locale);
-
- String findText(Class aClass, String aTextName, Locale locale, String defaultMessage, Object[] args);
-
- String findText(Class aClass, String aTextName, Locale locale, String defaultMessage, Object[] args, ValueStack valueStack);
-
- String findText(ResourceBundle bundle, String aTextName, Locale locale);
-
- String findText(ResourceBundle bundle, String aTextName, Locale locale, String defaultMessage, Object[] args);
-
- String findText(ResourceBundle bundle, String aTextName, Locale locale, String defaultMessage, Object[] args, ValueStack valueStack);
-
- void addDefaultResourceBundle(String resourceBundleName);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java b/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java
deleted file mode 100644
index c07c6bbe7..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java
+++ /dev/null
@@ -1,36 +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 com.opensymphony.xwork2;
-
-/**
- * ModelDriven Actions provide a model object to be pushed onto the ValueStack
- * in addition to the Action itself, allowing a FormBean type approach like Struts.
- *
- * @author Jason Carreira
- */
-public interface ModelDriven<T> {
-
- /**
- * Gets the model to be pushed onto the ValueStack instead of the Action itself.
- *
- * @return the model
- */
- T getModel();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java b/core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
deleted file mode 100644
index 3a5c8f266..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
+++ /dev/null
@@ -1,264 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.InterceptorConfig;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.conversion.TypeConverter;
-import com.opensymphony.xwork2.factory.*;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.validator.Validator;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.StrutsConstants;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * ObjectFactory is responsible for building the core framework objects. Users may register their
- * own implementation of the ObjectFactory to control instantiation of these Objects.
- *
- * <p>
- * This default implementation uses the {@link #buildBean(Class,java.util.Map) buildBean}
- * method to create all classes (interceptors, actions, results, etc).
- * </p>
- *
- * @author Jason Carreira
- */
-public class ObjectFactory implements Serializable {
-
- private static final Logger LOG = LogManager.getLogger(ObjectFactory.class);
-
- private transient ClassLoader ccl;
-
- private Container container;
- private ActionFactory actionFactory;
- private ResultFactory resultFactory;
- private InterceptorFactory interceptorFactory;
- private ValidatorFactory validatorFactory;
- private ConverterFactory converterFactory;
- private UnknownHandlerFactory unknownHandlerFactory;
-
- public ObjectFactory() {
- }
-
- @Inject
- public void setContainer(Container container) {
- this.container = container;
- }
-
- @Inject(value=StrutsConstants.STRUTS_OBJECT_FACTORY_CLASSLOADER, required=false)
- public void setClassLoader(ClassLoader cl) {
- this.ccl = cl;
- }
-
- @Inject
- public void setActionFactory(ActionFactory actionFactory) {
- this.actionFactory = actionFactory;
- }
-
- @Inject
- public void setResultFactory(ResultFactory resultFactory) {
- this.resultFactory = resultFactory;
- }
-
- @Inject
- public void setInterceptorFactory(InterceptorFactory interceptorFactory) {
- this.interceptorFactory = interceptorFactory;
- }
-
- @Inject
- public void setValidatorFactory(ValidatorFactory validatorFactory) {
- this.validatorFactory = validatorFactory;
- }
-
- @Inject
- public void setConverterFactory(ConverterFactory converterFactory) {
- this.converterFactory = converterFactory;
- }
-
- @Inject
- public void setUnknownHandlerFactory(UnknownHandlerFactory unknownHandlerFactory) {
- this.unknownHandlerFactory = unknownHandlerFactory;
- }
-
- /**
- * Allows for ObjectFactory implementations that support
- * Actions without no-arg constructors.
- *
- * @return true if no-arg constructor is required, false otherwise
- */
- public boolean isNoArgConstructorRequired() {
- return true;
- }
-
- /**
- * Utility method to obtain the class matched to className. Caches look ups so that subsequent
- * lookups will be faster.
- *
- * @param className The fully qualified name of the class to return
- * @return The class itself
- * @throws ClassNotFoundException if class not found in classpath
- */
- public Class getClassInstance(String className) throws ClassNotFoundException {
- if (ccl != null) {
- return ccl.loadClass(className);
- }
-
- return ClassLoaderUtil.loadClass(className, this.getClass());
- }
-
- /**
- * Build an instance of the action class to handle a particular request (eg. web request)
- * @param actionName the name the action configuration is set up with in the configuration
- * @param namespace the namespace the action is configured in
- * @param config the action configuration found in the config for the actionName / namespace
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- * @return instance of the action class to handle a web request
- * @throws Exception in case of any error
- */
- public Object buildAction(String actionName, String namespace, ActionConfig config, Map<String, Object> extraContext) throws Exception {
- return actionFactory.buildAction(actionName, namespace, config, extraContext);
- }
-
- /**
- * Build a generic Java object of the given type.
- *
- * @param clazz the type of Object to build
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- * @return object for the given type
- * @throws Exception in case of any error
- */
- public Object buildBean(Class clazz, Map<String, Object> extraContext) throws Exception {
- return container.inject(clazz);
- }
-
- /**
- * @param obj object to inject internal
- * @return the object
- */
- protected Object injectInternalBeans(Object obj) {
- if (obj != null && container != null) {
- LOG.debug("Injecting internal beans into [{}]", obj.getClass().getSimpleName());
- container.inject(obj);
- }
- return obj;
- }
-
- /**
- * Build a generic Java object of the given type.
- *
- * @param className the type of Object to build
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- * @return object for the given type
- * @throws Exception in case of any error
- */
- public Object buildBean(String className, Map<String, Object> extraContext) throws Exception {
- return buildBean(className, extraContext, true);
- }
-
- /**
- * Build a generic Java object of the given type.
- *
- * @param className the type of Object to build
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- * @param injectInternal true if inject internal beans
- * @return object for the given type
- * @throws Exception in case of any error
- */
- public Object buildBean(String className, Map<String, Object> extraContext, boolean injectInternal) throws Exception {
- Class clazz = getClassInstance(className);
- return buildBean(clazz, extraContext);
- }
-
- /**
- * Builds an Interceptor from the InterceptorConfig and the Map of
- * parameters from the interceptor reference. Implementations of this method
- * should ensure that the Interceptor is parametrized with both the
- * parameters from the Interceptor config and the interceptor ref Map (the
- * interceptor ref params take precedence), and that the Interceptor.init()
- * method is called on the Interceptor instance before it is returned.
- *
- * @param interceptorConfig the InterceptorConfig from the configuration
- * @param interceptorRefParams a Map of params provided in the Interceptor reference in the
- * Action mapping or InterceptorStack definition
- * @return interceptor
- */
- public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map<String, String> interceptorRefParams) throws ConfigurationException {
- return interceptorFactory.buildInterceptor(interceptorConfig, interceptorRefParams);
- }
-
- /**
- * Build a Result using the type in the ResultConfig and set the parameters in the ResultConfig.
- *
- * @param resultConfig the ResultConfig found for the action with the result code returned
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- *
- * @return result
- * @throws Exception in case of any error
- */
- public Result buildResult(ResultConfig resultConfig, Map<String, Object> extraContext) throws Exception {
- return resultFactory.buildResult(resultConfig, extraContext);
- }
-
- /**
- * Build a Validator of the given type and set the parameters on it
- *
- * @param className the type of Validator to build
- * @param params property name -> value Map to set onto the Validator instance
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- *
- * @return validator of the given type
- * @throws Exception in case of any error
- */
- public Validator buildValidator(String className, Map<String, Object> params, Map<String, Object> extraContext) throws Exception {
- return validatorFactory.buildValidator(className, params, extraContext);
- }
-
- /**
- * Build converter of given type
- *
- * @param converterClass to instantiate
- * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
- * @return instance of converterClass with inject dependencies
- * @throws Exception in case of any error
- */
- public TypeConverter buildConverter(Class<? extends TypeConverter> converterClass, Map<String, Object> extraContext) throws Exception {
- return converterFactory.buildConverter(converterClass, extraContext);
- }
-
- /**
- * Builds unknown handler
- *
- * @param unknownHandlerName the unknown handler name
- * @param extraContext extra context
- * @return a unknown handler
- * @throws Exception in case of any error
- */
- public UnknownHandler buildUnknownHandler(String unknownHandlerName, Map<String, Object> extraContext) throws Exception {
- return unknownHandlerFactory.buildUnknownHandler(unknownHandlerName, extraContext);
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/Preparable.java b/core/src/main/java/com/opensymphony/xwork2/Preparable.java
deleted file mode 100644
index 23fdf68ae..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/Preparable.java
+++ /dev/null
@@ -1,37 +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 com.opensymphony.xwork2;
-
-/**
- * Preparable Actions will have their <code>prepare()</code> method called if the {@link com.opensymphony.xwork2.interceptor.PrepareInterceptor}
- * is applied to the ActionConfig.
- *
- * @author Jason Carreira
- * @see com.opensymphony.xwork2.interceptor.PrepareInterceptor
- */
-public interface Preparable {
-
- /**
- * This method is called to allow the action to prepare itself.
- *
- * @throws Exception thrown if a system level exception occurs.
- */
- void prepare() throws Exception;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.java b/core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.java
deleted file mode 100644
index 97a783fe2..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.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 com.opensymphony.xwork2;
-
-import java.util.ResourceBundle;
-
-/**
- * Extension Interface for TextProvider to help supporting ResourceBundles.
- *
- * @author Rene Gielen
- */
-public interface ResourceBundleTextProvider extends TextProvider {
-
- /**
- * Set the resource bundle to use.
- *
- * @param bundle the bundle to use.
- */
- void setBundle(ResourceBundle bundle);
-
- /**
- * Set the class to use for reading the resource bundle.
- *
- * @param clazz the class to use for loading.
- */
- void setClazz(Class clazz);
-
- /**
- * Set the LocaleProvider to use.
- *
- * @param localeProvider the LocaleProvider to use.
- */
- void setLocaleProvider(LocaleProvider localeProvider);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/Result.java b/core/src/main/java/com/opensymphony/xwork2/Result.java
deleted file mode 100644
index 8c1687e5a..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/Result.java
+++ /dev/null
@@ -1,50 +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 com.opensymphony.xwork2;
-
-import java.io.Serializable;
-
-/**
- * All results (except for <code>Action.NONE</code>) of an {@link Action} are mapped to a View implementation.
- *
- * <p>
- * Examples of Views might be:
- * </p>
- *
- * <ul>
- * <li>SwingPanelView - pops up a new Swing panel</li>
- * <li>ActionChainView - executes another action</li>
- * <li>SerlvetRedirectView - redirects the HTTP response to a URL</li>
- * <li>ServletDispatcherView - dispatches the HTTP response to a URL</li>
- * </ul>
- *
- * @author plightbo
- */
-public interface Result extends Serializable {
-
- /**
- * Represents a generic interface for all action execution results.
- * Whether that be displaying a webpage, generating an email, sending a JMS message, etc.
- *
- * @param invocation the invocation context.
- * @throws Exception can be thrown.
- */
- void execute(ActionInvocation invocation) throws Exception;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.java b/core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.java
deleted file mode 100644
index 5961d01e3..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.inject.Inject;
-
-import java.util.ResourceBundle;
-
-import static java.util.Objects.requireNonNullElseGet;
-
-/**
- * This factory enables users to provide and correctly initialize a custom TextProvider.
- */
-public class StrutsTextProviderFactory implements TextProviderFactory {
-
- protected LocaleProviderFactory localeProviderFactory;
- protected LocalizedTextProvider localizedTextProvider;
- protected TextProvider defaultTextProvider;
-
- @Inject
- public void setLocaleProviderFactory(LocaleProviderFactory localeProviderFactory) {
- this.localeProviderFactory = localeProviderFactory;
- }
-
- @Inject
- public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) {
- this.localizedTextProvider = localizedTextProvider;
- }
-
- @Inject(required = false)
- public void setDefaultTextProvider(TextProvider defaultTextProvider) {
- this.defaultTextProvider = defaultTextProvider;
- }
-
- @Override
- public TextProvider createInstance(Class clazz) {
- TextProvider instance = getTextProvider(clazz);
- if (instance instanceof ResourceBundleTextProvider) {
- ((ResourceBundleTextProvider) instance).setClazz(clazz);
- ((ResourceBundleTextProvider) instance).setLocaleProvider(localeProviderFactory.createLocaleProvider());
- }
- return instance;
- }
-
- @Override
- public TextProvider createInstance(ResourceBundle bundle) {
- TextProvider instance = getTextProvider(bundle);
- if (instance instanceof ResourceBundleTextProvider) {
- ((ResourceBundleTextProvider) instance).setBundle(bundle);
- ((ResourceBundleTextProvider) instance).setLocaleProvider(localeProviderFactory.createLocaleProvider());
- }
- return instance;
- }
-
- protected TextProvider getTextProvider(Class clazz) {
- return requireNonNullElseGet(defaultTextProvider,
- () -> new TextProviderSupport(clazz,
- localeProviderFactory.createLocaleProvider(),
- localizedTextProvider));
-
- }
-
- protected TextProvider getTextProvider(ResourceBundle bundle) {
- return requireNonNullElseGet(defaultTextProvider,
- () -> new TextProviderSupport(bundle,
- localeProviderFactory.createLocaleProvider(),
- localizedTextProvider));
-
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProvider.java b/core/src/main/java/com/opensymphony/xwork2/TextProvider.java
deleted file mode 100644
index 9ac7163c2..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/TextProvider.java
+++ /dev/null
@@ -1,189 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-import java.util.List;
-import java.util.ResourceBundle;
-
-/**
- * Provides access to {@link ResourceBundle}s and their underlying text messages.
- * Implementing classes can delegate {@link TextProviderSupport}. Messages will be
- * searched in multiple resource bundles, starting with the one associated with
- * this particular class (action in most cases), continuing to try the message
- * bundle associated with each superclass as well. It will stop once a bundle is
- * found that contains the given text. This gives a cascading style that allow
- * global texts to be defined for an application base class.
- *
- * <p>
- * You can override {@link LocaleProvider#getLocale()} to change the behaviour of how
- * to choose locale for the bundles that are returned. Typically you would
- * use the {@link LocaleProvider} interface to get the users configured locale.
- * </p>
- *
- * <p>
- * When you want to use your own implementation for Struts 2 project you have to define following
- * bean and constant in struts.xml:
- * <bean class="org.demo.MyTextProvider" name="myTextProvider" type="com.opensymphony.xwork2.TextProvider" />
- * <constant name="struts.textProvider" value="myTextProvider" />
- * </p>
- *
- * <p>
- * if you want to also use your implementation for framework's messages define another constant (remember to put
- * into it all framework messages)
- * <constant name="system" value="myTextProvider" />
- * </p>
- *
- * <p>
- * Take a look on {@link com.opensymphony.xwork2.ActionSupport} for example TextProvider implementation.
- * </p>
- * @author Jason Carreira
- * @author Rainer Hermanns
- * @see LocaleProvider
- * @see TextProviderSupport
- */
-public interface TextProvider {
-
- /**
- * Checks if a message key exists.
- *
- * @param key message key to check for
- * @return boolean true if key exists, false otherwise.
- */
- boolean hasKey(String key);
-
- /**
- * Gets a message based on a message key or if no message is found the provided key
- * is returned.
- *
- * @param key the resource bundle key that is to be searched for
- * @return the message as found in the resource bundle, or the provided key if none is found.
- */
- String getText(String key);
-
- /**
- * Gets a message based on a key, or, if the message is not found, a supplied
- * default value is returned.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue);
-
- /**
- * Gets a message based on a key using the supplied obj, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param obj obj to be used in a {@link java.text.MessageFormat} message
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue, String obj);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat} or the provided key if no message is found.
- *
- * @param key the resource bundle key that is to be searched for
- * @param args a list args to be used in a {@link java.text.MessageFormat} message
- * @return the message as found in the resource bundle, or the provided key if none is found.
- */
- String getText(String key, List<?> args);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or the provided key if no message is found.
- *
- * @param key the resource bundle key that is to be searched for
- * @param args an array args to be used in a {@link java.text.MessageFormat} message
- * @return the message as found in the resource bundle, or the provided key if none is found.
- */
- String getText(String key, String[] args);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args a list args to be used in a {@link java.text.MessageFormat} message
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue, List<?> args);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args an array args to be used in a {@link java.text.MessageFormat} message
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue, String[] args);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned. Instead of using the value stack in the ActionContext
- * this version of the getText() method uses the provided value stack.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args a list args to be used in a {@link java.text.MessageFormat} message
- * @param stack the value stack to use for finding the text
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue, List<?> args, ValueStack stack);
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned. Instead of using the value stack in the ActionContext
- * this version of the getText() method uses the provided value stack.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args an array args to be used in a {@link java.text.MessageFormat} message
- * @param stack the value stack to use for finding the text
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- String getText(String key, String defaultValue, String[] args, ValueStack stack);
-
- /**
- * Get the named bundle, such as "com/acme/Foo".
- *
- * @param bundleName the name of the resource bundle, such as <code>"com/acme/Foo"</code>.
- * @return the bundle
- */
- ResourceBundle getTexts(String bundleName);
-
- /**
- * Get the resource bundle associated with the implementing class (usually an action).
- *
- * @return the bundle
- */
- ResourceBundle getTexts();
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java b/core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java
deleted file mode 100644
index bad064178..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java
+++ /dev/null
@@ -1,29 +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 com.opensymphony.xwork2;
-
-import java.util.ResourceBundle;
-
-public interface TextProviderFactory {
-
- TextProvider createInstance(Class clazz);
-
- TextProvider createInstance(ResourceBundle bundle);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java b/core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
deleted file mode 100644
index 7f8afbc9a..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
+++ /dev/null
@@ -1,339 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.ValueStack;
-
-import java.util.*;
-
-/**
- * Default TextProvider implementation.
- *
- * @author Jason Carreira
- * @author Rainer Hermanns
- */
-public class TextProviderSupport implements ResourceBundleTextProvider {
-
- protected Class clazz;
- protected LocaleProvider localeProvider;
- protected ResourceBundle bundle;
- protected LocalizedTextProvider localizedTextProvider;
-
- /**
- * Constructor.
- *
- * @param clazz a clazz to use for reading the resource bundle.
- * @param provider a locale provider.
- */
- public TextProviderSupport(Class clazz, LocaleProvider provider, LocalizedTextProvider localizedTextProvider) {
- this.clazz = clazz;
- this.localeProvider = provider;
- this.localizedTextProvider = localizedTextProvider;
- }
-
- /**
- * Constructor.
- *
- * @param bundle the resource bundle.
- * @param provider a locale provider.
- */
- public TextProviderSupport(ResourceBundle bundle, LocaleProvider provider, LocalizedTextProvider localizedTextProvider) {
- this.bundle = bundle;
- this.localeProvider = provider;
- this.localizedTextProvider = localizedTextProvider;
- }
-
- /**
- * @param bundle the resource bundle.
- */
- @Override
- public void setBundle(ResourceBundle bundle) {
- this.bundle = bundle;
- }
-
- /**
- * @param clazz a clazz to use for reading the resource bundle.
- */
- @Override
- public void setClazz(Class clazz) {
- this.clazz = clazz;
- }
-
- /**
- * @param localeProvider a locale provider.
- */
- @Override
- public void setLocaleProvider(LocaleProvider localeProvider) {
- this.localeProvider = localeProvider;
- }
-
- @Inject
- public void setLocaleProviderFactory(LocaleProviderFactory localeProviderFactory) {
- this.localeProvider = localeProviderFactory.createLocaleProvider();
- }
-
- @Inject
- public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) {
- this.localizedTextProvider = localizedTextProvider;
- }
-
- /**
- * Checks if a key is available in the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class.
- */
- public boolean hasKey(String key) {
- String message;
- if (clazz != null) {
- message = localizedTextProvider.findText(clazz, key, getLocale(), null, new Object[0] );
- } else {
- message = localizedTextProvider.findText(bundle, key, getLocale(), null, new Object[0]);
- }
- return message != null;
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class.
- *
- * @param key name of text to be found
- * @return value of named text or the provided key if no value is found
- */
- public String getText(String key) {
- return getText(key, key, Collections.emptyList());
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param defaultValue the default value which will be returned if no text is found
- * @return value of named text or the provided defaultValue if no value is found
- */
- public String getText(String key, String defaultValue) {
- return getText(key, defaultValue, Collections.emptyList());
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param defaultValue the default value which will be returned if no text is found
- * @return value of named text or the provided defaultValue if no value is found
- */
- public String getText(String key, String defaultValue, String arg) {
- List<Object> args = new ArrayList<>();
- args.add(arg);
- return getText(key, defaultValue, args);
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param args a List of args to be used in a MessageFormat message
- * @return value of named text or the provided key if no value is found
- */
- public String getText(String key, List<?> args) {
- return getText(key, key, args);
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param args an array of args to be used in a MessageFormat message
- * @return value of named text or the provided key if no value is found
- */
- public String getText(String key, String[] args) {
- return getText(key, key, args);
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param defaultValue the default value which will be returned if no text is found
- * @param args a List of args to be used in a MessageFormat message
- * @return value of named text or the provided defaultValue if no value is found
- */
- public String getText(String key, String defaultValue, List<?> args) {
- Object[] argsArray = ((args != null && !args.equals(Collections.emptyList())) ? args.toArray() : null);
- if (clazz != null) {
- return localizedTextProvider.findText(clazz, key, getLocale(), defaultValue, argsArray);
- } else {
- return localizedTextProvider.findText(bundle, key, getLocale(), defaultValue, argsArray);
- }
- }
-
- /**
- * Get a text from the resource bundles associated with this action.
- * The resource bundles are searched, starting with the one associated
- * with this particular action, and testing all its superclasses' bundles.
- * It will stop once a bundle is found that contains the given text. This gives
- * a cascading style that allow global texts to be defined for an application base
- * class. If no text is found for this text name, the default value is returned.
- *
- * @param key name of text to be found
- * @param defaultValue the default value which will be returned if no text is found
- * @param args an array of args to be used in a MessageFormat message
- * @return value of named text or the provided defaultValue if no value is found
- */
- public String getText(String key, String defaultValue, String[] args) {
- if (clazz != null) {
- return localizedTextProvider.findText(clazz, key, getLocale(), defaultValue, args);
- } else {
- return localizedTextProvider.findText(bundle, key, getLocale(), defaultValue, args);
- }
- }
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned. Instead of using the value stack in the ActionContext
- * this version of the getText() method uses the provided value stack.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args a list args to be used in a {@link java.text.MessageFormat} message
- * @param stack the value stack to use for finding the text
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
- Object[] argsArray = ((args != null) ? args.toArray() : null);
- Locale locale;
- if (stack == null){
- locale = getLocale();
- }else{
- locale = stack.getActionContext().getLocale();
- }
- if (locale == null) {
- locale = getLocale();
- }
- if (clazz != null) {
- return localizedTextProvider.findText(clazz, key, locale, defaultValue, argsArray, stack);
- } else {
- return localizedTextProvider.findText(bundle, key, locale, defaultValue, argsArray, stack);
- }
- }
-
-
- /**
- * Gets a message based on a key using the supplied args, as defined in
- * {@link java.text.MessageFormat}, or, if the message is not found, a supplied
- * default value is returned. Instead of using the value stack in the ActionContext
- * this version of the getText() method uses the provided value stack.
- *
- * @param key the resource bundle key that is to be searched for
- * @param defaultValue the default value which will be returned if no message is found
- * @param args an array args to be used in a {@link java.text.MessageFormat} message
- * @param stack the value stack to use for finding the text
- * @return the message as found in the resource bundle, or defaultValue if none is found
- */
- public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
- Locale locale;
- if (stack == null){
- locale = getLocale();
- }else{
- locale = stack.getActionContext().getLocale();
- }
- if (locale == null) {
- locale = getLocale();
- }
- if (clazz != null) {
- return localizedTextProvider.findText(clazz, key, locale, defaultValue, args, stack);
- } else {
- return localizedTextProvider.findText(bundle, key, locale, defaultValue, args, stack);
- }
-
- }
-
- /**
- * Get the named bundle.
- *
- * <p>
- * You can override the getLocale() methodName to change the behaviour of how
- * to choose locale for the bundles that are returned. Typically you would
- * use the TextProvider interface to get the users configured locale, or use
- * your own methodName to allow the user to select the locale and store it in
- * the session (by using the SessionAware interface).
- * </p>
- *
- * @param aBundleName bundle name
- * @return a resource bundle
- */
- public ResourceBundle getTexts(String aBundleName) {
- return localizedTextProvider.findResourceBundle(aBundleName, getLocale());
- }
-
- /**
- * Get the resource bundle associated with this action.
- * This will be based on the actual subclass that is used.
- *
- * @return resouce bundle
- */
- public ResourceBundle getTexts() {
- if (clazz != null) {
- return getTexts(clazz.getName());
- }
- return bundle;
- }
-
- /**
- * Get's the locale from the localeProvider.
- *
- * @return the locale from the localeProvider.
- */
- private Locale getLocale() {
- return localeProvider.getLocale();
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/Unchainable.java b/core/src/main/java/com/opensymphony/xwork2/Unchainable.java
deleted file mode 100644
index 9f96b92dc..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/Unchainable.java
+++ /dev/null
@@ -1,27 +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 com.opensymphony.xwork2;
-
-/**
- * Simple marker interface to indicate an object should <b>not</b> have its properties copied during chaining.
- *
- * @see com.opensymphony.xwork2.interceptor.ChainingInterceptor
- */
-public interface Unchainable {
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java b/core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java
deleted file mode 100644
index 5ae380225..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java
+++ /dev/null
@@ -1,67 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import org.apache.struts2.StrutsException;
-
-/**
- * Handles cases when the result or action is unknown.
- *
- * <p>
- * This allows other classes like Struts plugins to provide intelligent defaults easier.
- * </p>
- */
-public interface UnknownHandler {
-
- /**
- * Handles the case when an action configuration is unknown. Implementations can return a new ActionConfig
- * to be used to process the request.
- *
- * @param namespace The namespace
- * @param actionName The action name
- * @return An generated ActionConfig, can return <tt>null</tt>
- * @throws StrutsException in case of errors
- */
- ActionConfig handleUnknownAction(String namespace, String actionName) throws StrutsException;
-
- /**
- * Handles the case when a result cannot be found for an action and result code.
- *
- * @param actionContext The action context
- * @param actionName The action name
- * @param actionConfig The action config
- * @param resultCode The returned result code
- * @return A result to be executed, can return <tt>null</tt>
- * @throws StrutsException in case of errors
- */
- Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) throws StrutsException;
-
- /**
- * Handles the case when an action method cannot be found. This method is responsible both for finding the method and executing it.
- *
- * @since 2.1
- * @param action The action object
- * @param methodName The method name to call
- * @return The result returned from invoking the action method, can return <tt>null</tt> if this instance cannot
- * handle such methodName to allow other handlers give a chance
- */
- Object handleUnknownActionMethod(Object action, String methodName);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java b/core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java
deleted file mode 100644
index 3e8246232..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java
+++ /dev/null
@@ -1,50 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-
-import java.util.List;
-
-/**
- * An unknown handler manager contains a list of UnknownHandler and iterates on them by order
- *
- * @see com.opensymphony.xwork2.DefaultUnknownHandlerManager
- */
-public interface UnknownHandlerManager {
-
- Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode);
-
- /**
- * Tries to handle passed methodName if cannot find method should re
- *
- * @param action Action's instance
- * @param methodName method name to handle
- * @return Result representing result of given action method
- * @throws NoSuchMethodException if method can be handled by defined UnknownHandlers
- */
- Object handleUnknownMethod(Object action, String methodName) throws NoSuchMethodException;
-
- ActionConfig handleUnknownAction(String namespace, String actionName);
-
- boolean hasUnknownHandlers();
-
- List<UnknownHandler> getUnknownHandlers();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/Validateable.java b/core/src/main/java/com/opensymphony/xwork2/Validateable.java
deleted file mode 100644
index ed7226380..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/Validateable.java
+++ /dev/null
@@ -1,35 +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 com.opensymphony.xwork2;
-
-/**
- * Provides an interface in which a call for a validation check can be done.
- *
- * @author Jason Carreira
- * @see ActionSupport
- * @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor
- */
-public interface Validateable {
-
- /**
- * Performs validation.
- */
- void validate();
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java b/core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
deleted file mode 100644
index 385911c61..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
+++ /dev/null
@@ -1,183 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.interceptor.ValidationAware;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Provides a default implementation of ValidationAware. Returns new collections for
- * errors and messages (defensive copy).
- *
- * @author Jason Carreira
- * @author tm_jee
- * @version $Date$ $Id$
- */
-public class ValidationAwareSupport implements ValidationAware, Serializable {
-
- private Collection<String> actionErrors;
- private Collection<String> actionMessages;
- private Map<String, List<String>> fieldErrors;
-
-
- public synchronized void setActionErrors(Collection<String> errorMessages) {
- this.actionErrors = errorMessages;
- }
-
- public synchronized Collection<String> getActionErrors() {
- return new LinkedList<>(internalGetActionErrors());
- }
-
- public synchronized void setActionMessages(Collection<String> messages) {
- this.actionMessages = messages;
- }
-
- public synchronized Collection<String> getActionMessages() {
- return new LinkedList<>(internalGetActionMessages());
- }
-
- public synchronized void setFieldErrors(Map<String, List<String>> errorMap) {
- this.fieldErrors = errorMap;
- }
-
- public synchronized Map<String, List<String>> getFieldErrors() {
- return new LinkedHashMap<>(internalGetFieldErrors());
- }
-
- public synchronized void addActionError(String anErrorMessage) {
- internalGetActionErrors().add(anErrorMessage);
- }
-
- public synchronized void addActionMessage(String aMessage) {
- internalGetActionMessages().add(aMessage);
- }
-
- public synchronized void addFieldError(String fieldName, String errorMessage) {
- final Map<String, List<String>> errors = internalGetFieldErrors();
- List<String> thisFieldErrors = errors.computeIfAbsent(fieldName, k -> new ArrayList<>());
- thisFieldErrors.add(errorMessage);
- }
-
- public synchronized boolean hasActionErrors() {
- return (actionErrors != null) && !actionErrors.isEmpty();
- }
-
- public synchronized boolean hasActionMessages() {
- return (actionMessages != null) && !actionMessages.isEmpty();
- }
-
- public synchronized boolean hasErrors() {
- return (hasActionErrors() || hasFieldErrors());
- }
-
- public synchronized boolean hasFieldErrors() {
- return (fieldErrors != null) && !fieldErrors.isEmpty();
- }
-
- private Collection<String> internalGetActionErrors() {
- if (actionErrors == null) {
- actionErrors = new ArrayList<>();
- }
-
- return actionErrors;
- }
-
- private Collection<String> internalGetActionMessages() {
- if (actionMessages == null) {
- actionMessages = new ArrayList<>();
- }
-
- return actionMessages;
- }
-
- private Map<String, List<String>> internalGetFieldErrors() {
- if (fieldErrors == null) {
- fieldErrors = new LinkedHashMap<>();
- }
-
- return fieldErrors;
- }
-
- /**
- * Clears field errors map.
- *
- * <p>
- * Will clear the map that contains field errors.
- * </p>
- */
- public synchronized void clearFieldErrors() {
- internalGetFieldErrors().clear();
- }
-
- /**
- * Clears action errors list.
- *
- * <p>
- * Will clear the list that contains action errors.
- * </p>
- */
- public synchronized void clearActionErrors() {
- internalGetActionErrors().clear();
- }
-
- /**
- * Clears messages list.
- *
- * <p>
- * Will clear the list that contains action messages.
- * </p>
- */
- public synchronized void clearMessages() {
- internalGetActionMessages().clear();
- }
-
- /**
- * Clears all error list/maps.
- *
- * <p>
- * Will clear the map and list that contain
- * field errors and action errors.
- * </p>
- */
- public synchronized void clearErrors() {
- internalGetFieldErrors().clear();
- internalGetActionErrors().clear();
- }
-
- /**
- * Clears all error and messages list/maps.
- *
- * <p>
- * Will clear the maps/lists that contain
- * field errors, action errors and action messages.
- * </p>
- */
- public synchronized void clearErrorsAndMessages() {
- internalGetFieldErrors().clear();
- internalGetActionErrors().clear();
- internalGetActionMessages().clear();
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java b/core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java
deleted file mode 100644
index fe39c0c2a..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java
+++ /dev/null
@@ -1,86 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationManager;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Context;
-import com.opensymphony.xwork2.inject.Factory;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.test.StubConfigurationProvider;
-import com.opensymphony.xwork2.util.XWorkTestCaseHelper;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-import org.junit.After;
-import org.junit.Before;
-
-public abstract class XWorkJUnit4TestCase {
-
- protected ConfigurationManager configurationManager;
- protected Configuration configuration;
- protected Container container;
- protected ActionProxyFactory actionProxyFactory;
-
- @Before
- public void setUp() throws Exception {
- configurationManager = XWorkTestCaseHelper.setUp();
- configuration = configurationManager.getConfiguration();
- container = configuration.getContainer();
- actionProxyFactory = container.getInstance(ActionProxyFactory.class);
- }
-
- @After
- public void tearDown() throws Exception {
- XWorkTestCaseHelper.tearDown(configurationManager);
- }
-
- protected void loadConfigurationProviders(ConfigurationProvider... providers) {
- configurationManager = XWorkTestCaseHelper.loadConfigurationProviders(configurationManager, providers);
- configuration = configurationManager.getConfiguration();
- container = configuration.getContainer();
- actionProxyFactory = container.getInstance(ActionProxyFactory.class);
- }
-
- protected void loadButAdd(final Class<?> type, final Object impl) {
- loadButAdd(type, Container.DEFAULT_NAME, impl);
- }
-
- protected void loadButAdd(final Class<?> type, final String name, final Object impl) {
- loadConfigurationProviders(new StubConfigurationProvider() {
- @Override
- public void register(ContainerBuilder builder,
- LocatableProperties props) throws ConfigurationException {
- builder.factory(type, name, new Factory() {
- public Object create(Context context) throws Exception {
- return impl;
- }
-
- @Override
- public Class type() {
- return impl.getClass();
- }
- }, Scope.SINGLETON);
- }
- });
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java b/core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java
deleted file mode 100644
index 56056703e..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java
+++ /dev/null
@@ -1,144 +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 com.opensymphony.xwork2;
-
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationManager;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Context;
-import com.opensymphony.xwork2.inject.Factory;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.test.StubConfigurationProvider;
-import com.opensymphony.xwork2.util.XWorkTestCaseHelper;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-import junit.framework.TestCase;
-import org.apache.commons.lang3.ClassUtils;
-
-import java.util.Locale;
-import java.util.Map;
-
-import static java.util.Collections.singletonMap;
-
-/**
- * Base JUnit TestCase to extend for XWork specific JUnit tests. Uses
- * the generic test setup for logic.
- *
- * @author plightbo
- */
-public abstract class XWorkTestCase extends TestCase {
-
- protected ConfigurationManager configurationManager;
- protected Configuration configuration;
- protected Container container;
- protected ActionProxyFactory actionProxyFactory;
-
- public XWorkTestCase() {
- super();
- }
-
- @Override
- protected void setUp() throws Exception {
- configurationManager = XWorkTestCaseHelper.setUp();
- reloadConfiguration(configurationManager);
- }
-
- @Override
- protected void tearDown() throws Exception {
- XWorkTestCaseHelper.tearDown(configurationManager);
- }
-
- private void reloadConfiguration(ConfigurationManager configurationManager) {
- configuration = configurationManager.getConfiguration();
- container = configuration.getContainer();
- actionProxyFactory = container.getInstance(ActionProxyFactory.class);
- }
-
- protected void loadConfigurationProviders(ConfigurationProvider... providers) {
- configurationManager = XWorkTestCaseHelper.loadConfigurationProviders(configurationManager, providers);
- reloadConfiguration(configurationManager);
- }
-
- protected void loadButSet(Map<String, ?> properties) {
- loadConfigurationProviders(new StubConfigurationProvider() {
- @Override
- public void register(ContainerBuilder builder,
- LocatableProperties props) throws ConfigurationException {
- properties.forEach((k, v) -> props.setProperty(k, String.valueOf(v)));
- }
- });
- }
-
- protected <T> void loadButAdd(final Class<T> type, final T impl) {
- loadButAdd(type, Container.DEFAULT_NAME, impl);
- }
-
- protected <T> void loadButAdd(final Class<T> type, final String name, final T impl) {
- loadConfigurationProviders(new StubConfigurationProvider() {
- @Override
- public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
- if (impl instanceof String || ClassUtils.isPrimitiveOrWrapper(impl.getClass())) {
- props.setProperty(name, "" + impl);
- } else {
- builder.factory(type, name, new Factory<>() {
- @Override
- public T create(Context context) throws Exception {
- return impl;
- }
-
- @Override
- public Class<T> type() {
- return (Class<T>) impl.getClass();
- }
- }, Scope.SINGLETON);
- }
- }
- });
- }
-
- protected Map<String, Object> createContextWithLocale(Locale locale) {
- return ActionContext.of()
- .withLocale(locale)
- .getContextMap();
- }
-
- protected void setStrutsConstant(String constant, String value) {
- setStrutsConstant(singletonMap(constant, value));
- }
-
- protected void setStrutsConstant(final Map<String, String> overwritePropeties) {
- configurationManager.addContainerProvider(new StubConfigurationProvider() {
- @Override
- public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
- for (Map.Entry<String, String> stringStringEntry : overwritePropeties.entrySet()) {
- props.setProperty(stringStringEntry.getKey(), stringStringEntry.getValue(), null);
- }
- }
-
- @Override
- public void destroy() {
- }
- });
-
- configurationManager.reload();
- reloadConfiguration(configurationManager);
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java
deleted file mode 100644
index 687943d36..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java
+++ /dev/null
@@ -1,26 +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 com.opensymphony.xwork2.config;
-
-/**
- * When implemented allows to alias already existing beans
- */
-public interface BeanSelectionProvider extends ConfigurationProvider {
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/Configuration.java b/core/src/main/java/com/opensymphony/xwork2/config/Configuration.java
deleted file mode 100644
index 3f170b19d..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/Configuration.java
+++ /dev/null
@@ -1,95 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.config.entities.PackageConfig;
-import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig;
-import com.opensymphony.xwork2.inject.Container;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * XWork configuration.
- *
- * @author Mike
- */
-public interface Configuration extends Serializable {
-
- void rebuildRuntimeConfiguration();
-
- PackageConfig getPackageConfig(String name);
-
- Set<String> getPackageConfigNames();
-
- Map<String, PackageConfig> getPackageConfigs();
-
- /**
- * The current runtime configuration. Currently, if changes have been made to the Configuration since the last
- * time buildRuntimeConfiguration() was called, you'll need to make sure to.
- *
- * @return the current runtime configuration
- */
- RuntimeConfiguration getRuntimeConfiguration();
-
- void addPackageConfig(String name, PackageConfig packageConfig);
-
- /**
- * Removes a package from the the list of packages. Changes to the configuration won't take effect until buildRuntimeConfiguration
- * is called.
- * @param packageName the name of the package to remove
- * @return the package removed (if any)
- */
- PackageConfig removePackageConfig(String packageName);
-
- /**
- * Allow the Configuration to clean up any resources that have been used.
- */
- void destroy();
-
- /**
- * @since 2.1
- * @param containerProviders list of container providers
- * @return list of package providers
- * @throws ConfigurationException in case of any configuration errors
- */
- List<PackageProvider> reloadContainer(List<ContainerProvider> containerProviders) throws ConfigurationException;
-
- /**
- * @return the container
- */
- Container getContainer();
-
- Set<String> getLoadedFileNames();
-
- /**
- * @since 2.1
- * @return list of unknown handlers
- */
- List<UnknownHandlerConfig> getUnknownHandlerStack();
-
- /**
- * @since 2.1
- * @param unknownHandlerStack list of unknown handlers
- */
- void setUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack);
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.java b/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.java
deleted file mode 100644
index b9c34247b..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.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 com.opensymphony.xwork2.config;
-
-import org.apache.struts2.StrutsException;
-
-/**
- * ConfigurationException
- *
- * @author Jason Carreira
- */
-public class ConfigurationException extends StrutsException {
-
- /**
- * Constructs a <code>ConfigurationException</code> with no detail message.
- */
- public ConfigurationException() {
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with the specified
- * detail message.
- *
- * @param s the detail message.
- */
- public ConfigurationException(String s) {
- super(s);
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with the specified
- * detail message.
- *
- * @param s the detail message.
- * @param target the target object
- */
- public ConfigurationException(String s, Object target) {
- super(s, target);
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with no detail message.
- *
- * @param cause the cause of the exception
- */
- public ConfigurationException(Throwable cause) {
- super(cause);
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with no detail message.
- *
- * @param cause the cause of the exception
- * @param target the target object
- */
- public ConfigurationException(Throwable cause, Object target) {
- super(cause, target);
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with the specified
- * detail message.
- *
- * @param s the detail message.
- * @param cause the cause of the exception
- */
- public ConfigurationException(String s, Throwable cause) {
- super(s, cause);
- }
-
- /**
- * Constructs a <code>ConfigurationException</code> with the specified
- * detail message.
- *
- * @param s the detail message.
- * @param cause the cause of the exception
- * @param target the target object
- */
- public ConfigurationException(String s, Throwable cause, Object target) {
- super(s, cause, target);
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java b/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
deleted file mode 100644
index 49517eedf..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
+++ /dev/null
@@ -1,232 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
-import com.opensymphony.xwork2.config.providers.StrutsDefaultConfigurationProvider;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-import static org.apache.struts2.StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD;
-
-
-/**
- * ConfigurationManager - central for XWork Configuration management, including
- * its ConfigurationProvider.
- *
- * @author Jason Carreira
- * @author tm_jee
- * @version $Date$ $Id$
- */
-public class ConfigurationManager {
-
- protected static final Logger LOG = LogManager.getLogger(ConfigurationManager.class);
- protected Configuration configuration;
- private List<ContainerProvider> containerProviders = new ArrayList<>();
- private List<PackageProvider> packageProviders = new ArrayList<>();
- protected String defaultFrameworkBeanName;
- private boolean providersChanged = true;
- private boolean alwaysReloadConfigs = false;
-
- public ConfigurationManager(String name) {
- this.defaultFrameworkBeanName = name;
- }
-
- /**
- * @return the current XWork configuration object. By default an instance of DefaultConfiguration will be returned
- *
- * @see com.opensymphony.xwork2.config.impl.DefaultConfiguration
- */
- public synchronized Configuration getConfiguration() {
- if (wasConfigInitialised()) {
- conditionalReload();
- }
- return configuration;
- }
-
- /**
- * @return whether configuration was initialised (was null)
- */
- private boolean wasConfigInitialised() {
- if (configuration == null) {
- initialiseConfiguration();
- return false;
- }
- return true;
- }
-
- protected void initialiseConfiguration() {
- if (containerProviders.isEmpty()) {
- addDefaultContainerProviders();
- }
- configuration = createConfiguration(defaultFrameworkBeanName);
- try {
- reload();
- } catch (ConfigurationException e) {
- configuration.destroy();
- configuration = null;
- providersChanged = true;
- throw new ConfigurationException("Unable to load configuration.", e);
- }
- }
-
- protected void addDefaultContainerProviders() {
- containerProviders.add(new StrutsDefaultConfigurationProvider());
- }
-
- protected Configuration createConfiguration(String beanName) {
- return new DefaultConfiguration(beanName);
- }
-
- /**
- * Clear all container providers and destroy managing Configuration instance
- */
- public synchronized void destroyConfiguration() {
- clearContainerProviders();
- if (configuration != null) {
- configuration.destroy();
- configuration = null;
- }
- }
-
- public synchronized void setConfiguration(Configuration configuration) {
- this.configuration = configuration;
- }
-
- /**
- * Get the current list of ConfigurationProviders.
- *
- * @return the list of registered ConfigurationProvider objects
- * @see ConfigurationProvider
- */
- public synchronized List<ContainerProvider> getContainerProviders() {
- return new ArrayList<>(containerProviders);
- }
-
- /**
- * Set the list of configuration providers
- *
- * @param containerProviders list of {@link ConfigurationProvider} to be set
- */
- public synchronized void setContainerProviders(List<ContainerProvider> containerProviders) {
- this.containerProviders = new ArrayList<>(containerProviders);
- providersChanged = true;
- }
-
- /**
- * adds a configuration provider to the List of ConfigurationProviders. a given ConfigurationProvider may be added
- * more than once
- *
- * @param provider the ConfigurationProvider to register
- */
- public synchronized void addContainerProvider(ContainerProvider provider) {
- if (!containerProviders.contains(provider)) {
- containerProviders.add(provider);
- providersChanged = true;
- }
- }
-
- public synchronized void removeContainerProvider(ContainerProvider provider) {
- if (containerProviders.remove(provider)) {
- destroyContainerProvider(provider);
- providersChanged = true;
- }
- }
-
- public synchronized void clearContainerProviders() {
- destroyContainerProviders();
- containerProviders.clear();
- providersChanged = true;
- }
-
- private void destroyContainerProviders() {
- LOG.debug("Destroying all providers.");
- containerProviders.forEach(this::destroyContainerProvider);
- }
-
- private void destroyContainerProvider(ContainerProvider containerProvider) {
- try {
- containerProvider.destroy();
- } catch (Exception e) {
- LOG.warn("Error while destroying container provider [{}]", containerProvider.toString(), e);
- }
- }
-
- /**
- * Reloads the Configuration files if the configuration files indicate that they need to be reloaded.
- */
- public synchronized void conditionalReload() {
- if (alwaysReloadConfigs || providersChanged) {
- LOG.debug("Checking ConfigurationProviders for reload.");
- if (needReloadContainerProviders() || needReloadPackageProviders()) {
- destroyAndReload();
- }
- providersChanged = false;
- }
- }
-
- private void updateAlwaysReloadFlag() {
- boolean newValue = Boolean.parseBoolean(configuration.getContainer()
- .getInstance(String.class, STRUTS_CONFIGURATION_XML_RELOAD));
- if (alwaysReloadConfigs != newValue) {
- LOG.debug(
- "Updating [{}], current value is [{}], new value [{}]",
- STRUTS_CONFIGURATION_XML_RELOAD,
- String.valueOf(alwaysReloadConfigs),
- String.valueOf(newValue));
- alwaysReloadConfigs = newValue;
- }
- }
-
- private boolean needReloadPackageProviders() {
- Optional<PackageProvider> provider = packageProviders.stream().filter(PackageProvider::needsReload).findAny();
- if (provider.isPresent()) {
- LOG.info("Detected package provider [{}] needs to be reloaded.", provider.get());
- return true;
- }
- return false;
- }
-
- private boolean needReloadContainerProviders() {
- Optional<ContainerProvider> provider = containerProviders.stream().filter(ContainerProvider::needsReload).findAny();
- if (provider.isPresent()) {
- LOG.info("Detected container provider [{}] needs to be reloaded.", provider.get());
- return true;
- }
- return false;
- }
-
- public synchronized void destroyAndReload() {
- destroyContainerProviders();
- reload();
- }
-
- public synchronized void reload() {
- if (wasConfigInitialised()) {
- LOG.debug("Reloading all providers.");
- packageProviders = configuration.reloadContainer(containerProviders);
- providersChanged = false;
- updateAlwaysReloadFlag();
- }
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java
deleted file mode 100644
index 2140d51fa..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java
+++ /dev/null
@@ -1,25 +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 com.opensymphony.xwork2.config;
-
-/**
- * Interface to be implemented by all forms of XWork configuration classes.
- */
-public interface ConfigurationProvider extends ContainerProvider, PackageProvider {
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java b/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
deleted file mode 100644
index 06381c5b0..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
+++ /dev/null
@@ -1,97 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.config.entities.PackageConfig;
-import org.apache.commons.lang3.ClassUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-/**
- * ConfigurationUtil
- *
- * @author Jason Carreira Created May 23, 2003 11:22:49 PM
- */
-public class ConfigurationUtil {
-
- private static final Logger LOG = LogManager.getLogger(ConfigurationUtil.class);
-
- private ConfigurationUtil() {
- }
-
- /**
- * Get the {@link PackageConfig} elements with the specified names.
- * @param configuration Configuration from which to find the package elements
- * @param parent Comma separated list of parent package names
- * @return The package elements that correspond to the names in the {@code parent} parameter.
- */
- public static List<PackageConfig> buildParentsFromString(Configuration configuration, String parent) {
- List<String> parentPackageNames = buildParentListFromString(parent);
- List<PackageConfig> parentPackageConfigs = new ArrayList<>();
- for (String parentPackageName : parentPackageNames) {
- PackageConfig parentPackageContext = configuration.getPackageConfig(parentPackageName);
-
- if (parentPackageContext != null) {
- parentPackageConfigs.add(parentPackageContext);
- }
- }
-
- return parentPackageConfigs;
- }
-
- /**
- * Splits the string into a list using a comma as the token separator.
- * @param parent The comma separated string.
- * @return A list of tokens from the specified string.
- */
- public static List<String> buildParentListFromString(String parent) {
- if (StringUtils.isEmpty(parent)) {
- return Collections.emptyList();
- }
-
- StringTokenizer tokenizer = new StringTokenizer(parent, ",");
- List<String> parents = new ArrayList<>();
-
- while (tokenizer.hasMoreTokens()) {
- String parentName = tokenizer.nextToken().trim();
-
- if (StringUtils.isNotEmpty(parentName)) {
- parents.add(parentName);
- }
- }
-
- return parents;
- }
-
- public static Set<Class<?>> getAllClassTypes(Class<?> clazz) {
- HashSet<Class<?>> classes = new HashSet<>();
- classes.add(clazz);
- classes.addAll(ClassUtils.getAllSuperclasses(clazz));
- classes.addAll(ClassUtils.getAllInterfaces(clazz));
- return classes;
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java
deleted file mode 100644
index e43bf8134..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java
+++ /dev/null
@@ -1,60 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-
-
-/**
- * Provides beans and constants/properties for the Container
- *
- * @since 2.1
- */
-public interface ContainerProvider {
-
- /**
- * Called before removed from the configuration manager
- */
- void destroy();
-
- /**
- * Initializes with the configuration
- * @param configuration The configuration
- * @throws ConfigurationException If anything goes wrong
- */
- void init(Configuration configuration) throws ConfigurationException;
-
- /**
- * Tells whether the ContainerProvider should reload its configuration
- *
- * @return <tt>true</tt>, whether the ContainerProvider should reload its configuration, <tt>false</tt>otherwise.
- */
- boolean needsReload();
-
- /**
- * Registers beans and properties for the Container
- *
- * @param builder The builder to register beans with
- * @param props The properties to register constants with
- * @throws ConfigurationException If anything goes wrong
- */
- void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java
deleted file mode 100644
index d572b4c7a..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java
+++ /dev/null
@@ -1,55 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.FileManagerFactory;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-
-/**
- * Allows to specify custom {@link FileManagerFactory}
- */
-public class FileManagerFactoryProvider implements ContainerProvider {
-
- private final Class<? extends FileManagerFactory> factoryClass;
-
- public FileManagerFactoryProvider(Class<? extends FileManagerFactory> factoryClass) {
- this.factoryClass = factoryClass;
- }
-
- @Override
- public void destroy() {
- }
-
- @Override
- public void init(Configuration configuration) throws ConfigurationException {
- }
-
- @Override
- public boolean needsReload() {
- return false;
- }
-
- @Override
- public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
- builder.factory(FileManagerFactory.class, factoryClass.getSimpleName(), factoryClass, Scope.SINGLETON);
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java
deleted file mode 100644
index 632882b94..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java
+++ /dev/null
@@ -1,57 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.FileManager;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-
-/**
- * Allows to specify custom {@link FileManager} by user
- */
-public class FileManagerProvider implements ContainerProvider {
-
- private final Class<? extends FileManager> fileManagerClass;
- private final String name;
-
- public FileManagerProvider(Class<? extends FileManager> fileManagerClass, String name) {
- this.fileManagerClass = fileManagerClass;
- this.name = name;
- }
-
- @Override
- public void destroy() {
- }
-
- @Override
- public void init(Configuration configuration) throws ConfigurationException {
- }
-
- @Override
- public boolean needsReload() {
- return false;
- }
-
- @Override
- public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
- builder.factory(FileManager.class, name, fileManagerClass, Scope.SINGLETON);
- }
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java
deleted file mode 100644
index fd25639dc..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java
+++ /dev/null
@@ -1,49 +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 com.opensymphony.xwork2.config;
-
-/**
- * Provides configuration packages. The separate init and loadPackages calls are due to the need to
- * preserve backwards compatibility with the 2.0 {@link ConfigurationProvider} interface
- *
- * @since 2.1
- */
-public interface PackageProvider {
-
- /**
- * Initializes with the configuration
- * @param configuration The configuration
- * @throws ConfigurationException If anything goes wrong
- */
- void init(Configuration configuration) throws ConfigurationException;
-
- /**
- * Tells whether the PackageProvider should reload its configuration
- *
- * @return <tt>true</tt>, whether the PackageProvider should reload its configuration, <tt>false</tt>otherwise.
- */
- boolean needsReload();
-
- /**
- * Loads the packages for the configuration.
- * @throws ConfigurationException in case of configuration errors
- */
- void loadPackages() throws ConfigurationException;
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java b/core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java
deleted file mode 100644
index 9d5b5421f..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java
+++ /dev/null
@@ -1,56 +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 com.opensymphony.xwork2.config;
-
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-
-import java.io.Serializable;
-import java.util.Map;
-
-
-/**
- * RuntimeConfiguration
- *
- * @author Jason Carreira
- * Created Feb 25, 2003 10:56:02 PM
- */
-public interface RuntimeConfiguration extends Serializable {
-
- /**
- * get the fully expanded ActionConfig for a specified namespace and (action) name
- *
- * @param namespace the namespace of the Action. if this is null, then the empty namespace, "", will be used
- * @param name the name of the Action. may not be null.
- * @return the requested ActionConfig or null if there was no ActionConfig associated with the specified namespace
- * and name
- */
- ActionConfig getActionConfig(String namespace, String name);
-
- /**
- * returns a Map of all the registered ActionConfigs. Again, these ActionConfigs are fully expanded so that any
- * inherited interceptors, results, etc. will be included
- *
- * @return a Map of Map keyed by namespace and name respectively such that
- * <pre>
- * ActionConfig config = (ActionConfig)((Map)getActionConfigs.get(namespace)).get(name);
- * </pre>
- * should return a valid config for valid namespace/name pairs
- */
- Map<String, Map<String, ActionConfig>> getActionConfigs();
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java
deleted file mode 100644
index 8dcd3eef7..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java
+++ /dev/null
@@ -1,35 +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 com.opensymphony.xwork2.config;
-
-import jakarta.servlet.ServletContext;
-
-/**
- * Dedicated interface to allow inject {@link ServletContext} and perform initialisation based in it
- */
-public interface ServletContextAwareConfigurationProvider extends ConfigurationProvider {
-
- /**
- * This is a lazy constructor, called just after class was initiated
- *
- * @param servletContext current instance of {@link ServletContext}
- */
- void initWithContext(ServletContext servletContext);
-
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java b/core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
deleted file mode 100644
index f259400d5..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
+++ /dev/null
@@ -1,373 +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 com.opensymphony.xwork2.config.entities;
-
-import com.opensymphony.xwork2.util.location.Located;
-import com.opensymphony.xwork2.util.location.Location;
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-
-
-/**
- * Contains everything needed to configure and execute an action:
- * <ul>
- * <li>methodName - the method name to execute on the action. If this is null, the Action will be cast to the Action
- * Interface and the execute() method called</li>
- * <li>clazz - the class name for the action</li>
- * <li>params - the params to be set for this action just before execution</li>
- * <li>results - the result map {String -> View class}</li>
- * <li>resultParameters - params for results {String -> Map}</li>
- * <li>typeConverter - the Ognl TypeConverter to use when getting/setting properties</li>
- * </ul>
- *
- * @author Mike
- * @author Rainer Hermanns
- * @version $Revision$
- */
-public class ActionConfig extends Located implements Serializable {
-
- public static final String DEFAULT_METHOD = "execute";
- public static final String WILDCARD = "*";
- public static final String DEFAULT_METHOD_REGEX = "([A-Za-z0-9_$]*)";
-
- protected List<InterceptorMapping> interceptors; // a list of interceptorMapping Objects eg. List<InterceptorMapping>
- protected Map<String,String> params;
- protected Map<String, ResultConfig> results;
- protected List<ExceptionMappingConfig> exceptionMappings;
- protected String className;
- protected String methodName;
- protected String packageName;
- protected String name;
- protected boolean strictMethodInvocation = true;
- protected AllowedMethods allowedMethods;
-
- protected ActionConfig(String packageName, String name, String className) {
- this.packageName = packageName;
- this.name = name;
- this.className = className;
- params = new LinkedHashMap<>();
- results = new LinkedHashMap<>();
- interceptors = new ArrayList<>();
- exceptionMappings = new ArrayList<>();
- }
-
- /**
- * Clones an ActionConfig, copying data into new maps and lists
- * @param orig The ActionConfig to clone
- * @since 2.1
- */
- protected ActionConfig(ActionConfig orig) {
- this.name = orig.name;
- this.className = orig.className;
- this.methodName = orig.methodName;
- this.packageName = orig.packageName;
- this.params = new LinkedHashMap<>(orig.params);
- this.interceptors = new ArrayList<>(orig.interceptors);
- this.results = new LinkedHashMap<>(orig.results);
- this.exceptionMappings = new ArrayList<>(orig.exceptionMappings);
- this.allowedMethods = orig.allowedMethods;
- this.location = orig.location;
- this.strictMethodInvocation = orig.strictMethodInvocation;
- }
-
- public String getName() {
- return name;
- }
-
- public String getClassName() {
- return className;
- }
-
- public List<ExceptionMappingConfig> getExceptionMappings() {
- return exceptionMappings;
- }
-
- public List<InterceptorMapping> getInterceptors() {
- return interceptors;
- }
-
- public Set<String> getAllowedMethods() {
- return allowedMethods.list();
- }
-
- /**
- * Returns name of the action method
- *
- * @return name of the method to execute
- */
- public String getMethodName() {
- return methodName;
- }
-
- /**
- * @return Returns the packageName.
- */
- public String getPackageName() {
- return packageName;
- }
-
- public Map<String, String> getParams() {
- return params;
- }
-
- public Map<String, ResultConfig> getResults() {
- return results;
- }
-
- public boolean isAllowedMethod(String method) {
- return method.equals(methodName != null ? methodName : DEFAULT_METHOD) || allowedMethods.isAllowed(method);
- }
-
- public boolean isStrictMethodInvocation() {
- return strictMethodInvocation;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (!(o instanceof ActionConfig actionConfig)) {
- return false;
- }
-
- if (!Objects.equals(className, actionConfig.className)) {
- return false;
- }
-
- if (!Objects.equals(name, actionConfig.name)) {
- return false;
- }
-
- if (!Objects.equals(interceptors, actionConfig.interceptors)) {
- return false;
- }
-
- if (!Objects.equals(methodName, actionConfig.methodName)) {
- return false;
- }
-
- if (!Objects.equals(params, actionConfig.params)) {
- return false;
- }
-
- if (!Objects.equals(results, actionConfig.results)) {
- return false;
- }
-
- if (!Objects.equals(allowedMethods, actionConfig.allowedMethods)) {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result;
- result = (interceptors != null ? interceptors.hashCode() : 0);
- result = 31 * result + (params != null ? params.hashCode() : 0);
- result = 31 * result + (results != null ? results.hashCode() : 0);
- result = 31 * result + (exceptionMappings != null ? exceptionMappings.hashCode() : 0);
- result = 31 * result + (className != null ? className.hashCode() : 0);
- result = 31 * result + (methodName != null ? methodName.hashCode() : 0);
- result = 31 * result + (packageName != null ? packageName.hashCode() : 0);
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (allowedMethods != null ? allowedMethods.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("{ActionConfig ");
- sb.append(name).append(" (");
- sb.append(className);
- if (methodName != null) {
- sb.append(".").append(methodName).append("()");
- }
- sb.append(")");
- sb.append(" - ").append(location);
- sb.append(" - ").append(allowedMethods);
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * The builder for this object. An instance of this object is the only way to construct a new instance. The
- * purpose is to enforce the immutability of the object. The methods are structured in a way to support chaining.
- * After setting any values you need, call the {@link #build()} method to create the object.
- */
- public static class Builder implements InterceptorListHolder{
-
- protected ActionConfig target;
- protected Set<String> allowedMethods;
- private String methodRegex;
-
- public Builder(ActionConfig toClone) {
- target = new ActionConfig(toClone);
- allowedMethods = toClone.getAllowedMethods();
- }
-
- public Builder(String packageName, String name, String className) {
- target = new ActionConfig(packageName, name, className);
- allowedMethods = new HashSet<>();
- }
-
- public Builder packageName(String name) {
- target.packageName = name;
- return this;
- }
-
- public Builder name(String name) {
- target.name = name;
- return this;
- }
-
- public Builder className(String name) {
- target.className = name;
- return this;
- }
-
- public Builder defaultClassName(String name) {
- if (StringUtils.isEmpty(target.className)) {
- target.className = name;
- }
- return this;
- }
-
- public Builder methodName(String method) {
- target.methodName = method;
- addAllowedMethod(method);
- return this;
- }
-
- public Builder addExceptionMapping(ExceptionMappingConfig exceptionMapping) {
- target.exceptionMappings.add(exceptionMapping);
- return this;
- }
-
- public Builder addExceptionMappings(Collection<? extends ExceptionMappingConfig> mappings) {
- target.exceptionMappings.addAll(mappings);
- return this;
- }
-
- public Builder exceptionMappings(Collection<? extends ExceptionMappingConfig> mappings) {
- target.exceptionMappings.clear();
- target.exceptionMappings.addAll(mappings);
- return this;
- }
-
- @Override
- public Builder addInterceptor(InterceptorMapping interceptor) {
- target.interceptors.add(interceptor);
- return this;
- }
-
- @Override
- public Builder addInterceptors(List<InterceptorMapping> interceptors) {
- target.interceptors.addAll(interceptors);
- return this;
- }
-
- public Builder interceptors(List<InterceptorMapping> interceptors) {
- target.interceptors.clear();
- target.interceptors.addAll(interceptors);
- return this;
- }
-
- public Builder addParam(String name, String value) {
- target.params.put(name, value);
- return this;
- }
-
- public Builder addParams(Map<String,String> params) {
- target.params.putAll(params);
- return this;
- }
-
- public Builder addResultConfig(ResultConfig resultConfig) {
- target.results.put(resultConfig.getName(), resultConfig);
- return this;
- }
-
- public Builder addResultConfigs(Collection<ResultConfig> configs) {
- for (ResultConfig rc : configs) {
- target.results.put(rc.getName(), rc);
- }
- return this;
- }
-
- public Builder addResultConfigs(Map<String,ResultConfig> configs) {
- target.results.putAll(configs);
- return this;
- }
-
- public Builder addAllowedMethod(String methodName) {
- if (methodName != null) {
- allowedMethods.add(methodName);
- }
- return this;
- }
-
- public Builder addAllowedMethod(Collection<String> methods) {
- allowedMethods.addAll(methods);
- return this;
- }
-
- public Builder location(Location loc) {
- target.location = loc;
- return this;
- }
-
- public Builder setStrictMethodInvocation(boolean strictMethodInvocation) {
- target.strictMethodInvocation = strictMethodInvocation;
- return this;
- }
-
- public Builder setDefaultMethodRegex(String methodRegex) {
- this.methodRegex = methodRegex;
- return this;
- }
-
- public ActionConfig build() {
- target.params = Collections.unmodifiableMap(target.params);
- target.results = Collections.unmodifiableMap(target.results);
- target.interceptors = Collections.unmodifiableList(target.interceptors);
- target.exceptionMappings = Collections.unmodifiableList(target.exceptionMappings);
- target.allowedMethods = AllowedMethods.build(target.strictMethodInvocation, allowedMethods, methodRegex != null ? methodRegex : DEFAULT_METHOD_REGEX);
-
- ActionConfig result = target;
- target = new ActionConfig(target);
- return result;
- }
-
- }
-}
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java b/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
deleted file mode 100644
index 1967dd7db..000000000
--- a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
+++ /dev/null
@@ -1,220 +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,
... 190137 lines suppressed ...