From 679caec0ac235a83084820bcb4815ea712ec65f3 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Mon, 7 Mar 2016 19:23:38 +0530 Subject: [PATCH 001/334] Create README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..083db0a0a --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# WaveMaker App Runtime + +WaveMaker App Runtime is an application library packaged within every app built by WaveMaker RAD platform. App Runtime is open sourced under Apache 2.0 License, giving complete rights to App Developers to freely modify and distribute applications built using WaveMaker. + +App Runtime comprises of [Angular JS](https://angularjs.org/) based Widget library, [ngCordova](http://ngcordova.com/) based mobile device plugins, [Spring Framework](http://spring.io/projects) and [Hibernate](http://hibernate.org/) service wrappers used for auto-generated backend services within apps built using WaveMaker. + +![](http://www.wavemaker.com/wp-content/uploads/9.png "WaveMaker") + +## AngularJS/Bootstrap Widget Library +https://github.com/angular-ui/bootstrap + +## Themes based on Bootstrap + + +## Hybrid Mobile Widgets/Plugins +https://github.com/driftyco/ng-cordova/ + +## Licensing +WaveMaker App Runtime is licensed under Apache License, Version 2.0. See (License)[] for full license text. From d5bada2c7699a48b443f3a2dade4d533d5c07ff2 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Mon, 7 Mar 2016 19:26:03 +0530 Subject: [PATCH 002/334] Create LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..469070092 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013-2016 WaveMaker, Inc. + + Licensed 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. From 9f56f39c5b9705edfd0a421d1350fb8a839fbbb6 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Mon, 7 Mar 2016 19:29:00 +0530 Subject: [PATCH 003/334] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 083db0a0a..640d66841 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ https://github.com/angular-ui/bootstrap https://github.com/driftyco/ng-cordova/ ## Licensing -WaveMaker App Runtime is licensed under Apache License, Version 2.0. See (License)[] for full license text. +WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [License](/LICENSE) for full license text. From 9a158c017084f35cc9150e08441b589030ddf094 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Mon, 7 Mar 2016 19:55:21 +0530 Subject: [PATCH 004/334] Update README.md --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 640d66841..dd0d5666d 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,28 @@ App Runtime comprises of [Angular JS](https://angularjs.org/) based Widget libra ![](http://www.wavemaker.com/wp-content/uploads/9.png "WaveMaker") -## AngularJS/Bootstrap Widget Library -https://github.com/angular-ui/bootstrap +## Widget Library -## Themes based on Bootstrap +## Hybrid Mobile Widgets and Plugins - -## Hybrid Mobile Widgets/Plugins -https://github.com/driftyco/ng-cordova/ +## Spring and Hibernate Services ## Licensing WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [License](/LICENSE) for full license text. + +## Release Notes +[Latest Release Notes](http://www.wavemaker.com/learn/docs/wavemaker-studio-release-notes/) + +## Related Projects +* [WaveMaker Sample Apps](https://github.com/wavemaker/wavemaker-sample-apps) +* [WaveMaker Prefabs](https://github.com/wavemaker/wavemaker-studio-prefabs) +* [WaveMaker Grunt Theme](https://github.com/wavemaker/grunt-wavemaker-theme) +* [WaveMaker Icon Library, Wavicon](https://github.com/wavemaker/wavicon) + +## Dependent Projects +* [WaveMaker Studio Commons](https://github.com/wavemaker/wavemaker-studio-commons) +* [WaveMaker API Tools]() +* [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) +* [ngCordova](https://github.com/driftyco/ng-cordova/) + +## Build Instructions From fea8a064261cf50fd6a77d5a52ef8209215d017c Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Mon, 7 Mar 2016 19:57:21 +0530 Subject: [PATCH 005/334] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd0d5666d..219925feb 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,6 @@ App Runtime comprises of [Angular JS](https://angularjs.org/) based Widget libra ## Spring and Hibernate Services -## Licensing -WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [License](/LICENSE) for full license text. - ## Release Notes [Latest Release Notes](http://www.wavemaker.com/learn/docs/wavemaker-studio-release-notes/) @@ -31,3 +28,6 @@ WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [Licens * [ngCordova](https://github.com/driftyco/ng-cordova/) ## Build Instructions + +## Licensing +WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [License](/LICENSE) for full license text. From 2ca688ae08af1133d59515959763e412d2558610 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Thu, 23 Mar 2017 11:56:59 +0530 Subject: [PATCH 006/334] Update README.md Updated dependent projects and documentation links to respective features --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 219925feb..973e42cf8 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,14 @@ App Runtime comprises of [Angular JS](https://angularjs.org/) based Widget libra ![](http://www.wavemaker.com/wp-content/uploads/9.png "WaveMaker") ## Widget Library +http://www.wavemaker.com/learn/app-development/widgets/widget-library/ ## Hybrid Mobile Widgets and Plugins +Building hybrid mobile applications based on Cordova using WaveMaker Studio +http://www.wavemaker.com/learn/hybrid-mobile/building-hybrid-mobile-apps/ -## Spring and Hibernate Services +List of plugins/device widgets +http://www.wavemaker.com/learn/app-development/widgets/widget-library/#mobile ## Release Notes [Latest Release Notes](http://www.wavemaker.com/learn/docs/wavemaker-studio-release-notes/) @@ -22,12 +26,11 @@ App Runtime comprises of [Angular JS](https://angularjs.org/) based Widget libra * [WaveMaker Icon Library, Wavicon](https://github.com/wavemaker/wavicon) ## Dependent Projects -* [WaveMaker Studio Commons](https://github.com/wavemaker/wavemaker-studio-commons) -* [WaveMaker API Tools]() +* [WaveMaker Commons](https://github.com/wavemaker/wavemaker-commons) +* [WaveMaker API Tools](https://github.com/wavemaker/wavemaker-tools-apidocs) +* [WaveMaker App Build Tools](https://github.com/wavemaker/wavemaker-app-build-tools) * [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) * [ngCordova](https://github.com/driftyco/ng-cordova/) -## Build Instructions - ## Licensing WaveMaker App Runtime is licensed under Apache License, Version 2.0. See [License](/LICENSE) for full license text. From 842546b2965ea459ba3933ffaab4052d7ef0ae61 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Thu, 23 Mar 2017 11:57:59 +0530 Subject: [PATCH 007/334] Update README.md Updated documentation links --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 973e42cf8..8d32b81b7 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,11 @@ http://www.wavemaker.com/learn/app-development/widgets/widget-library/ ## Hybrid Mobile Widgets and Plugins Building hybrid mobile applications based on Cordova using WaveMaker Studio + http://www.wavemaker.com/learn/hybrid-mobile/building-hybrid-mobile-apps/ List of plugins/device widgets + http://www.wavemaker.com/learn/app-development/widgets/widget-library/#mobile ## Release Notes From c65baa2c55806fec80d8e90854989fa74926e659 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Thu, 23 Mar 2017 12:03:03 +0530 Subject: [PATCH 008/334] Update README.md Updated release notes link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d32b81b7..5ee388768 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ List of plugins/device widgets http://www.wavemaker.com/learn/app-development/widgets/widget-library/#mobile ## Release Notes -[Latest Release Notes](http://www.wavemaker.com/learn/docs/wavemaker-studio-release-notes/) +[Latest Release Notes](http://www.wavemaker.com/learn/wavemaker-release-notes/) ## Related Projects * [WaveMaker Sample Apps](https://github.com/wavemaker/wavemaker-sample-apps) From 0dc0cff476feb71b0f2b45eb29ec9411f403e039 Mon Sep 17 00:00:00 2001 From: Deepak Anupalli Date: Thu, 23 Mar 2017 12:28:31 +0530 Subject: [PATCH 009/334] Update LICENSE Updated copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 469070092..02c4f78bb 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2013-2016 WaveMaker, Inc. + Copyright 2013-2017 WaveMaker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From a7c2ad1f14d80905c26672744225172756c2e697 Mon Sep 17 00:00:00 2001 From: Bandhavya Date: Fri, 27 Jan 2017 11:09:35 +0530 Subject: [PATCH 010/334] Fix for WMS-10038, Extracting the inner children objects from parent element was throwing console error. Change-Id: I2beea2b19ce660ef8a69255b8ffe63bd899d22bc --- .../modules/widgets/basic/search/search.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/basic/search/search.js b/src/main/webapp/scripts/modules/widgets/basic/search/search.js index 255aed497..41b97132b 100644 --- a/src/main/webapp/scripts/modules/widgets/basic/search/search.js +++ b/src/main/webapp/scripts/modules/widgets/basic/search/search.js @@ -473,7 +473,11 @@ WM.module('wm.widgets.basic') function handleQuerySuccess(response, props, pageOptions) { var data = response.content || response, expressionArray = _.split($is.binddataset, '.'), - dataExpression = _.slice(expressionArray, _.indexOf(expressionArray, 'dataSet') + 1).join('.'); + dataExpression = _.slice(expressionArray, _.indexOf(expressionArray, 'dataSet') + 1).join('.'), + $I = '[$i]', + index, + restExpr, + formattedData; if (pageOptions) { $is.page = pageOptions.currentPage; $is.isLastPage = isLastPage($is.page, pageOptions.dataSize, pageOptions.maxResults); @@ -485,7 +489,16 @@ WM.module('wm.widgets.basic') } //if data expression exists, extract the data from the expression path if (dataExpression) { - data = _.get(data, dataExpression); + index = dataExpression.lastIndexOf($I); + restExpr = dataExpression.substr(index + 5); + + if (WM.isArray(data)) { + formattedData = data.map(function (datum) { + return Utils.findValueOf(datum, restExpr); + }); + } + + data = formattedData; } if (!_.isArray(data)) { data = getTransformedData(variable, data); From fb416daea660d448a0881719c850854460fb8629 Mon Sep 17 00:00:00 2001 From: Sudheer Date: Fri, 27 Jan 2017 10:42:09 +0530 Subject: [PATCH 011/334] Icon: Add caption,iconposition property Change-Id: Ibf7de8d399692560cf39608c56cbf1704657f24a --- .../scripts/modules/widgets/base/Base.js | 2 ++ .../modules/widgets/basic/icon/icon.js | 21 +++++++++++++++++-- src/main/webapp/styles/less/wm-widgets.less | 12 +++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/base/Base.js b/src/main/webapp/scripts/modules/widgets/base/Base.js index 4ee811a2f..9cf197040 100644 --- a/src/main/webapp/scripts/modules/widgets/base/Base.js +++ b/src/main/webapp/scripts/modules/widgets/base/Base.js @@ -329,6 +329,8 @@ WM.module('wm.widgets.base', []) }, "wm.icon": { "hint": {"type": "string", "bindable": "in-bound"}, + "caption": {"type": "string", "bindable": "in-out-bound", "maxlength": 256, "showPrettyExprInDesigner": true}, + "iconposition": {"type": "list", "options": ["left", "right"], "value": "left"}, "iconclass": {"type": "string", "value": "wi wi-star-border", "widget": "select-icon", "bindable": "in-out-bound", "pattern": classRegex}, "iconsize": {"type": "string", "pattern": dimensionRegex}, "animation": {"type": "list", "options": animationOptions}, diff --git a/src/main/webapp/scripts/modules/widgets/basic/icon/icon.js b/src/main/webapp/scripts/modules/widgets/basic/icon/icon.js index 4d0a631f7..d204a0cf9 100644 --- a/src/main/webapp/scripts/modules/widgets/basic/icon/icon.js +++ b/src/main/webapp/scripts/modules/widgets/basic/icon/icon.js @@ -5,12 +5,28 @@ WM.module('wm.widgets.basic') .run(['$templateCache', function ($templateCache) { 'use strict'; $templateCache.put('template/widget/icon.html', - '' + '' + + ' ' + + '' + + '' ); }]) .directive('wmIcon', ['PropertiesFactory', 'WidgetUtilService', 'Utils', function (PropertiesFactory, WidgetUtilService, Utils) { 'use strict'; - var widgetProps = PropertiesFactory.getPropertiesOf('wm.icon', ['wm.base']); + var widgetProps = PropertiesFactory.getPropertiesOf('wm.icon', ['wm.base']), + notifyFor = { + 'iconposition': true + }; + + //Define the property change handler. This function will be triggered when there is a change in the widget property + function propertyChangeHandler($is, $el, key, newVal) { + switch (key) { + case 'iconposition': + $el.attr('icon-position', newVal); + break; + } + } + return { 'restrict': 'E', 'scope' : {}, @@ -21,6 +37,7 @@ WM.module('wm.widgets.basic') scope.widgetProps = attrs.widgetid ? Utils.getClonedObject(widgetProps) : widgetProps; }, 'post': function (scope, element, attrs) { + WidgetUtilService.registerPropertyChangeListener(propertyChangeHandler.bind(undefined, scope, element), scope, notifyFor); /* register the property change handler */ WidgetUtilService.postWidgetCreate(scope, element, attrs); } diff --git a/src/main/webapp/styles/less/wm-widgets.less b/src/main/webapp/styles/less/wm-widgets.less index 55afc5372..7aade3a5b 100644 --- a/src/main/webapp/styles/less/wm-widgets.less +++ b/src/main/webapp/styles/less/wm-widgets.less @@ -108,6 +108,18 @@ html, body { position: relative; } +//Icon widget styles +.app-icon-wrapper { + display: inline-block; + position: relative; + &[icon-position="right"] { + direction: rtl; + } + .app-icon { + vertical-align: baseline; + } +} + /*error message for missing partial*/ .app-partial-info { text-align: center; From 45628350dd50585beecd5316691a1a43ca3ed23a Mon Sep 17 00:00:00 2001 From: Abhilash Sandi Date: Tue, 31 Jan 2017 16:25:17 +0530 Subject: [PATCH 012/334] Form: Support for dataset with interpolation with script variable Change-Id: I46351826e321dabdb7c7a22d4f63701ce3fccb73 --- .../modules/layouts/containers/form/form.js | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/scripts/modules/layouts/containers/form/form.js b/src/main/webapp/scripts/modules/layouts/containers/form/form.js index a3920654d..187829d5e 100644 --- a/src/main/webapp/scripts/modules/layouts/containers/form/form.js +++ b/src/main/webapp/scripts/modules/layouts/containers/form/form.js @@ -29,7 +29,7 @@ WM.module('wm.layouts.containers') }]) .directive('wmForm', ['$rootScope', 'PropertiesFactory', 'WidgetUtilService', '$compile', 'CONSTANTS', 'Utils', '$timeout', 'LiveWidgetUtils', "wmToaster", function ($rootScope, PropertiesFactory, WidgetUtilService, $compile, CONSTANTS, Utils, $timeout, LiveWidgetUtils, wmToaster) { 'use strict'; - var widgetProps = PropertiesFactory.getPropertiesOf('wm.layouts.form', ['wm.base', 'wm.base.events.touch','wm.layouts.panel.defaults']), + var widgetProps = PropertiesFactory.getPropertiesOf('wm.layouts.form', ['wm.base', 'wm.base.events.touch', 'wm.layouts.panel.defaults']), notifyFor = { 'captionsize' : true, 'novalidate' : true, @@ -238,9 +238,24 @@ WM.module('wm.layouts.containers') } } + //Get the variable bound to form + function getFormVariable(scope, element) { + //If binddataset is available and starts with bind:Variables, extract the variable name + if (scope.binddataset) { + if (_.includes(scope.binddataset, 'bind:Variables.')) { + scope.formVariable = Utils.getVariableNameFromExpr(scope.binddataset); + } else if (scope.dataset) { + scope.formVariable = scope.dataset; + } + } else if (scope.dataset) { + scope.formVariable = scope.dataset; + } + return element.scope().Variables[scope.formVariable]; + } + function constructDataObject(scope, element) { var formData = {}, - formVariable = element.scope().Variables[scope.formVariable]; + formVariable = getFormVariable(scope, element); //Get all form fields and prepare form data as key value pairs _.forEach(scope.elScope.formFields, function (field) { var fieldName, @@ -266,7 +281,7 @@ WM.module('wm.layouts.containers') var params, template, formData, - formVariable = element.scope().Variables[scope.formVariable]; + formVariable = getFormVariable(scope, element); resetFormState(scope); //Set the values of the widgets inside the form (other than form fields) in form data formData = scope.constructDataObject(); @@ -339,9 +354,6 @@ WM.module('wm.layouts.containers') var handlers = []; scope.statusMessage = undefined; - if (scope.binddataset) { - scope.formVariable = Utils.getVariableNameFromExpr(scope.binddataset); - } /* register the property change handler */ WidgetUtilService.registerPropertyChangeListener(propertyChangeHandler.bind(undefined, scope, element, attrs), scope, notifyFor); From 2e53f25fccd3300a10be0284079468a59e0fee5e Mon Sep 17 00:00:00 2001 From: Abhilash Sandi Date: Tue, 31 Jan 2017 16:29:09 +0530 Subject: [PATCH 013/334] Fix for WMS-10198: Eventhough "show" property is not checked we see then NEW button for the datagrid Change-Id: I932b65982bee2b5926b383682694d46d71b816c6 --- src/main/webapp/scripts/modules/widgets/grid/grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/grid/grid.js b/src/main/webapp/scripts/modules/widgets/grid/grid.js index cadc4d0d0..d58b8c981 100644 --- a/src/main/webapp/scripts/modules/widgets/grid/grid.js +++ b/src/main/webapp/scripts/modules/widgets/grid/grid.js @@ -253,7 +253,7 @@ WM.module('wm.widgets.grid') '
{{subheading}}
' + '' + '
' + - '' + '' + '
' + @@ -265,7 +265,7 @@ WM.module('wm.widgets.grid') '' + '' + '
' + - '' + '
' + ''; From f90f188dbd1e8500ee0d8820e18920e7185ead6b Mon Sep 17 00:00:00 2001 From: Anusha Dharmasagar Date: Tue, 31 Jan 2017 16:41:05 +0530 Subject: [PATCH 014/334] 0# 1.Added javaType mapping for BIT sql type code 2.Modified isDML to return true for queries other than select Change-Id: I0424008e42c5151a015ca74a0724f457d87fed0d --- .../java/com/wavemaker/runtime/data/util/DataServiceUtils.java | 2 +- .../main/java/com/wavemaker/runtime/data/util/JDBCUtils.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/DataServiceUtils.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/DataServiceUtils.java index 2e65e6441..4015b9a0e 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/DataServiceUtils.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/DataServiceUtils.java @@ -55,7 +55,7 @@ public static boolean isDML(String query) { String q = query.trim().toLowerCase(); - return q.startsWith("update") || q.startsWith("insert") || q.startsWith("delete") || q.startsWith("alter"); + return !query.startsWith("select"); } public static String replaceMySqlCloudToken(String url, String hostPortString) { diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/JDBCUtils.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/JDBCUtils.java index f9f8f3e6e..ab58b3453 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/JDBCUtils.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/JDBCUtils.java @@ -60,6 +60,7 @@ public class JDBCUtils { javaTypeVsSqlTypeCodes.put(JavaType.DATETIME, Types.TIMESTAMP); // XXX javaTypeVsSqlTypeCodes.put(JavaType.TIMESTAMP, Types.TIMESTAMP); + sqlTypeCodeVsJavaType.put(Types.BIT, JavaType.BOOLEAN); sqlTypeCodeVsJavaType.put(Types.BOOLEAN, JavaType.BOOLEAN); sqlTypeCodeVsJavaType.put(Types.TINYINT, JavaType.SHORT); sqlTypeCodeVsJavaType.put(Types.SMALLINT, JavaType.SHORT); From 864c942394c771dfb61c0006dccf330d4b1faf01 Mon Sep 17 00:00:00 2001 From: sunilkumar Date: Tue, 31 Jan 2017 17:14:41 +0530 Subject: [PATCH 015/334] Updating api docs dependency from 2.7 to 2.8. Change-Id: I76adab3b218d8a2c0349c36364e3eb65a247bd16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e99d2229..d455280b8 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2.7 + 2.8 1.7.21 1.2.17 From 30681f633964909f01dcb74c4229825da5fa8644 Mon Sep 17 00:00:00 2001 From: Venugopal Jidigam Date: Tue, 31 Jan 2017 18:31:47 +0530 Subject: [PATCH 016/334] package name changes for test class. Change-Id: I04a3f1e5a933007ba3165c135c1ef048464a4ac8 --- .../com/wavemaker/runtime/server/json/JsonPerformanceTest.java | 2 +- .../java/com/wavemaker/runtime/service/ElementTypeTest.java | 2 +- .../src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java index 593328962..44fc6d245 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java @@ -24,7 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.wavemaker.infra.WMTestCase; +import com.wavemaker.commons.WMTestCase; import com.wavemaker.studio.json.AlternateJSONTransformer; import com.wavemaker.studio.json.JSONMarshaller; import com.wavemaker.studio.json.JSONObject; diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java index faef6fb1c..7f7e6abf1 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java @@ -18,7 +18,7 @@ import java.util.Arrays; import java.util.List; -import com.wavemaker.infra.WMTestUtils; +import com.wavemaker.commons.util.WMTestUtils; import org.springframework.util.ClassUtils; diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java index 67aa3ec14..8b2d7358e 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java @@ -16,7 +16,7 @@ package com.wavemaker.runtime.ws; -import com.wavemaker.infra.WMTestUtils; +import com.wavemaker.commons.util.WMTestUtils; import com.wavemaker.runtime.feed.model.Feed; import com.wavemaker.runtime.feed.service.FeedService; import com.wavemaker.commons.classloader.ClassLoaderUtils; From 088504c5d246a3cbb46f5ea5749e64ca60952a7a Mon Sep 17 00:00:00 2001 From: Abhilash Sandi Date: Tue, 31 Jan 2017 18:34:54 +0530 Subject: [PATCH 017/334] Fix for WMS-10201: Reset is not working properly in Liveform(Data table with form as Dialog template) Change-Id: I5b9abbfb28ba88045daa2e086655091a49662e79 --- .../modules/widgets/live/form/liveform.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/live/form/liveform.js b/src/main/webapp/scripts/modules/widgets/live/form/liveform.js index 6e3816e97..8d56aa54c 100644 --- a/src/main/webapp/scripts/modules/widgets/live/form/liveform.js +++ b/src/main/webapp/scripts/modules/widgets/live/form/liveform.js @@ -109,14 +109,6 @@ WM.module('wm.widgets.live') formController, onResult, onVariableUpdate; - function resetFormState() { - if (!$scope.ngform) { - return; - } - //Reset the form to original state on cancel/ save - $scope.ngform.$setUntouched(); - $scope.ngform.$setPristine(); - } //Function to get the form element function getFormElement() { if ($scope.isLayoutDialog) { @@ -124,6 +116,17 @@ WM.module('wm.widgets.live') } return $scope.element; } + //Reset form state + function resetFormState() { + var $formEle = getFormElement(), + formScope = $scope.isLayoutDialog && $formEle.length ? $formEle.scope() : $scope; + if (!formScope.ngform) { + return; + } + //Reset the form to original state on cancel/ save + formScope.ngform.$setUntouched(); + formScope.ngform.$setPristine(); + } //Reset the values of widgets inside the form function resetFormFields(formEle) { formEle.find('[role="input"]').each(function () { From eda0859976e437622050b92336c7f05ed925a349 Mon Sep 17 00:00:00 2001 From: Sprushika mulakala Date: Tue, 31 Jan 2017 16:05:18 +0530 Subject: [PATCH 018/334] Fix for issue with badge alignment in left and right nav Change-Id: I462bb75343cf6fbef0c5edb99f27db38e8b051ef --- .../modules/layouts/styles/less/layouts.less | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less b/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less index ab205a09a..21f707a57 100644 --- a/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less +++ b/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less @@ -529,6 +529,14 @@ body { text-align: left; } } + .app-left-panel, .app-right-panel { + .nav li { + .badge { + right: 1em; + top: 1em; + } + } + } /*********************application right panel********************/ .app-right-panel { height: 100%; @@ -1399,11 +1407,6 @@ body { > .btn-caption, > .anchor-caption { display: block; } - .badge { - top: -10pt; - right: -10pt; - font-weight: normal; - } } /********for buttons, anchors with icon on right****/ .btn[icon-position = "right"], a[icon-position = "right"] { @@ -1411,8 +1414,9 @@ body { } /****Badge****/ .btn .badge, a .badge { - right: -10px; - top: -10px; + right: -1em; + top: -1em; + font-weight: normal; &.btn-link { top: 0; right: 0; From bfc392b075d297eb45a53dcfc6178260c07df184 Mon Sep 17 00:00:00 2001 From: sunilkumar Date: Tue, 31 Jan 2017 18:41:19 +0530 Subject: [PATCH 019/334] Renaming wavemaker studio json to runtime json. Change-Id: Iec65c55eaa6d0215e95781c597e636555fd34cfa --- .../runtime/service/ElementType.java | 20 +++++++++---------- .../service/definition/ServiceDefinition.java | 2 +- .../service/definition/ServiceOperation.java | 2 +- .../server/json/JsonPerformanceTest.java | 10 +++++----- .../runtime/service/ElementTypeTest.java | 10 +++++----- .../wavemaker/runtime/ws/FeedServiceTest.java | 2 +- .../json/AlternateJSONTransformer.java | 18 ++++++++--------- .../{studio => runtime}/json/JSON.java | 2 +- .../{studio => runtime}/json/JSONArray.java | 2 +- .../json/JSONMarshaller.java | 20 +++++++++---------- .../{studio => runtime}/json/JSONObject.java | 2 +- .../{studio => runtime}/json/JSONState.java | 6 +++--- .../json/JSONUnmarshaller.java | 6 +++--- .../json/PropertyFilter.java | 2 +- .../json/ValueTransformer.java | 6 +++--- .../json/core/JSONUtils.java | 2 +- .../{studio => runtime}/json/core/json.g | 0 .../{studio => runtime}/json/core/json.tokens | 0 .../json/core/jsonLexer.java | 2 +- .../json/core/jsonParser.java | 11 ++++------ .../{studio => runtime}/json/core/json__.g | 0 .../{studio => runtime}/json/json.tokens | 0 .../json/type/FieldDefinition.java | 2 +- .../json/type/GenericFieldDefinition.java | 2 +- .../json/type/ListTypeDefinition.java | 2 +- .../json/type/MapTypeDefinition.java | 2 +- .../json/type/ObjectTypeDefinition.java | 2 +- .../json/type/OperationEnumeration.java | 2 +- .../json/type/PrimitiveTypeDefinition.java | 4 ++-- .../json/type/TypeDefinition.java | 2 +- .../json/type/TypeState.java | 2 +- .../type/converters/ReadObjectConverter.java | 6 +++--- .../type/converters/WriteObjectConverter.java | 4 ++-- .../EnumPrimitiveReflectTypeDefinition.java | 4 ++-- .../reflect/ListReflectTypeDefinition.java | 4 ++-- .../reflect/MapReflectTypeDefinition.java | 6 +++--- .../reflect/ObjectReflectTypeDefinition.java | 6 +++--- .../PrimitiveReflectTypeDefinition.java | 6 +++--- .../type/reflect/ReflectTypeDefinition.java | 4 ++-- .../json/type/reflect/ReflectTypeState.java | 6 +++--- .../json/type/reflect/ReflectTypeUtils.java | 16 +++++++-------- .../type/reflect/WMPropertyUtilsBean.java | 2 +- .../converters/DateTypeDefinition.java | 12 +++++------ .../converters/FileTypeDefinition.java | 12 +++++------ 44 files changed, 115 insertions(+), 118 deletions(-) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/AlternateJSONTransformer.java (94%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSON.java (95%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSONArray.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSONMarshaller.java (96%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSONObject.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSONState.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/JSONUnmarshaller.java (93%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/PropertyFilter.java (98%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/ValueTransformer.java (96%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/JSONUtils.java (99%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/json.g (100%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/json.tokens (100%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/jsonLexer.java (99%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/jsonParser.java (98%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/core/json__.g (100%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/json.tokens (100%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/FieldDefinition.java (98%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/GenericFieldDefinition.java (98%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/ListTypeDefinition.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/MapTypeDefinition.java (96%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/ObjectTypeDefinition.java (96%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/OperationEnumeration.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/PrimitiveTypeDefinition.java (93%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/TypeDefinition.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/TypeState.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/converters/ReadObjectConverter.java (91%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/converters/WriteObjectConverter.java (93%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java (94%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/ListReflectTypeDefinition.java (96%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/MapReflectTypeDefinition.java (93%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/ObjectReflectTypeDefinition.java (87%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/PrimitiveReflectTypeDefinition.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/ReflectTypeDefinition.java (95%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/ReflectTypeState.java (93%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/ReflectTypeUtils.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/WMPropertyUtilsBean.java (97%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/converters/DateTypeDefinition.java (88%) rename wavemaker-app-runtime-json/src/main/java/com/wavemaker/{studio => runtime}/json/type/reflect/converters/FileTypeDefinition.java (84%) diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java index 3cb5cdc7a..5b2823094 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java @@ -25,16 +25,16 @@ import org.apache.commons.beanutils.PropertyUtils; import org.springframework.util.ClassUtils; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.GenericFieldDefinition; -import com.wavemaker.studio.json.type.ListTypeDefinition; -import com.wavemaker.studio.json.type.OperationEnumeration; -import com.wavemaker.studio.json.type.reflect.ListReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ObjectReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.PrimitiveReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ReflectTypeState; -import com.wavemaker.studio.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.GenericFieldDefinition; +import com.wavemaker.runtime.json.type.ListTypeDefinition; +import com.wavemaker.runtime.json.type.OperationEnumeration; +import com.wavemaker.runtime.json.type.reflect.ListReflectTypeDefinition; +import com.wavemaker.runtime.json.type.reflect.ObjectReflectTypeDefinition; +import com.wavemaker.runtime.json.type.reflect.PrimitiveReflectTypeDefinition; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeDefinition; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeState; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeUtils; /** * Used by ServiceDefinition representing the operation's input and output type. diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceDefinition.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceDefinition.java index 8cd017261..803a4b205 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceDefinition.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceDefinition.java @@ -18,7 +18,7 @@ import java.util.List; import com.wavemaker.runtime.service.ServiceType; -import com.wavemaker.studio.json.type.TypeDefinition; +import com.wavemaker.runtime.json.type.TypeDefinition; /** * Represents a service definition. diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceOperation.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceOperation.java index 7136f0b30..9a542df17 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceOperation.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/definition/ServiceOperation.java @@ -17,7 +17,7 @@ import java.util.List; -import com.wavemaker.studio.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.FieldDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java index 44fc6d245..b5dc21cf7 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/server/json/JsonPerformanceTest.java @@ -25,11 +25,11 @@ import org.slf4j.LoggerFactory; import com.wavemaker.commons.WMTestCase; -import com.wavemaker.studio.json.AlternateJSONTransformer; -import com.wavemaker.studio.json.JSONMarshaller; -import com.wavemaker.studio.json.JSONObject; -import com.wavemaker.studio.json.JSONState; -import com.wavemaker.studio.json.JSONUnmarshaller; +import com.wavemaker.runtime.json.AlternateJSONTransformer; +import com.wavemaker.runtime.json.JSONMarshaller; +import com.wavemaker.runtime.json.JSONObject; +import com.wavemaker.runtime.json.JSONState; +import com.wavemaker.runtime.json.JSONUnmarshaller; /** * Test JSON performance, make sure nothing is worse. diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java index 7f7e6abf1..461bd03f2 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/service/ElementTypeTest.java @@ -23,11 +23,11 @@ import com.wavemaker.commons.util.SpringUtils; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.ObjectTypeDefinition; -import com.wavemaker.studio.json.type.OperationEnumeration; -import com.wavemaker.studio.json.type.TypeDefinition; -import org.testng.Assert; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.ObjectTypeDefinition; +import com.wavemaker.runtime.json.type.OperationEnumeration; +import com.wavemaker.runtime.json.type.TypeDefinition; + import static org.testng.Assert.*; /** diff --git a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java index 8b2d7358e..8abdf889d 100644 --- a/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java +++ b/wavemaker-app-runtime-core/src/test/java/com/wavemaker/runtime/ws/FeedServiceTest.java @@ -20,7 +20,7 @@ import com.wavemaker.runtime.feed.model.Feed; import com.wavemaker.runtime.feed.service.FeedService; import com.wavemaker.commons.classloader.ClassLoaderUtils; -import com.wavemaker.studio.json.JSONMarshaller; +import com.wavemaker.runtime.json.JSONMarshaller; import org.testng.Assert; import static org.testng.Assert.*; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/AlternateJSONTransformer.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/AlternateJSONTransformer.java similarity index 94% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/AlternateJSONTransformer.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/AlternateJSONTransformer.java index 03179f0af..2025ba716 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/AlternateJSONTransformer.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/AlternateJSONTransformer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import java.lang.reflect.InvocationTargetException; import java.util.Map; @@ -28,14 +28,14 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; import com.wavemaker.commons.util.Tuple; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.ListTypeDefinition; -import com.wavemaker.studio.json.type.MapTypeDefinition; -import com.wavemaker.studio.json.type.ObjectTypeDefinition; -import com.wavemaker.studio.json.type.PrimitiveTypeDefinition; -import com.wavemaker.studio.json.type.TypeState; -import com.wavemaker.studio.json.type.converters.ReadObjectConverter; -import com.wavemaker.studio.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.ListTypeDefinition; +import com.wavemaker.runtime.json.type.ObjectTypeDefinition; +import com.wavemaker.runtime.json.type.TypeState; +import com.wavemaker.runtime.json.type.converters.ReadObjectConverter; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.MapTypeDefinition; +import com.wavemaker.runtime.json.type.PrimitiveTypeDefinition; /** * Alternate JSONObject -> Object transformers. diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSON.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSON.java similarity index 95% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSON.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSON.java index 3d70e5c73..cbf881fed 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSON.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSON.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONArray.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONArray.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONArray.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONArray.java index 13b7ce4f3..b79e5b9ad 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONArray.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONArray.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import java.io.IOException; import java.util.ArrayList; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONMarshaller.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONMarshaller.java similarity index 96% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONMarshaller.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONMarshaller.java index e80489316..00529f3e7 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONMarshaller.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONMarshaller.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import java.io.IOException; import java.io.StringWriter; @@ -37,15 +37,15 @@ import com.wavemaker.commons.WMRuntimeException; import com.wavemaker.commons.util.EntryComparator; import com.wavemaker.commons.util.Tuple; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.GenericFieldDefinition; -import com.wavemaker.studio.json.type.MapTypeDefinition; -import com.wavemaker.studio.json.type.ObjectTypeDefinition; -import com.wavemaker.studio.json.type.PrimitiveTypeDefinition; -import com.wavemaker.studio.json.type.TypeState; -import com.wavemaker.studio.json.type.converters.WriteObjectConverter; -import com.wavemaker.studio.json.type.reflect.ObjectReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.converters.WriteObjectConverter; +import com.wavemaker.runtime.json.type.reflect.ObjectReflectTypeDefinition; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.GenericFieldDefinition; +import com.wavemaker.runtime.json.type.MapTypeDefinition; +import com.wavemaker.runtime.json.type.ObjectTypeDefinition; +import com.wavemaker.runtime.json.type.PrimitiveTypeDefinition; +import com.wavemaker.runtime.json.type.TypeState; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONObject.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONObject.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONObject.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONObject.java index 21e9521a2..49553241f 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONObject.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONObject.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import java.io.IOException; import java.util.LinkedHashMap; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONState.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONState.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONState.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONState.java index 943819b3d..bed5ff377 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONState.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONState.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import java.util.ArrayList; import java.util.List; -import com.wavemaker.studio.json.type.TypeState; -import com.wavemaker.studio.json.type.reflect.ReflectTypeState; +import com.wavemaker.runtime.json.type.TypeState; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeState; /** * Contains both JSON serialization/de-serialization state and configuration. State is emphasized; objects of JSONState diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONUnmarshaller.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONUnmarshaller.java similarity index 93% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONUnmarshaller.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONUnmarshaller.java index 0d9db65a6..862fc3c4d 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/JSONUnmarshaller.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/JSONUnmarshaller.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import org.antlr.runtime.ANTLRStringStream; import org.antlr.runtime.CommonTokenStream; @@ -21,8 +21,8 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.core.jsonLexer; -import com.wavemaker.studio.json.core.jsonParser; +import com.wavemaker.runtime.json.core.jsonLexer; +import com.wavemaker.runtime.json.core.jsonParser; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/PropertyFilter.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/PropertyFilter.java similarity index 98% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/PropertyFilter.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/PropertyFilter.java index 6a6d9ffa7..c99d0b587 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/PropertyFilter.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/PropertyFilter.java @@ -29,7 +29,7 @@ * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; /** * Provides a method to filter out properties. diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/ValueTransformer.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/ValueTransformer.java similarity index 96% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/ValueTransformer.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/ValueTransformer.java index e27d1850c..6cfea342a 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/ValueTransformer.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/ValueTransformer.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json; +package com.wavemaker.runtime.json; import com.wavemaker.commons.util.Tuple; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.TypeState; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.TypeState; /** * Provides a mechanism for end-users to transform values before they are serialized or de-serialized. These transforms diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/JSONUtils.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/JSONUtils.java similarity index 99% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/JSONUtils.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/JSONUtils.java index 9bd302bc4..ecad7b379 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/JSONUtils.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/JSONUtils.java @@ -29,7 +29,7 @@ * limitations under the License. */ -package com.wavemaker.studio.json.core; +package com.wavemaker.runtime.json.core; import java.math.BigDecimal; import java.math.BigInteger; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json.g b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json.g similarity index 100% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json.g rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json.g diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json.tokens b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json.tokens similarity index 100% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json.tokens rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json.tokens diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonLexer.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java similarity index 99% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonLexer.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java index 0739896cc..a964b8933 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonLexer.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java @@ -15,7 +15,7 @@ */ // $ANTLR 3.1.1 src/com/wavemaker/studio/json/core/json.g 2011-08-19 11:24:08 -package com.wavemaker.studio.json.core; +package com.wavemaker.runtime.json.core; import java.util.ArrayList; import java.util.List; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonParser.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java similarity index 98% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonParser.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java index 066800524..7a3344aab 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/jsonParser.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java @@ -15,13 +15,10 @@ */ // $ANTLR 3.1.1 src/com/wavemaker/studio/json/core/json.g 2011-08-19 11:24:08 -package com.wavemaker.studio.json.core; +package com.wavemaker.runtime.json.core; import java.text.NumberFormat; import java.text.ParseException; -import java.util.ArrayList; -import java.util.List; -import java.util.Stack; import org.antlr.runtime.BitSet; import org.antlr.runtime.NoViableAltException; @@ -31,9 +28,9 @@ import org.antlr.runtime.Token; import org.antlr.runtime.TokenStream; -import com.wavemaker.studio.json.JSON; -import com.wavemaker.studio.json.JSONArray; -import com.wavemaker.studio.json.JSONObject; +import com.wavemaker.runtime.json.JSON; +import com.wavemaker.runtime.json.JSONObject; +import com.wavemaker.runtime.json.JSONArray; /** * JSON grammar. Language spec from . diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json__.g b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json__.g similarity index 100% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/core/json__.g rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/json__.g diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/json.tokens b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/json.tokens similarity index 100% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/json.tokens rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/json.tokens diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/FieldDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/FieldDefinition.java similarity index 98% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/FieldDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/FieldDefinition.java index 0c472a42b..36ab49721 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/FieldDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/FieldDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; import java.util.List; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/GenericFieldDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/GenericFieldDefinition.java similarity index 98% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/GenericFieldDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/GenericFieldDefinition.java index a69211368..0dc2740b4 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/GenericFieldDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/GenericFieldDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; import java.util.ArrayList; import java.util.List; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ListTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ListTypeDefinition.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ListTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ListTypeDefinition.java index bdadd9dbc..8b3c124da 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ListTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ListTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; /** * A TypeDefinition representing List (including Arrays and Collections) types. diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/MapTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/MapTypeDefinition.java similarity index 96% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/MapTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/MapTypeDefinition.java index 9bdb7bcfb..ce7003f50 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/MapTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/MapTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; /** * TypeDefinition representing Map types. These are a mapping from arbitrary keys to values, but the types of both the diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ObjectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ObjectTypeDefinition.java similarity index 96% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ObjectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ObjectTypeDefinition.java index 1cb7129a3..d3e95ce89 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/ObjectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/ObjectTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; import java.util.LinkedHashMap; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/OperationEnumeration.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/OperationEnumeration.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/OperationEnumeration.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/OperationEnumeration.java index 9033ad514..e81feb36d 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/OperationEnumeration.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/OperationEnumeration.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; /** * Enumeration of operation types (currently, just the LiveService operations). When changing this, be sure to change diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/PrimitiveTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/PrimitiveTypeDefinition.java similarity index 93% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/PrimitiveTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/PrimitiveTypeDefinition.java index a84bc4c19..67967b6bc 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/PrimitiveTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/PrimitiveTypeDefinition.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; import java.io.IOException; import java.io.Writer; -import com.wavemaker.studio.json.JSONMarshaller; +import com.wavemaker.runtime.json.JSONMarshaller; /** * A TypeDefinition representing primitive types, such as String, int, and enum classes. Any individual values are diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeDefinition.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeDefinition.java index 6407f93a5..0ea550395 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; /** * The TypeDefinition class holds type information about individual types in the system. Each instance also allows for diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeState.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeState.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeState.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeState.java index 0e2b9a5dd..cbf94ed9a 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/TypeState.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/TypeState.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type; +package com.wavemaker.runtime.json.type; /** * Holds the state of current types, and knows how to discover new types (associated with the individual type of this diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/ReadObjectConverter.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/ReadObjectConverter.java similarity index 91% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/ReadObjectConverter.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/ReadObjectConverter.java index ec308cfa1..5f7ec13e7 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/ReadObjectConverter.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/ReadObjectConverter.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.converters; +package com.wavemaker.runtime.json.type.converters; -import com.wavemaker.studio.json.JSON; -import com.wavemaker.studio.json.type.TypeDefinition; +import com.wavemaker.runtime.json.JSON; +import com.wavemaker.runtime.json.type.TypeDefinition; /** * Provides an interface for TypeDefinitions wishing to provide type conversions in the readObject (JSON String -> diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/WriteObjectConverter.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/WriteObjectConverter.java similarity index 93% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/WriteObjectConverter.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/WriteObjectConverter.java index 3c7fbb9b4..96a0a391a 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/converters/WriteObjectConverter.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/converters/WriteObjectConverter.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.converters; +package com.wavemaker.runtime.json.type.converters; import java.io.IOException; import java.io.Writer; -import com.wavemaker.studio.json.type.TypeDefinition; +import com.wavemaker.runtime.json.type.TypeDefinition; /** * Provides an interface for TypeDefinitions wishing to provide type conversions in the writeObject (Java -> JSON diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java similarity index 94% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java index 7fd53d8dd..4213fda5c 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/EnumPrimitiveReflectTypeDefinition.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.io.IOException; import java.io.Writer; -import com.wavemaker.studio.json.core.JSONUtils; +import com.wavemaker.runtime.json.core.JSONUtils; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ListReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ListReflectTypeDefinition.java similarity index 96% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ListReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ListReflectTypeDefinition.java index 861206311..5d173af73 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ListReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ListReflectTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.lang.reflect.Array; import java.util.ArrayList; @@ -26,7 +26,7 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.type.ListTypeDefinition; +import com.wavemaker.runtime.json.type.ListTypeDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/MapReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/MapReflectTypeDefinition.java similarity index 93% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/MapReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/MapReflectTypeDefinition.java index 5b0909ab4..35ce20b00 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/MapReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/MapReflectTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.util.HashMap; import java.util.SortedMap; @@ -21,8 +21,8 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.MapTypeDefinition; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.MapTypeDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ObjectReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ObjectReflectTypeDefinition.java similarity index 87% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ObjectReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ObjectReflectTypeDefinition.java index e0fb4c2d7..71f605843 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ObjectReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ObjectReflectTypeDefinition.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.util.LinkedHashMap; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.ObjectTypeDefinition; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.ObjectTypeDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/PrimitiveReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/PrimitiveReflectTypeDefinition.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/PrimitiveReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/PrimitiveReflectTypeDefinition.java index 73078b654..9c02e8bce 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/PrimitiveReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/PrimitiveReflectTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.io.IOException; import java.io.Writer; @@ -27,8 +27,8 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.core.JSONUtils; -import com.wavemaker.studio.json.type.PrimitiveTypeDefinition; +import com.wavemaker.runtime.json.core.JSONUtils; +import com.wavemaker.runtime.json.type.PrimitiveTypeDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeDefinition.java similarity index 95% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeDefinition.java index 4fc323e0f..7cfca7065 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeDefinition.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.type.TypeDefinition; +import com.wavemaker.runtime.json.type.TypeDefinition; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeState.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeState.java similarity index 93% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeState.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeState.java index 530dd9926..3ceeb8524 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeState.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeState.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.util.HashMap; import java.util.Map; @@ -22,8 +22,8 @@ import org.springframework.util.ClassUtils; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.type.TypeDefinition; -import com.wavemaker.studio.json.type.TypeState; +import com.wavemaker.runtime.json.type.TypeDefinition; +import com.wavemaker.runtime.json.type.TypeState; /** * @author Matt Small diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeUtils.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeUtils.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeUtils.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeUtils.java index 9a1d0077c..a64b45124 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/ReflectTypeUtils.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/ReflectTypeUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.beans.PropertyDescriptor; import java.lang.reflect.Array; @@ -36,13 +36,13 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; import com.wavemaker.commons.util.Tuple; -import com.wavemaker.studio.json.JSON; -import com.wavemaker.studio.json.core.JSONUtils; -import com.wavemaker.studio.json.type.FieldDefinition; -import com.wavemaker.studio.json.type.GenericFieldDefinition; -import com.wavemaker.studio.json.type.ListTypeDefinition; -import com.wavemaker.studio.json.type.TypeDefinition; -import com.wavemaker.studio.json.type.TypeState; +import com.wavemaker.runtime.json.type.ListTypeDefinition; +import com.wavemaker.runtime.json.JSON; +import com.wavemaker.runtime.json.core.JSONUtils; +import com.wavemaker.runtime.json.type.FieldDefinition; +import com.wavemaker.runtime.json.type.GenericFieldDefinition; +import com.wavemaker.runtime.json.type.TypeDefinition; +import com.wavemaker.runtime.json.type.TypeState; /** * Type utility methods. Includes methods for creating types & fields. diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/WMPropertyUtilsBean.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/WMPropertyUtilsBean.java similarity index 97% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/WMPropertyUtilsBean.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/WMPropertyUtilsBean.java index c59e99a55..80a65c805 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/WMPropertyUtilsBean.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/WMPropertyUtilsBean.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect; +package com.wavemaker.runtime.json.type.reflect; import java.beans.PropertyDescriptor; import java.lang.reflect.Field; diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/DateTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/DateTypeDefinition.java similarity index 88% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/DateTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/DateTypeDefinition.java index 196cdbddd..5a5033555 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/DateTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/DateTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect.converters; +package com.wavemaker.runtime.json.type.reflect.converters; import java.io.IOException; import java.io.Writer; @@ -23,11 +23,11 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.JSONMarshaller; -import com.wavemaker.studio.json.type.converters.ReadObjectConverter; -import com.wavemaker.studio.json.type.converters.WriteObjectConverter; -import com.wavemaker.studio.json.type.reflect.PrimitiveReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.converters.WriteObjectConverter; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.JSONMarshaller; +import com.wavemaker.runtime.json.type.converters.ReadObjectConverter; +import com.wavemaker.runtime.json.type.reflect.PrimitiveReflectTypeDefinition; /** * Date primitive type. This includes all known subclasses of {@link Date}, including {@link java.sql.Date}, diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/FileTypeDefinition.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/FileTypeDefinition.java similarity index 84% rename from wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/FileTypeDefinition.java rename to wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/FileTypeDefinition.java index 7dbafc12b..e5868e6e2 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/studio/json/type/reflect/converters/FileTypeDefinition.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/type/reflect/converters/FileTypeDefinition.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.json.type.reflect.converters; +package com.wavemaker.runtime.json.type.reflect.converters; import java.io.File; import java.io.IOException; @@ -21,11 +21,11 @@ import com.wavemaker.commons.MessageResource; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.json.JSONMarshaller; -import com.wavemaker.studio.json.type.converters.ReadObjectConverter; -import com.wavemaker.studio.json.type.converters.WriteObjectConverter; -import com.wavemaker.studio.json.type.reflect.PrimitiveReflectTypeDefinition; -import com.wavemaker.studio.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.type.converters.WriteObjectConverter; +import com.wavemaker.runtime.json.type.reflect.ReflectTypeUtils; +import com.wavemaker.runtime.json.JSONMarshaller; +import com.wavemaker.runtime.json.type.converters.ReadObjectConverter; +import com.wavemaker.runtime.json.type.reflect.PrimitiveReflectTypeDefinition; /** * TypeDefinition for {@link File} objects. This includes type conversion, and will serialize File objects to and from From 0b6aefc21efd8b0e833ad36ff417cf7fbb606c01 Mon Sep 17 00:00:00 2001 From: sunilkumar Date: Tue, 31 Jan 2017 18:45:49 +0530 Subject: [PATCH 020/334] Renaming studio json to runtime json. Change-Id: Id43a44c69fd15a5940586297bf65872602915354 --- .../service/ServiceDefinitionService.java | 4 ++-- .../prefab/config/PrefabServletConfig.java | 6 +++-- .../prefab/config/PrefabsConfig.java | 4 ++-- .../context/PrefabWebApplicationContext.java | 4 ++-- .../prefab/core/Prefab.java | 2 +- .../prefab/core/PrefabFactory.java | 2 +- .../prefab/core/PrefabInstaller.java | 2 +- .../prefab/core/PrefabLoader.java | 2 +- .../prefab/core/PrefabManager.java | 2 +- .../prefab/core/PrefabRegistry.java | 2 +- .../prefab/event/PrefabEvent.java | 8 ++++--- .../prefab/event/PrefabsLoadedEvent.java | 8 ++++--- .../prefab/event/PrefabsUnloadedEvent.java | 8 ++++--- .../prefab/impl/PrefabFactoryImpl.java | 10 ++++----- .../prefab/impl/PrefabInstallerImpl.java | 18 +++++++-------- .../prefab/impl/PrefabLoaderImpl.java | 22 +++++++++---------- .../prefab/impl/PrefabManagerImpl.java | 8 +++---- .../prefab/impl/PrefabRegistryImpl.java | 6 ++--- .../prefab/util/PrefabConstants.java | 2 +- .../prefab/util/PrefabUtils.java | 4 ++-- .../prefab/util/Utils.java | 2 +- .../web/PrefabAwareHttpRequestWrapper.java | 2 +- .../prefab/web/PrefabControllerServlet.java | 6 ++--- .../prefab/util/UtilsTest.java | 6 ++--- 24 files changed, 74 insertions(+), 66 deletions(-) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/config/PrefabServletConfig.java (82%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/config/PrefabsConfig.java (96%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/context/PrefabWebApplicationContext.java (94%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/Prefab.java (98%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/PrefabFactory.java (96%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/PrefabInstaller.java (96%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/PrefabLoader.java (96%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/PrefabManager.java (97%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/core/PrefabRegistry.java (97%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/event/PrefabEvent.java (75%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/event/PrefabsLoadedEvent.java (75%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/event/PrefabsUnloadedEvent.java (75%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/impl/PrefabFactoryImpl.java (86%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/impl/PrefabInstallerImpl.java (90%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/impl/PrefabLoaderImpl.java (87%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/impl/PrefabManagerImpl.java (91%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/impl/PrefabRegistryImpl.java (92%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/util/PrefabConstants.java (96%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/util/PrefabUtils.java (97%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/util/Utils.java (98%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/web/PrefabAwareHttpRequestWrapper.java (97%) rename wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/{studio => runtime}/prefab/web/PrefabControllerServlet.java (98%) rename wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/{studio => runtime}/prefab/util/UtilsTest.java (96%) diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/servicedef/service/ServiceDefinitionService.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/servicedef/service/ServiceDefinitionService.java index a67a7ed85..6b4e4879a 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/servicedef/service/ServiceDefinitionService.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/servicedef/service/ServiceDefinitionService.java @@ -30,8 +30,8 @@ import com.wavemaker.runtime.servicedef.helper.ServiceDefinitionHelper; import com.wavemaker.commons.WMRuntimeException; import com.wavemaker.commons.servicedef.model.ServiceDefinition; -import com.wavemaker.studio.prefab.core.Prefab; -import com.wavemaker.studio.prefab.core.PrefabManager; +import com.wavemaker.runtime.prefab.core.Prefab; +import com.wavemaker.runtime.prefab.core.PrefabManager; /** * @author Sunil Kumar diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabServletConfig.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabServletConfig.java similarity index 82% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabServletConfig.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabServletConfig.java index 2d9c8b3e8..9e8be369f 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabServletConfig.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabServletConfig.java @@ -13,13 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.config; +package com.wavemaker.runtime.prefab.config; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import com.wavemaker.runtime.prefab.web.PrefabControllerServlet; + /** - * Required bean configurations for {@link com.wavemaker.studio.prefab.web.PrefabControllerServlet}. This can be possibly + * Required bean configurations for {@link PrefabControllerServlet}. This can be possibly * replaced by applicationContext.xml or overridden in the parent application. * * @author Dilip Kumar diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabsConfig.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabsConfig.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabsConfig.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabsConfig.java index 0b6ec5a6b..a5bc6b21b 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/config/PrefabsConfig.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/config/PrefabsConfig.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.config; +package com.wavemaker.runtime.prefab.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,7 +22,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import com.wavemaker.studio.prefab.util.PrefabConstants; +import com.wavemaker.runtime.prefab.util.PrefabConstants; /** * @author Dilip Kumar diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/context/PrefabWebApplicationContext.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/context/PrefabWebApplicationContext.java similarity index 94% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/context/PrefabWebApplicationContext.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/context/PrefabWebApplicationContext.java index 7ed014d7a..32b47ed13 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/context/PrefabWebApplicationContext.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/context/PrefabWebApplicationContext.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.context; +package com.wavemaker.runtime.prefab.context; import javax.servlet.ServletContext; import org.springframework.context.ApplicationContext; import org.springframework.web.context.support.XmlWebApplicationContext; -import com.wavemaker.studio.prefab.core.Prefab; +import com.wavemaker.runtime.prefab.core.Prefab; /** * @author Dilip Kumar diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/Prefab.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/Prefab.java similarity index 98% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/Prefab.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/Prefab.java index a450c5aca..0e498b290 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/Prefab.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/Prefab.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabFactory.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabFactory.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabFactory.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabFactory.java index 5cbc94d75..87ef1de95 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabFactory.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import java.io.File; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabInstaller.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabInstaller.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabInstaller.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabInstaller.java index 933ee1125..79917d974 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabInstaller.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabInstaller.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import org.springframework.web.context.WebApplicationContext; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabLoader.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabLoader.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabLoader.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabLoader.java index 70ecf8ab5..ee50f7f0c 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabLoader.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabLoader.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import java.io.File; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabManager.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabManager.java similarity index 97% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabManager.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabManager.java index 61779da7c..faf0a199b 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabManager.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabManager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import java.util.Collection; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabRegistry.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabRegistry.java similarity index 97% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabRegistry.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabRegistry.java index dbc9f2573..c6d2c1853 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/core/PrefabRegistry.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/core/PrefabRegistry.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.core; +package com.wavemaker.runtime.prefab.core; import java.util.Set; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabEvent.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabEvent.java similarity index 75% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabEvent.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabEvent.java index d83feb0dc..cd98ce8b7 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabEvent.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabEvent.java @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.event; +package com.wavemaker.runtime.prefab.event; import org.springframework.context.ApplicationEvent; +import com.wavemaker.runtime.prefab.core.Prefab; + /** - * A {@link com.wavemaker.studio.prefab.event.PrefabEvent} abstracts an event raised during {@link com.wavemaker.studio.prefab.core.Prefab}'s lifecycle. + * A {@link PrefabEvent} abstracts an event raised during {@link Prefab}'s lifecycle. * * @author Frankline Francis */ @@ -26,7 +28,7 @@ public abstract class PrefabEvent extends ApplicationEvent { /** - * Creates a new {@link com.wavemaker.studio.prefab.event.PrefabEvent} with the specified source. + * Creates a new {@link PrefabEvent} with the specified source. * * @param source event source */ diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsLoadedEvent.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsLoadedEvent.java similarity index 75% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsLoadedEvent.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsLoadedEvent.java index 2636b8228..5fc71debd 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsLoadedEvent.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsLoadedEvent.java @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.event; +package com.wavemaker.runtime.prefab.event; import org.springframework.context.ApplicationContext; +import com.wavemaker.runtime.prefab.core.Prefab; + /** - * {@link com.wavemaker.studio.prefab.event.PrefabsLoadedEvent} is raised when all {@link com.wavemaker.studio.prefab.core.Prefab}s have been + * {@link PrefabsLoadedEvent} is raised when all {@link Prefab}s have been * loaded from a source location. * * @author Frankline Francis @@ -27,7 +29,7 @@ public class PrefabsLoadedEvent extends PrefabEvent { /** - * Creates a new {@link com.wavemaker.studio.prefab.event.PrefabsLoadedEvent} with the parent {@link ApplicationContext}. + * Creates a new {@link PrefabsLoadedEvent} with the parent {@link ApplicationContext}. * * @param source parent context */ diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsUnloadedEvent.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsUnloadedEvent.java similarity index 75% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsUnloadedEvent.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsUnloadedEvent.java index df686568a..b4ba5b1c5 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/event/PrefabsUnloadedEvent.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/event/PrefabsUnloadedEvent.java @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.event; +package com.wavemaker.runtime.prefab.event; import org.springframework.context.ApplicationContext; +import com.wavemaker.runtime.prefab.core.Prefab; + /** - * {@link com.wavemaker.studio.prefab.event.PrefabsUnloadedEvent} is raised when all {@link com.wavemaker.studio.prefab.core.Prefab}s have been + * {@link PrefabsUnloadedEvent} is raised when all {@link Prefab}s have been * unloaded. * * @author Frankline Francis @@ -27,7 +29,7 @@ public class PrefabsUnloadedEvent extends PrefabEvent { /** - * Creates a new {@link com.wavemaker.studio.prefab.event.PrefabsUnloadedEvent} with the parent {@link ApplicationContext}. + * Creates a new {@link PrefabsUnloadedEvent} with the parent {@link ApplicationContext}. * * @param source parent context */ diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabFactoryImpl.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabFactoryImpl.java similarity index 86% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabFactoryImpl.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabFactoryImpl.java index a1501b132..17a414cd7 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabFactoryImpl.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabFactoryImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.impl; +package com.wavemaker.runtime.prefab.impl; import java.io.File; import java.net.URL; @@ -22,10 +22,10 @@ import org.springframework.stereotype.Service; import com.wavemaker.commons.classloader.WMUrlClassLoader; -import com.wavemaker.studio.prefab.core.Prefab; -import com.wavemaker.studio.prefab.core.PrefabFactory; -import com.wavemaker.studio.prefab.util.PrefabUtils; -import com.wavemaker.studio.prefab.util.Utils; +import com.wavemaker.runtime.prefab.core.Prefab; +import com.wavemaker.runtime.prefab.core.PrefabFactory; +import com.wavemaker.runtime.prefab.util.PrefabUtils; +import com.wavemaker.runtime.prefab.util.Utils; /** * {@link PrefabFactory} for creating {@link Prefab}s. diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabInstallerImpl.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabInstallerImpl.java similarity index 90% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabInstallerImpl.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabInstallerImpl.java index 7f6b4a667..293909042 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabInstallerImpl.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabInstallerImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.impl; +package com.wavemaker.runtime.prefab.impl; import javax.servlet.ServletContext; @@ -30,14 +30,14 @@ import com.wavemaker.commons.classloader.WMUrlClassLoader; import com.wavemaker.commons.util.IOUtils; -import com.wavemaker.studio.prefab.context.PrefabWebApplicationContext; -import com.wavemaker.studio.prefab.core.Prefab; -import com.wavemaker.studio.prefab.core.PrefabInstaller; -import com.wavemaker.studio.prefab.core.PrefabManager; -import com.wavemaker.studio.prefab.core.PrefabRegistry; -import com.wavemaker.studio.prefab.event.PrefabEvent; -import com.wavemaker.studio.prefab.event.PrefabsLoadedEvent; -import com.wavemaker.studio.prefab.event.PrefabsUnloadedEvent; +import com.wavemaker.runtime.prefab.core.PrefabInstaller; +import com.wavemaker.runtime.prefab.core.PrefabRegistry; +import com.wavemaker.runtime.prefab.event.PrefabEvent; +import com.wavemaker.runtime.prefab.context.PrefabWebApplicationContext; +import com.wavemaker.runtime.prefab.core.Prefab; +import com.wavemaker.runtime.prefab.core.PrefabManager; +import com.wavemaker.runtime.prefab.event.PrefabsLoadedEvent; +import com.wavemaker.runtime.prefab.event.PrefabsUnloadedEvent; /** * Default implementation of {@link PrefabInstaller}. Hooks to the {@link ApplicationContext} of diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabLoaderImpl.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabLoaderImpl.java similarity index 87% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabLoaderImpl.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabLoaderImpl.java index 70f4a4099..4051a2002 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabLoaderImpl.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabLoaderImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.impl; +package com.wavemaker.runtime.prefab.impl; import java.io.File; import java.io.IOException; @@ -29,16 +29,16 @@ import org.springframework.context.event.ContextStoppedEvent; import org.springframework.stereotype.Service; -import com.wavemaker.studio.prefab.config.PrefabsConfig; -import com.wavemaker.studio.prefab.core.PrefabFactory; -import com.wavemaker.studio.prefab.core.PrefabLoader; -import com.wavemaker.studio.prefab.core.PrefabManager; -import com.wavemaker.studio.prefab.event.PrefabEvent; -import com.wavemaker.studio.prefab.event.PrefabsLoadedEvent; -import com.wavemaker.studio.prefab.event.PrefabsUnloadedEvent; -import com.wavemaker.studio.prefab.util.PrefabConstants; -import com.wavemaker.studio.prefab.util.PrefabUtils; -import com.wavemaker.studio.prefab.util.Utils; +import com.wavemaker.runtime.prefab.core.PrefabLoader; +import com.wavemaker.runtime.prefab.core.PrefabManager; +import com.wavemaker.runtime.prefab.event.PrefabEvent; +import com.wavemaker.runtime.prefab.event.PrefabsUnloadedEvent; +import com.wavemaker.runtime.prefab.config.PrefabsConfig; +import com.wavemaker.runtime.prefab.core.PrefabFactory; +import com.wavemaker.runtime.prefab.event.PrefabsLoadedEvent; +import com.wavemaker.runtime.prefab.util.PrefabConstants; +import com.wavemaker.runtime.prefab.util.PrefabUtils; +import com.wavemaker.runtime.prefab.util.Utils; /** * Default implementation for {@link PrefabLoader}. All available prefabs are diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabManagerImpl.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabManagerImpl.java similarity index 91% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabManagerImpl.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabManagerImpl.java index 5e199cea9..6b621de66 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabManagerImpl.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabManagerImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.impl; +package com.wavemaker.runtime.prefab.impl; import java.util.Collection; import java.util.Map; @@ -23,9 +23,9 @@ import org.apache.commons.lang3.Validate; import org.springframework.stereotype.Service; -import com.wavemaker.studio.prefab.core.Prefab; -import com.wavemaker.studio.prefab.core.PrefabManager; -import com.wavemaker.studio.prefab.util.Utils; +import com.wavemaker.runtime.prefab.core.Prefab; +import com.wavemaker.runtime.prefab.core.PrefabManager; +import com.wavemaker.runtime.prefab.util.Utils; /** * Default implementation for {@link PrefabManager}. diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabRegistryImpl.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabRegistryImpl.java similarity index 92% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabRegistryImpl.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabRegistryImpl.java index 35dfdb412..c6b0ae3dc 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/impl/PrefabRegistryImpl.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/impl/PrefabRegistryImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.impl; +package com.wavemaker.runtime.prefab.impl; import java.util.Collections; import java.util.Map; @@ -22,8 +22,8 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.stereotype.Service; -import com.wavemaker.studio.prefab.core.PrefabRegistry; -import com.wavemaker.studio.prefab.util.Utils; +import com.wavemaker.runtime.prefab.core.PrefabRegistry; +import com.wavemaker.runtime.prefab.util.Utils; /** * Default implementation of {@link PrefabRegistry}. diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabConstants.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabConstants.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabConstants.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabConstants.java index d6246cd65..501dc076a 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabConstants.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabConstants.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.util; +package com.wavemaker.runtime.prefab.util; import java.io.File; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabUtils.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabUtils.java similarity index 97% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabUtils.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabUtils.java index 9bd0195a0..28a5bbf92 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/PrefabUtils.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/PrefabUtils.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.util; +package com.wavemaker.runtime.prefab.util; -import com.wavemaker.studio.prefab.config.PrefabsConfig; +import com.wavemaker.runtime.prefab.config.PrefabsConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/Utils.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/Utils.java similarity index 98% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/Utils.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/Utils.java index 288129c5a..d9aa3b6be 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/util/Utils.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/util/Utils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.util; +package com.wavemaker.runtime.prefab.util; import java.io.File; import java.io.FileFilter; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabAwareHttpRequestWrapper.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabAwareHttpRequestWrapper.java similarity index 97% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabAwareHttpRequestWrapper.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabAwareHttpRequestWrapper.java index 6df2764fd..4db2ce24e 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabAwareHttpRequestWrapper.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabAwareHttpRequestWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.web; +package com.wavemaker.runtime.prefab.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabControllerServlet.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java similarity index 98% rename from wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabControllerServlet.java rename to wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java index 2abe7c7a9..a68a7ba1c 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/studio/prefab/web/PrefabControllerServlet.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.web; +package com.wavemaker.runtime.prefab.web; import java.util.Map; @@ -33,8 +33,8 @@ import org.springframework.web.util.WebUtils; import com.wavemaker.commons.WMRuntimeException; -import com.wavemaker.studio.prefab.core.PrefabRegistry; -import com.wavemaker.studio.prefab.util.PrefabConstants; +import com.wavemaker.runtime.prefab.core.PrefabRegistry; +import com.wavemaker.runtime.prefab.util.PrefabConstants; /** * Front controller to handle service requests directed at Spring prefabs. This servlet diff --git a/wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/studio/prefab/util/UtilsTest.java b/wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/runtime/prefab/util/UtilsTest.java similarity index 96% rename from wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/studio/prefab/util/UtilsTest.java rename to wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/runtime/prefab/util/UtilsTest.java index 6d77fac84..360f3766f 100644 --- a/wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/studio/prefab/util/UtilsTest.java +++ b/wavemaker-app-runtime-prefab/src/test/java/com/wavemaker/runtime/prefab/util/UtilsTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.wavemaker.studio.prefab.util; +package com.wavemaker.runtime.prefab.util; import java.io.File; import java.net.URL; @@ -26,8 +26,8 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.wavemaker.studio.prefab.config.PrefabServletConfig; -import com.wavemaker.studio.prefab.config.PrefabsConfig; +import com.wavemaker.runtime.prefab.config.PrefabServletConfig; +import com.wavemaker.runtime.prefab.config.PrefabsConfig; import junit.framework.Assert; /** From ffcb3dc7f55551f0fd9ec42515297da9309bd8ef Mon Sep 17 00:00:00 2001 From: Kavya Date: Tue, 31 Jan 2017 19:12:12 +0530 Subject: [PATCH 021/334] Database: Fix for issue WMS-10206 Give support for CurrentDateTime in QueryTab Change-Id: Ic54393aed8eaa4a75bd0f8ecf7d08250f2ae321b --- src/main/webapp/scripts/modules/plugins/database/config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/webapp/scripts/modules/plugins/database/config.js b/src/main/webapp/scripts/modules/plugins/database/config.js index c3f6d40ec..be6640f91 100644 --- a/src/main/webapp/scripts/modules/plugins/database/config.js +++ b/src/main/webapp/scripts/modules/plugins/database/config.js @@ -655,6 +655,11 @@ wm.plugins.database.constant('DB_CONSTANTS', { "label": "CURRENT_TIME", "value": "TIME" }, + "CURRENT_DATE_TIME": { + "property": "Current DateTime", + "label": "CURRENT_DATE_TIME", + "value": "DATETIME" + }, "CURRENT_USER_ID": { "property": "LoggedIn UserId", "label": "CURRENT_USER_ID", From e860548adc954cf1e293c810600406829f36795b Mon Sep 17 00:00:00 2001 From: Venugopal Jidigam Date: Tue, 31 Jan 2017 19:14:49 +0530 Subject: [PATCH 022/334] removing dependency on stax & xml-apis as they are being shipped with jdk itself. Change-Id: Ic4dab09339a3913cd927d1db055270c6985acdc2 --- pom.xml | 12 ++++++++++++ wavemaker-app-runtime-core/pom.xml | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/pom.xml b/pom.xml index d455280b8..8daeb789b 100644 --- a/pom.xml +++ b/pom.xml @@ -477,6 +477,12 @@ org.apache.poi poi-ooxml ${poi.ooxml.version} + + + stax + stax-api + + com.fasterxml.jackson.core @@ -760,6 +766,12 @@ org.springframework.security.extensions spring-security-saml2-core 1.0.2.RELEASE + + + xml-apis + xml-apis + + diff --git a/wavemaker-app-runtime-core/pom.xml b/wavemaker-app-runtime-core/pom.xml index 102884d68..9feb39d96 100644 --- a/wavemaker-app-runtime-core/pom.xml +++ b/wavemaker-app-runtime-core/pom.xml @@ -265,11 +265,23 @@ xerces xercesImpl 2.10.0 + + + xml-apis + xml-apis + + org.owasp antisamy ${antisamy.version} + + + xml-apis + xml-apis + + @@ -338,6 +350,10 @@ xerces xercesImpl + + xml-apis + xml-apis + From 41bc095d8091cd7f06657ad1998b4b89d2b8fe18 Mon Sep 17 00:00:00 2001 From: sunilkumar Date: Tue, 31 Jan 2017 19:58:03 +0530 Subject: [PATCH 023/334] Renaming group ids of wavemaker modules. Change-Id: Ic6213ed411f50a0e28a7e9b69ae0afb6b7f79178 --- pom.xml | 2 +- wavemaker-app-runtime-core/pom.xml | 4 ++-- wavemaker-app-runtime-json/pom.xml | 6 +++--- wavemaker-app-runtime-prefab/pom.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 8daeb789b..af0b3165f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 - com.wavemaker.studio + com.wavemaker.runtime wavemaker-app-runtime 8.3.4 diff --git a/wavemaker-app-runtime-core/pom.xml b/wavemaker-app-runtime-core/pom.xml index 9feb39d96..2a3d0632c 100644 --- a/wavemaker-app-runtime-core/pom.xml +++ b/wavemaker-app-runtime-core/pom.xml @@ -6,7 +6,7 @@ 4.0.0 - com.wavemaker.studio + com.wavemaker.runtime wavemaker-app-runtime 8.3.4 @@ -313,7 +313,7 @@ - ${project.groupId} + com.wavemaker.commons wavemaker-commons-util ${project.version} test-jar diff --git a/wavemaker-app-runtime-json/pom.xml b/wavemaker-app-runtime-json/pom.xml index 818b843ff..7362f39b0 100644 --- a/wavemaker-app-runtime-json/pom.xml +++ b/wavemaker-app-runtime-json/pom.xml @@ -6,7 +6,7 @@ 4.0.0 - com.wavemaker.studio + com.wavemaker.runtime wavemaker-app-runtime 8.3.4 @@ -20,7 +20,7 @@ - ${project.groupId} + com.wavemaker.commons wavemaker-commons-util ${project.version} @@ -34,7 +34,7 @@ - ${project.groupId} + com.wavemaker.commons wavemaker-commons-util ${project.version} test-jar diff --git a/wavemaker-app-runtime-prefab/pom.xml b/wavemaker-app-runtime-prefab/pom.xml index f38fa903a..053d56f3b 100644 --- a/wavemaker-app-runtime-prefab/pom.xml +++ b/wavemaker-app-runtime-prefab/pom.xml @@ -6,7 +6,7 @@ 4.0.0 - com.wavemaker.studio + com.wavemaker.runtime wavemaker-app-runtime 8.3.4 @@ -19,7 +19,7 @@ - ${project.groupId} + com.wavemaker.commons wavemaker-commons-util ${project.version} From 45e628882028a6fea51692262beb7c4acb0050e7 Mon Sep 17 00:00:00 2001 From: Bandhavya Date: Wed, 1 Feb 2017 11:41:54 +0530 Subject: [PATCH 024/334] Fix for WMS-10196, Extracting unique values from the search widget dataset. Change-Id: Ic9d96d29c0587cb2fd7ae66dea6a931a591cc6ba --- .../scripts/modules/widgets/basic/search/search.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/basic/search/search.js b/src/main/webapp/scripts/modules/widgets/basic/search/search.js index 41b97132b..331cabeeb 100644 --- a/src/main/webapp/scripts/modules/widgets/basic/search/search.js +++ b/src/main/webapp/scripts/modules/widgets/basic/search/search.js @@ -454,6 +454,14 @@ WM.module('wm.widgets.basic') return position > menuHeight && $win.height() - position < buttonHeight + menuHeight; } + // This function returns the unique fields based on dataField + function getUniqObjsByDataField(data, dataField) { + if (dataField !== 'All Fields') { + return _.uniqBy(data, dataField); + } + return _.uniqWith(data, _.isEqual); + } + function setLoadingItemsFlag($is, flag) { $rs.$safeApply($is, function () { $is._loadingItems = flag; @@ -614,14 +622,15 @@ WM.module('wm.widgets.basic') triggerSearch($is, typeAheadInput, true); } }); - return data; + + return getUniqObjsByDataField(data, $is.datafield); }); } // if variable update is not required then filter the local array and return the results localSearchedData = customFilter($is.itemList, $is.searchkey, searchValue, $is.casesensitive); setLoadingItemsFlag($is, false); - return localSearchedData; + return getUniqObjsByDataField(localSearchedData, $is.datafield); } From 6b9a67e89eadd0c79132973770621174797b887e Mon Sep 17 00:00:00 2001 From: sunilkumar Date: Wed, 1 Feb 2017 13:18:02 +0530 Subject: [PATCH 025/334] Renaming prefab,json and runtime package names. Change-Id: I807b5f2aedf953583b44ed4f9f0a484c79077ea2 --- .../main/java/com/wavemaker/runtime/service/ElementType.java | 2 +- .../wavemaker/runtime/prefab/web/PrefabControllerServlet.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java index 5b2823094..6900b6c69 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/service/ElementType.java @@ -282,7 +282,7 @@ public void setExclude(List exclude) { /** * Transforms this ElementType into a FieldDefinition, to make the transition easier. This uses the default - * reflection-based TypeDefinition classes ({@link com.wavemaker.studio.json.type.reflect}). + * reflection-based TypeDefinition classes ({@link com.wavemaker.runtime.json.type.reflect}). * * @return */ diff --git a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java index a68a7ba1c..32ccd06c7 100644 --- a/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java +++ b/wavemaker-app-runtime-prefab/src/main/java/com/wavemaker/runtime/prefab/web/PrefabControllerServlet.java @@ -50,7 +50,7 @@ *
* <servlet-name>prefabs</servlet-name> *
- * <servlet-class>com.wavemaker.studio.prefab.web.PrefabControllerServlet</servlet-class> + * <servlet-class>com.wavemaker.runtime.prefab.web.PrefabControllerServlet</servlet-class> *
* <init-param> *
@@ -64,7 +64,7 @@ *
* <param-name>contextConfigLocation</param-name> *
- * <param-value>com.wavemaker.studio.prefab.PrefabServletConfig</param-value> + * <param-value>com.wavemaker.runtime.prefab.PrefabServletConfig</param-value> *
* </init-param> *
From 0333dd899364505971072980676b0a835b039f05 Mon Sep 17 00:00:00 2001 From: Srinivasa Rao Boyina Date: Wed, 1 Feb 2017 13:48:24 +0530 Subject: [PATCH 026/334] WMS-10186:Mobile - Select query is not working in offline mode Change-Id: Iccef0641237d9489ec43a5fbe486e52b9318c73d --- .../database/services/localDBManager.js | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/scripts/modules/mobile/plugins/database/services/localDBManager.js b/src/main/webapp/scripts/modules/mobile/plugins/database/services/localDBManager.js index eab631068..5d1e42f4a 100644 --- a/src/main/webapp/scripts/modules/mobile/plugins/database/services/localDBManager.js +++ b/src/main/webapp/scripts/modules/mobile/plugins/database/services/localDBManager.js @@ -122,18 +122,25 @@ wm.plugins.database.services.LocalDBManager = [ //Loads necessary details of queries function compactQueries(queriesByDB) { - var queries = {}; + var queries = {}, + propertiesToTransform; _.forEach(queriesByDB.queries, function (queryData) { var query, params; if (queryData.nativeSql && !queryData.update) { - query = queryData.query; + query = queryData.queryString; params = _.map(query.match(/:[a-zA-Z0-9]+\s?/g), function (p) { return _.trim(p.substring(1)); }); + if (queryData.response) { + propertiesToTransform = _.filter(queryData.response.properties, function (item) { + return item.fieldName !== item.name; + }); + } queries[queryData.name] = { name: queryData.name, query: query.replace(/:[a-zA-Z0-9]+\s?/g, '? '), - params: params + params: params, + propertiesToTransform: propertiesToTransform }; } }); @@ -518,7 +525,17 @@ wm.plugins.database.services.LocalDBManager = [ return params[p]; }); } - return this.executeSQLQuery(dbName, queryData.query, params); + return this.executeSQLQuery(dbName, queryData.query, params).then(function (result) { + if (result.rows && result.rows.length > 0 + && queryData.propertiesToTransform && queryData.propertiesToTransform.length > 0) { + _.forEach(result.rows, function (row) { + _.forEach(queryData.propertiesToTransform, function (p) { + row[p.fieldName] = row[p.name]; + }); + }); + } + return result; + }); } } defer = $q.defer(); From 5e57e06139dfcc947b4ee3257494c79361de89c2 Mon Sep 17 00:00:00 2001 From: Venugopal Jidigam Date: Wed, 1 Feb 2017 14:08:33 +0530 Subject: [PATCH 027/334] removing dependency on stax, xml-apis, xmlParserAPi, jboss-transaction-api, xmlbeans as they are being shipped with jdk itself. Change-Id: I6502d398a1a4b79b04db180552fc20c4be3ecfdc --- pom.xml | 185 ++++++++++++++++++++++++++--- wavemaker-app-runtime-core/pom.xml | 127 ++------------------ wavemaker-app-runtime-json/pom.xml | 9 -- 3 files changed, 176 insertions(+), 145 deletions(-) diff --git a/pom.xml b/pom.xml index af0b3165f..06e68dd55 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,9 @@ 3.15 3.15 2.2.3 + 1.4 + 6.2.2 + 2.10.0 @@ -424,8 +427,13 @@ org.hibernate hibernate-entitymanager ${hibernate.version} + + + org.jboss.spec.javax.transaction + jboss-transaction-api_1.2_spec + +
- com.mchange c3p0 @@ -463,10 +471,25 @@ ${commons.lang3.version} + + xerces + xercesImpl + ${xerces.version} + net.sf.jmimemagic jmimemagic ${mimemagic.version} + + + + xerces + xercesImpl + + org.apache.poi @@ -479,8 +502,12 @@ ${poi.ooxml.version} - stax - stax-api + org.apache.xmlbeans + xmlbeans + + + com.github.virtuald + curvesapi @@ -571,12 +598,6 @@ com.sun.xml.ws jaxws-rt 2.1.7 - - - stax - stax-api - - com.sun.xml.ws @@ -605,6 +626,24 @@ 1.1.1 provided + + xml-apis + xml-apis + 1.4.01 + provided + + + xml-apis + xmlParserAPIs + 2.0.2 + provided + + + stax + stax-api + 1.0.1 + provided + javax.xml.stream stax-api @@ -660,11 +699,6 @@ woodstox-core-asl 4.2.1 - - org.hamcrest - hamcrest-all - 1.3 - org.json json @@ -774,6 +808,94 @@ + + org.owasp + antisamy + ${antisamy.version} + + + org.apache.xmlgraphics + batik-ext + + + + + + net.sf.jasperreports + jasperreports + ${jasperreports.version} + provided + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-annotations + + + org.apache.lucene + lucene-core + + + org.apache.lucene + lucene-analyzers-common + + + org.apache.lucene + lucene-analyzers-common + + + org.apache.lucene + lucene-queryparser + + + org.jfree + jcommon + + + org.jfree + jfreechart + + + org.eclipse.jdt.core.compiler + ecj + + + org.codehaus.castor + castor-xml + + + org.olap4j + olap4j + + + com.google.zxing + core + + + com.ibm.icu + icu4j + + + + + + + org.quartz-scheduler + quartz + ${quartz.version} + provided + + + + + org.springframework @@ -797,19 +919,40 @@ junit junit 4.11 + test org.hamcrest hamcrest-core + + + org.hamcrest + hamcrest-all + 1.3 test org.mockito mockito-all 1.8.5 + test + + org.testng + testng + 6.9.6 + test + + + com.wavemaker.commons + wavemaker-commons-util + ${project.version} + test-jar + test + + @@ -826,26 +969,32 @@ org.slf4j jcl-over-slf4j + junit junit - test org.springframework spring-test - test org.hamcrest hamcrest-all - test org.mockito mockito-all - test + + + org.testng + testng + + + com.wavemaker.commons + wavemaker-commons-util + test-jar diff --git a/wavemaker-app-runtime-core/pom.xml b/wavemaker-app-runtime-core/pom.xml index 2a3d0632c..177555bb5 100644 --- a/wavemaker-app-runtime-core/pom.xml +++ b/wavemaker-app-runtime-core/pom.xml @@ -16,8 +16,6 @@ ${basedir}/.. - 6.2.2 - 1.4 @@ -35,6 +33,11 @@ org.hibernate hibernate-entitymanager + + org.hibernate + hibernate-validator + + org.springframework.data spring-data-jpa @@ -185,124 +188,25 @@ org.apache.tika tika-core - - org.slf4j - slf4j-api - - - org.hibernate - hibernate-validator - - - org.slf4j - slf4j-log4j12 - net.sf.jasperreports jasperreports - ${jasperreports.version} - provided - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - org.apache.lucene - lucene-core - - - org.apache.lucene - lucene-analyzers-common - - - org.apache.lucene - lucene-analyzers-common - - - org.apache.lucene - lucene-queryparser - - - org.jfree - jcommon - - - org.jfree - jfreechart - - - org.eclipse.jdt.core.compiler - ecj - - - org.codehaus.castor - castor-xml - - - org.olap4j - olap4j - - - com.google.zxing - core - - - com.ibm.icu - icu4j - - xerces xercesImpl - 2.10.0 - - - xml-apis - xml-apis - - org.owasp antisamy - ${antisamy.version} - - - xml-apis - xml-apis - - + javax.servlet servlet-api - - - org.springframework - spring-test - test - - - - org.testng - testng - 6.9.6 - test - - net.sf.json-lib json-lib @@ -341,21 +245,8 @@ net.sf.jmimemagic jmimemagic - - - - xerces - xercesImpl - - - xml-apis - xml-apis - - + org.apache.poi @@ -365,16 +256,16 @@ org.apache.poi poi-ooxml + org.quartz-scheduler quartz - ${quartz.version} - provided + diff --git a/wavemaker-app-runtime-json/pom.xml b/wavemaker-app-runtime-json/pom.xml index 7362f39b0..45cd2b83c 100644 --- a/wavemaker-app-runtime-json/pom.xml +++ b/wavemaker-app-runtime-json/pom.xml @@ -32,15 +32,6 @@ org.antlr antlr-runtime - - - com.wavemaker.commons - wavemaker-commons-util - ${project.version} - test-jar - test - - From 67566384c3315857d6cde11037c56f4bf575555d Mon Sep 17 00:00:00 2001 From: Venugopal Jidigam Date: Wed, 1 Feb 2017 14:56:56 +0530 Subject: [PATCH 028/334] replacing the package name "studio" with runtime in commons & runtime modules Change-Id: I7b609b97176700092e6f750634d3299b20b96b5e --- .../runtime/json/core/jsonLexer.java | 216 +++++++++--------- .../runtime/json/core/jsonParser.java | 74 +++--- 2 files changed, 145 insertions(+), 145 deletions(-) diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java index a964b8933..3c03d5392 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonLexer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $ANTLR 3.1.1 src/com/wavemaker/studio/json/core/json.g 2011-08-19 11:24:08 +// $ANTLR 3.1.1 src/com/wavemaker/runtime/json/core/json.g 2011-08-19 11:24:08 package com.wavemaker.runtime.json.core; @@ -114,7 +114,7 @@ public jsonLexer(CharStream input, RecognizerSharedState state) { @Override public String getGrammarFileName() { - return "src/com/wavemaker/studio/json/core/json.g"; + return "src/com/wavemaker/runtime/json/core/json.g"; } // $ANTLR start "BEGIN_ARRAY" @@ -122,8 +122,8 @@ public final void mBEGIN_ARRAY() throws RecognitionException { try { int _type = BEGIN_ARRAY; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:15:13: ( '[' ) - // src/com/wavemaker/studio/json/core/json.g:15:15: '[' + // src/com/wavemaker/runtime/json/core/json.g:15:13: ( '[' ) + // src/com/wavemaker/runtime/json/core/json.g:15:15: '[' { match('['); @@ -142,8 +142,8 @@ public final void mEND_ARRAY() throws RecognitionException { try { int _type = END_ARRAY; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:16:11: ( ']' ) - // src/com/wavemaker/studio/json/core/json.g:16:13: ']' + // src/com/wavemaker/runtime/json/core/json.g:16:11: ( ']' ) + // src/com/wavemaker/runtime/json/core/json.g:16:13: ']' { match(']'); @@ -162,8 +162,8 @@ public final void mBEGIN_OBJ() throws RecognitionException { try { int _type = BEGIN_OBJ; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:17:11: ( '{' ) - // src/com/wavemaker/studio/json/core/json.g:17:13: '{' + // src/com/wavemaker/runtime/json/core/json.g:17:11: ( '{' ) + // src/com/wavemaker/runtime/json/core/json.g:17:13: '{' { match('{'); @@ -182,8 +182,8 @@ public final void mEND_OBJ() throws RecognitionException { try { int _type = END_OBJ; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:18:9: ( '}' ) - // src/com/wavemaker/studio/json/core/json.g:18:11: '}' + // src/com/wavemaker/runtime/json/core/json.g:18:9: ( '}' ) + // src/com/wavemaker/runtime/json/core/json.g:18:11: '}' { match('}'); @@ -202,8 +202,8 @@ public final void mNAME_SEP() throws RecognitionException { try { int _type = NAME_SEP; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:19:10: ( ':' ) - // src/com/wavemaker/studio/json/core/json.g:19:12: ':' + // src/com/wavemaker/runtime/json/core/json.g:19:10: ( ':' ) + // src/com/wavemaker/runtime/json/core/json.g:19:12: ':' { match(':'); @@ -222,8 +222,8 @@ public final void mVALUE_SEP() throws RecognitionException { try { int _type = VALUE_SEP; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:20:11: ( ',' ) - // src/com/wavemaker/studio/json/core/json.g:20:13: ',' + // src/com/wavemaker/runtime/json/core/json.g:20:11: ( ',' ) + // src/com/wavemaker/runtime/json/core/json.g:20:13: ',' { match(','); @@ -242,8 +242,8 @@ public final void mNULL() throws RecognitionException { try { int _type = NULL; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:160:6: ( 'null' ) - // src/com/wavemaker/studio/json/core/json.g:160:8: 'null' + // src/com/wavemaker/runtime/json/core/json.g:160:6: ( 'null' ) + // src/com/wavemaker/runtime/json/core/json.g:160:8: 'null' { match("null"); @@ -262,8 +262,8 @@ public final void mTRUE() throws RecognitionException { try { int _type = TRUE; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:163:6: ( 'true' ) - // src/com/wavemaker/studio/json/core/json.g:163:8: 'true' + // src/com/wavemaker/runtime/json/core/json.g:163:6: ( 'true' ) + // src/com/wavemaker/runtime/json/core/json.g:163:8: 'true' { match("true"); @@ -282,8 +282,8 @@ public final void mFALSE() throws RecognitionException { try { int _type = FALSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:166:7: ( 'false' ) - // src/com/wavemaker/studio/json/core/json.g:166:9: 'false' + // src/com/wavemaker/runtime/json/core/json.g:166:7: ( 'false' ) + // src/com/wavemaker/runtime/json/core/json.g:166:9: 'false' { match("false"); @@ -307,10 +307,10 @@ public final void mNUMBER() throws RecognitionException { Token FRAC3 = null; Token EXP4 = null; - // src/com/wavemaker/studio/json/core/json.g:180:8: ( ( MINUS )? INT ( FRAC )? ( EXP )? ) - // src/com/wavemaker/studio/json/core/json.g:180:10: ( MINUS )? INT ( FRAC )? ( EXP )? + // src/com/wavemaker/runtime/json/core/json.g:180:8: ( ( MINUS )? INT ( FRAC )? ( EXP )? ) + // src/com/wavemaker/runtime/json/core/json.g:180:10: ( MINUS )? INT ( FRAC )? ( EXP )? { - // src/com/wavemaker/studio/json/core/json.g:180:10: ( MINUS )? + // src/com/wavemaker/runtime/json/core/json.g:180:10: ( MINUS )? int alt1 = 2; int LA1_0 = this.input.LA(1); @@ -319,7 +319,7 @@ public final void mNUMBER() throws RecognitionException { } switch (alt1) { case 1: - // src/com/wavemaker/studio/json/core/json.g:180:10: MINUS + // src/com/wavemaker/runtime/json/core/json.g:180:10: MINUS { int MINUS1Start104 = getCharIndex(); mMINUS(); @@ -333,7 +333,7 @@ public final void mNUMBER() throws RecognitionException { int INT2Start107 = getCharIndex(); mINT(); INT2 = new CommonToken(this.input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, INT2Start107, getCharIndex() - 1); - // src/com/wavemaker/studio/json/core/json.g:180:21: ( FRAC )? + // src/com/wavemaker/runtime/json/core/json.g:180:21: ( FRAC )? int alt2 = 2; int LA2_0 = this.input.LA(1); @@ -342,7 +342,7 @@ public final void mNUMBER() throws RecognitionException { } switch (alt2) { case 1: - // src/com/wavemaker/studio/json/core/json.g:180:21: FRAC + // src/com/wavemaker/runtime/json/core/json.g:180:21: FRAC { int FRAC3Start109 = getCharIndex(); mFRAC(); @@ -353,7 +353,7 @@ public final void mNUMBER() throws RecognitionException { } - // src/com/wavemaker/studio/json/core/json.g:180:27: ( EXP )? + // src/com/wavemaker/runtime/json/core/json.g:180:27: ( EXP )? int alt3 = 2; int LA3_0 = this.input.LA(1); @@ -362,7 +362,7 @@ public final void mNUMBER() throws RecognitionException { } switch (alt3) { case 1: - // src/com/wavemaker/studio/json/core/json.g:180:27: EXP + // src/com/wavemaker/runtime/json/core/json.g:180:27: EXP { int EXP4Start112 = getCharIndex(); mEXP(); @@ -395,8 +395,8 @@ public final void mNUMBER() throws RecognitionException { // $ANTLR start "DECIMAL_POINT" public final void mDECIMAL_POINT() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:193:2: ( '.' ) - // src/com/wavemaker/studio/json/core/json.g:193:4: '.' + // src/com/wavemaker/runtime/json/core/json.g:193:2: ( '.' ) + // src/com/wavemaker/runtime/json/core/json.g:193:4: '.' { match('.'); @@ -411,8 +411,8 @@ public final void mDECIMAL_POINT() throws RecognitionException { // $ANTLR start "DIGIT" public final void mDIGIT() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:195:2: ( '0' .. '9' ) - // src/com/wavemaker/studio/json/core/json.g:195:4: '0' .. '9' + // src/com/wavemaker/runtime/json/core/json.g:195:2: ( '0' .. '9' ) + // src/com/wavemaker/runtime/json/core/json.g:195:4: '0' .. '9' { matchRange('0', '9'); @@ -427,8 +427,8 @@ public final void mDIGIT() throws RecognitionException { // $ANTLR start "DIGIT19" public final void mDIGIT19() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:197:2: ( '1' .. '9' ) - // src/com/wavemaker/studio/json/core/json.g:197:4: '1' .. '9' + // src/com/wavemaker/runtime/json/core/json.g:197:2: ( '1' .. '9' ) + // src/com/wavemaker/runtime/json/core/json.g:197:4: '1' .. '9' { matchRange('1', '9'); @@ -443,8 +443,8 @@ public final void mDIGIT19() throws RecognitionException { // $ANTLR start "E" public final void mE() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:199:2: ( 'e' | 'E' ) - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g:199:2: ( 'e' | 'E' ) + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) == 'E' || this.input.LA(1) == 'e') { this.input.consume(); @@ -466,11 +466,11 @@ public final void mE() throws RecognitionException { // $ANTLR start "EXP" public final void mEXP() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:201:2: ( E ( MINUS | PLUS )? ( DIGIT )+ ) - // src/com/wavemaker/studio/json/core/json.g:201:4: E ( MINUS | PLUS )? ( DIGIT )+ + // src/com/wavemaker/runtime/json/core/json.g:201:2: ( E ( MINUS | PLUS )? ( DIGIT )+ ) + // src/com/wavemaker/runtime/json/core/json.g:201:4: E ( MINUS | PLUS )? ( DIGIT )+ { mE(); - // src/com/wavemaker/studio/json/core/json.g:201:6: ( MINUS | PLUS )? + // src/com/wavemaker/runtime/json/core/json.g:201:6: ( MINUS | PLUS )? int alt4 = 2; int LA4_0 = this.input.LA(1); @@ -479,7 +479,7 @@ public final void mEXP() throws RecognitionException { } switch (alt4) { case 1: - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) == '+' || this.input.LA(1) == '-') { this.input.consume(); @@ -495,7 +495,7 @@ public final void mEXP() throws RecognitionException { } - // src/com/wavemaker/studio/json/core/json.g:201:22: ( DIGIT )+ + // src/com/wavemaker/runtime/json/core/json.g:201:22: ( DIGIT )+ int cnt5 = 0; loop5: do { int alt5 = 2; @@ -507,7 +507,7 @@ public final void mEXP() throws RecognitionException { switch (alt5) { case 1: - // src/com/wavemaker/studio/json/core/json.g:201:22: DIGIT + // src/com/wavemaker/runtime/json/core/json.g:201:22: DIGIT { mDIGIT(); @@ -535,11 +535,11 @@ public final void mEXP() throws RecognitionException { // $ANTLR start "FRAC" public final void mFRAC() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:203:2: ( DECIMAL_POINT ( DIGIT )+ ) - // src/com/wavemaker/studio/json/core/json.g:203:4: DECIMAL_POINT ( DIGIT )+ + // src/com/wavemaker/runtime/json/core/json.g:203:2: ( DECIMAL_POINT ( DIGIT )+ ) + // src/com/wavemaker/runtime/json/core/json.g:203:4: DECIMAL_POINT ( DIGIT )+ { mDECIMAL_POINT(); - // src/com/wavemaker/studio/json/core/json.g:203:18: ( DIGIT )+ + // src/com/wavemaker/runtime/json/core/json.g:203:18: ( DIGIT )+ int cnt6 = 0; loop6: do { int alt6 = 2; @@ -551,7 +551,7 @@ public final void mFRAC() throws RecognitionException { switch (alt6) { case 1: - // src/com/wavemaker/studio/json/core/json.g:203:18: DIGIT + // src/com/wavemaker/runtime/json/core/json.g:203:18: DIGIT { mDIGIT(); @@ -579,7 +579,7 @@ public final void mFRAC() throws RecognitionException { // $ANTLR start "INT" public final void mINT() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:205:2: ( ZERO | ( DIGIT19 ( DIGIT )* ) ) + // src/com/wavemaker/runtime/json/core/json.g:205:2: ( ZERO | ( DIGIT19 ( DIGIT )* ) ) int alt8 = 2; int LA8_0 = this.input.LA(1); @@ -594,20 +594,20 @@ public final void mINT() throws RecognitionException { } switch (alt8) { case 1: - // src/com/wavemaker/studio/json/core/json.g:205:4: ZERO + // src/com/wavemaker/runtime/json/core/json.g:205:4: ZERO { mZERO(); } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:205:11: ( DIGIT19 ( DIGIT )* ) + // src/com/wavemaker/runtime/json/core/json.g:205:11: ( DIGIT19 ( DIGIT )* ) { - // src/com/wavemaker/studio/json/core/json.g:205:11: ( DIGIT19 ( DIGIT )* ) - // src/com/wavemaker/studio/json/core/json.g:205:12: DIGIT19 ( DIGIT )* + // src/com/wavemaker/runtime/json/core/json.g:205:11: ( DIGIT19 ( DIGIT )* ) + // src/com/wavemaker/runtime/json/core/json.g:205:12: DIGIT19 ( DIGIT )* { mDIGIT19(); - // src/com/wavemaker/studio/json/core/json.g:205:20: ( DIGIT )* + // src/com/wavemaker/runtime/json/core/json.g:205:20: ( DIGIT )* loop7: do { int alt7 = 2; int LA7_0 = this.input.LA(1); @@ -618,7 +618,7 @@ public final void mINT() throws RecognitionException { switch (alt7) { case 1: - // src/com/wavemaker/studio/json/core/json.g:205:20: DIGIT + // src/com/wavemaker/runtime/json/core/json.g:205:20: DIGIT { mDIGIT(); @@ -645,8 +645,8 @@ public final void mINT() throws RecognitionException { // $ANTLR start "MINUS" public final void mMINUS() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:207:2: ( '-' ) - // src/com/wavemaker/studio/json/core/json.g:207:4: '-' + // src/com/wavemaker/runtime/json/core/json.g:207:2: ( '-' ) + // src/com/wavemaker/runtime/json/core/json.g:207:4: '-' { match('-'); @@ -661,8 +661,8 @@ public final void mMINUS() throws RecognitionException { // $ANTLR start "PLUS" public final void mPLUS() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:209:2: ( '+' ) - // src/com/wavemaker/studio/json/core/json.g:209:4: '+' + // src/com/wavemaker/runtime/json/core/json.g:209:2: ( '+' ) + // src/com/wavemaker/runtime/json/core/json.g:209:4: '+' { match('+'); @@ -677,8 +677,8 @@ public final void mPLUS() throws RecognitionException { // $ANTLR start "ZERO" public final void mZERO() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:211:2: ( '0' ) - // src/com/wavemaker/studio/json/core/json.g:211:4: '0' + // src/com/wavemaker/runtime/json/core/json.g:211:2: ( '0' ) + // src/com/wavemaker/runtime/json/core/json.g:211:4: '0' { match('0'); @@ -695,11 +695,11 @@ public final void mSTRING() throws RecognitionException { try { int _type = STRING; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:230:8: ( QUOTATION_MARK ( CHAR )* QUOTATION_MARK ) - // src/com/wavemaker/studio/json/core/json.g:230:10: QUOTATION_MARK ( CHAR )* QUOTATION_MARK + // src/com/wavemaker/runtime/json/core/json.g:230:8: ( QUOTATION_MARK ( CHAR )* QUOTATION_MARK ) + // src/com/wavemaker/runtime/json/core/json.g:230:10: QUOTATION_MARK ( CHAR )* QUOTATION_MARK { mQUOTATION_MARK(); - // src/com/wavemaker/studio/json/core/json.g:230:25: ( CHAR )* + // src/com/wavemaker/runtime/json/core/json.g:230:25: ( CHAR )* loop9: do { int alt9 = 2; int LA9_0 = this.input.LA(1); @@ -710,7 +710,7 @@ public final void mSTRING() throws RecognitionException { switch (alt9) { case 1: - // src/com/wavemaker/studio/json/core/json.g:230:25: CHAR + // src/com/wavemaker/runtime/json/core/json.g:230:25: CHAR { mCHAR(); @@ -739,7 +739,7 @@ public final void mSTRING() throws RecognitionException { // $ANTLR start "CHAR" public final void mCHAR() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:237:2: ( UNESCAPED | ESCAPE ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | + // src/com/wavemaker/runtime/json/core/json.g:237:2: ( UNESCAPED | ESCAPE ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | // 'r' | 't' | 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT ) ) int alt11 = 2; int LA11_0 = this.input.LA(1); @@ -755,18 +755,18 @@ public final void mCHAR() throws RecognitionException { } switch (alt11) { case 1: - // src/com/wavemaker/studio/json/core/json.g:237:4: UNESCAPED + // src/com/wavemaker/runtime/json/core/json.g:237:4: UNESCAPED { mUNESCAPED(); } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:237:16: ESCAPE ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' + // src/com/wavemaker/runtime/json/core/json.g:237:16: ESCAPE ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' // | 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT ) { mESCAPE(); - // src/com/wavemaker/studio/json/core/json.g:237:23: ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | + // src/com/wavemaker/runtime/json/core/json.g:237:23: ( '\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | // 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT ) int alt10 = 9; switch (this.input.LA(1)) { @@ -814,63 +814,63 @@ public final void mCHAR() throws RecognitionException { switch (alt10) { case 1: - // src/com/wavemaker/studio/json/core/json.g:237:25: '\"' + // src/com/wavemaker/runtime/json/core/json.g:237:25: '\"' { match('\"'); } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:237:31: '\\\\' + // src/com/wavemaker/runtime/json/core/json.g:237:31: '\\\\' { match('\\'); } break; case 3: - // src/com/wavemaker/studio/json/core/json.g:237:38: '/' + // src/com/wavemaker/runtime/json/core/json.g:237:38: '/' { match('/'); } break; case 4: - // src/com/wavemaker/studio/json/core/json.g:237:44: 'b' + // src/com/wavemaker/runtime/json/core/json.g:237:44: 'b' { match('b'); } break; case 5: - // src/com/wavemaker/studio/json/core/json.g:237:50: 'f' + // src/com/wavemaker/runtime/json/core/json.g:237:50: 'f' { match('f'); } break; case 6: - // src/com/wavemaker/studio/json/core/json.g:237:56: 'n' + // src/com/wavemaker/runtime/json/core/json.g:237:56: 'n' { match('n'); } break; case 7: - // src/com/wavemaker/studio/json/core/json.g:237:62: 'r' + // src/com/wavemaker/runtime/json/core/json.g:237:62: 'r' { match('r'); } break; case 8: - // src/com/wavemaker/studio/json/core/json.g:237:68: 't' + // src/com/wavemaker/runtime/json/core/json.g:237:68: 't' { match('t'); } break; case 9: - // src/com/wavemaker/studio/json/core/json.g:237:74: 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT + // src/com/wavemaker/runtime/json/core/json.g:237:74: 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT { match('u'); mHEXDIGIT(); @@ -896,8 +896,8 @@ public final void mCHAR() throws RecognitionException { // $ANTLR start "ESCAPE" public final void mESCAPE() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:239:2: ( '\\\\' ) - // src/com/wavemaker/studio/json/core/json.g:239:4: '\\\\' + // src/com/wavemaker/runtime/json/core/json.g:239:2: ( '\\\\' ) + // src/com/wavemaker/runtime/json/core/json.g:239:4: '\\\\' { match('\\'); @@ -912,8 +912,8 @@ public final void mESCAPE() throws RecognitionException { // $ANTLR start "QUOTATION_MARK" public final void mQUOTATION_MARK() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:241:2: ( '\"' ) - // src/com/wavemaker/studio/json/core/json.g:241:4: '\"' + // src/com/wavemaker/runtime/json/core/json.g:241:2: ( '\"' ) + // src/com/wavemaker/runtime/json/core/json.g:241:4: '\"' { match('\"'); @@ -928,9 +928,9 @@ public final void mQUOTATION_MARK() throws RecognitionException { // $ANTLR start "UNESCAPED" public final void mUNESCAPED() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:243:2: ( '\ ' .. '\\u0021' | '\\u0023' .. '\\u005B' | '\\u005D' .. + // src/com/wavemaker/runtime/json/core/json.g:243:2: ( '\ ' .. '\\u0021' | '\\u0023' .. '\\u005B' | '\\u005D' .. // '\\uFFFF' ) - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) >= ' ' && this.input.LA(1) <= '!' || this.input.LA(1) >= '#' && this.input.LA(1) <= '[' || this.input.LA(1) >= ']' && this.input.LA(1) <= '\uFFFF') { @@ -953,8 +953,8 @@ public final void mUNESCAPED() throws RecognitionException { // $ANTLR start "HEXDIGIT" public final void mHEXDIGIT() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:245:2: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g:245:2: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) >= '0' && this.input.LA(1) <= '9' || this.input.LA(1) >= 'A' && this.input.LA(1) <= 'F' || this.input.LA(1) >= 'a' && this.input.LA(1) <= 'f') { @@ -979,10 +979,10 @@ public final void mWHITESPACE() throws RecognitionException { try { int _type = WHITESPACE; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:248:12: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) - // src/com/wavemaker/studio/json/core/json.g:248:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ + // src/com/wavemaker/runtime/json/core/json.g:248:12: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // src/com/wavemaker/runtime/json/core/json.g:248:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ { - // src/com/wavemaker/studio/json/core/json.g:248:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ + // src/com/wavemaker/runtime/json/core/json.g:248:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ int cnt12 = 0; loop12: do { int alt12 = 2; @@ -994,7 +994,7 @@ public final void mWHITESPACE() throws RecognitionException { switch (alt12) { case 1: - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) >= '\t' && this.input.LA(1) <= '\n' || this.input.LA(1) == '\r' || this.input.LA(1) == ' ') { this.input.consume(); @@ -1033,8 +1033,8 @@ public final void mWHITESPACE() throws RecognitionException { // $ANTLR start "JS_IDENT_FIRST" public final void mJS_IDENT_FIRST() throws RecognitionException { try { - // src/com/wavemaker/studio/json/core/json.g:255:5: ( 'A' .. 'Z' | 'a' .. 'z' | '$' | '_' ) - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g:255:5: ( 'A' .. 'Z' | 'a' .. 'z' | '$' | '_' ) + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) == '$' || this.input.LA(1) >= 'A' && this.input.LA(1) <= 'Z' || this.input.LA(1) == '_' || this.input.LA(1) >= 'a' && this.input.LA(1) <= 'z') { @@ -1059,11 +1059,11 @@ public final void mJS_IDENT() throws RecognitionException { try { int _type = JS_IDENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // src/com/wavemaker/studio/json/core/json.g:256:13: ( JS_IDENT_FIRST ( JS_IDENT_FIRST | DIGIT )* ) - // src/com/wavemaker/studio/json/core/json.g:256:17: JS_IDENT_FIRST ( JS_IDENT_FIRST | DIGIT )* + // src/com/wavemaker/runtime/json/core/json.g:256:13: ( JS_IDENT_FIRST ( JS_IDENT_FIRST | DIGIT )* ) + // src/com/wavemaker/runtime/json/core/json.g:256:17: JS_IDENT_FIRST ( JS_IDENT_FIRST | DIGIT )* { mJS_IDENT_FIRST(); - // src/com/wavemaker/studio/json/core/json.g:256:32: ( JS_IDENT_FIRST | DIGIT )* + // src/com/wavemaker/runtime/json/core/json.g:256:32: ( JS_IDENT_FIRST | DIGIT )* loop13: do { int alt13 = 2; int LA13_0 = this.input.LA(1); @@ -1075,7 +1075,7 @@ public final void mJS_IDENT() throws RecognitionException { switch (alt13) { case 1: - // src/com/wavemaker/studio/json/core/json.g: + // src/com/wavemaker/runtime/json/core/json.g: { if (this.input.LA(1) == '$' || this.input.LA(1) >= '0' && this.input.LA(1) <= '9' || this.input.LA(1) >= 'A' && this.input.LA(1) <= 'Z' || this.input.LA(1) == '_' || this.input.LA(1) >= 'a' && this.input.LA(1) <= 'z') { @@ -1109,97 +1109,97 @@ public final void mJS_IDENT() throws RecognitionException { @Override public void mTokens() throws RecognitionException { - // src/com/wavemaker/studio/json/core/json.g:1:8: ( BEGIN_ARRAY | END_ARRAY | BEGIN_OBJ | END_OBJ | NAME_SEP | + // src/com/wavemaker/runtime/json/core/json.g:1:8: ( BEGIN_ARRAY | END_ARRAY | BEGIN_OBJ | END_OBJ | NAME_SEP | // VALUE_SEP | NULL | TRUE | FALSE | NUMBER | STRING | WHITESPACE | JS_IDENT ) int alt14 = 13; alt14 = this.dfa14.predict(this.input); switch (alt14) { case 1: - // src/com/wavemaker/studio/json/core/json.g:1:10: BEGIN_ARRAY + // src/com/wavemaker/runtime/json/core/json.g:1:10: BEGIN_ARRAY { mBEGIN_ARRAY(); } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:1:22: END_ARRAY + // src/com/wavemaker/runtime/json/core/json.g:1:22: END_ARRAY { mEND_ARRAY(); } break; case 3: - // src/com/wavemaker/studio/json/core/json.g:1:32: BEGIN_OBJ + // src/com/wavemaker/runtime/json/core/json.g:1:32: BEGIN_OBJ { mBEGIN_OBJ(); } break; case 4: - // src/com/wavemaker/studio/json/core/json.g:1:42: END_OBJ + // src/com/wavemaker/runtime/json/core/json.g:1:42: END_OBJ { mEND_OBJ(); } break; case 5: - // src/com/wavemaker/studio/json/core/json.g:1:50: NAME_SEP + // src/com/wavemaker/runtime/json/core/json.g:1:50: NAME_SEP { mNAME_SEP(); } break; case 6: - // src/com/wavemaker/studio/json/core/json.g:1:59: VALUE_SEP + // src/com/wavemaker/runtime/json/core/json.g:1:59: VALUE_SEP { mVALUE_SEP(); } break; case 7: - // src/com/wavemaker/studio/json/core/json.g:1:69: NULL + // src/com/wavemaker/runtime/json/core/json.g:1:69: NULL { mNULL(); } break; case 8: - // src/com/wavemaker/studio/json/core/json.g:1:74: TRUE + // src/com/wavemaker/runtime/json/core/json.g:1:74: TRUE { mTRUE(); } break; case 9: - // src/com/wavemaker/studio/json/core/json.g:1:79: FALSE + // src/com/wavemaker/runtime/json/core/json.g:1:79: FALSE { mFALSE(); } break; case 10: - // src/com/wavemaker/studio/json/core/json.g:1:85: NUMBER + // src/com/wavemaker/runtime/json/core/json.g:1:85: NUMBER { mNUMBER(); } break; case 11: - // src/com/wavemaker/studio/json/core/json.g:1:92: STRING + // src/com/wavemaker/runtime/json/core/json.g:1:92: STRING { mSTRING(); } break; case 12: - // src/com/wavemaker/studio/json/core/json.g:1:99: WHITESPACE + // src/com/wavemaker/runtime/json/core/json.g:1:99: WHITESPACE { mWHITESPACE(); } break; case 13: - // src/com/wavemaker/studio/json/core/json.g:1:110: JS_IDENT + // src/com/wavemaker/runtime/json/core/json.g:1:110: JS_IDENT { mJS_IDENT(); diff --git a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java index 7a3344aab..058d8aeed 100644 --- a/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java +++ b/wavemaker-app-runtime-json/src/main/java/com/wavemaker/runtime/json/core/jsonParser.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $ANTLR 3.1.1 src/com/wavemaker/studio/json/core/json.g 2011-08-19 11:24:08 +// $ANTLR 3.1.1 src/com/wavemaker/runtime/json/core/json.g 2011-08-19 11:24:08 package com.wavemaker.runtime.json.core; @@ -122,12 +122,12 @@ public String[] getTokenNames() { @Override public String getGrammarFileName() { - return "src/com/wavemaker/studio/json/core/json.g"; + return "src/com/wavemaker/runtime/json/core/json.g"; } // these only exist to remove unused import warnings // $ANTLR start "json" - // src/com/wavemaker/studio/json/core/json.g:83:1: json returns [JSON value] : ( object | array ); + // src/com/wavemaker/runtime/json/core/json.g:83:1: json returns [JSON value] : ( object | array ); public final JSON json() throws RecognitionException { JSON value = null; @@ -136,7 +136,7 @@ public final JSON json() throws RecognitionException { JSONArray array2 = null; try { - // src/com/wavemaker/studio/json/core/json.g:83:27: ( object | array ) + // src/com/wavemaker/runtime/json/core/json.g:83:27: ( object | array ) int alt1 = 2; int LA1_0 = this.input.LA(1); @@ -151,7 +151,7 @@ public final JSON json() throws RecognitionException { } switch (alt1) { case 1: - // src/com/wavemaker/studio/json/core/json.g:84:2: object + // src/com/wavemaker/runtime/json/core/json.g:84:2: object { pushFollow(FOLLOW_object_in_json124); object1 = object(); @@ -163,7 +163,7 @@ public final JSON json() throws RecognitionException { } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:85:4: array + // src/com/wavemaker/runtime/json/core/json.g:85:4: array { pushFollow(FOLLOW_array_in_json131); array2 = array(); @@ -187,7 +187,7 @@ public final JSON json() throws RecognitionException { // $ANTLR end "json" // $ANTLR start "value" - // src/com/wavemaker/studio/json/core/json.g:91:1: value returns [Object value] : ( FALSE | NULL | TRUE | object | array | + // src/com/wavemaker/runtime/json/core/json.g:91:1: value returns [Object value] : ( FALSE | NULL | TRUE | object | array | // NUMBER | STRING ); public final Object value() throws RecognitionException { Object value = null; @@ -199,7 +199,7 @@ public final Object value() throws RecognitionException { JSONArray array4 = null; try { - // src/com/wavemaker/studio/json/core/json.g:91:30: ( FALSE | NULL | TRUE | object | array | NUMBER | STRING ) + // src/com/wavemaker/runtime/json/core/json.g:91:30: ( FALSE | NULL | TRUE | object | array | NUMBER | STRING ) int alt2 = 7; switch (this.input.LA(1)) { case FALSE: { @@ -238,7 +238,7 @@ public final Object value() throws RecognitionException { switch (alt2) { case 1: - // src/com/wavemaker/studio/json/core/json.g:92:2: FALSE + // src/com/wavemaker/runtime/json/core/json.g:92:2: FALSE { match(this.input, FALSE, FOLLOW_FALSE_in_value149); value = Boolean.FALSE; @@ -246,7 +246,7 @@ public final Object value() throws RecognitionException { } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:93:4: NULL + // src/com/wavemaker/runtime/json/core/json.g:93:4: NULL { match(this.input, NULL, FOLLOW_NULL_in_value156); value = null; @@ -254,7 +254,7 @@ public final Object value() throws RecognitionException { } break; case 3: - // src/com/wavemaker/studio/json/core/json.g:94:4: TRUE + // src/com/wavemaker/runtime/json/core/json.g:94:4: TRUE { match(this.input, TRUE, FOLLOW_TRUE_in_value163); value = Boolean.TRUE; @@ -262,7 +262,7 @@ public final Object value() throws RecognitionException { } break; case 4: - // src/com/wavemaker/studio/json/core/json.g:95:4: object + // src/com/wavemaker/runtime/json/core/json.g:95:4: object { pushFollow(FOLLOW_object_in_value170); object3 = object(); @@ -274,7 +274,7 @@ public final Object value() throws RecognitionException { } break; case 5: - // src/com/wavemaker/studio/json/core/json.g:96:4: array + // src/com/wavemaker/runtime/json/core/json.g:96:4: array { pushFollow(FOLLOW_array_in_value177); array4 = array(); @@ -286,7 +286,7 @@ public final Object value() throws RecognitionException { } break; case 6: - // src/com/wavemaker/studio/json/core/json.g:97:4: NUMBER + // src/com/wavemaker/runtime/json/core/json.g:97:4: NUMBER { NUMBER5 = (Token) match(this.input, NUMBER, FOLLOW_NUMBER_in_value184); @@ -300,7 +300,7 @@ public final Object value() throws RecognitionException { } break; case 7: - // src/com/wavemaker/studio/json/core/json.g:106:4: STRING + // src/com/wavemaker/runtime/json/core/json.g:106:4: STRING { STRING6 = (Token) match(this.input, STRING, FOLLOW_STRING_in_value193); value = STRING6 != null ? STRING6.getText() : null; @@ -320,22 +320,22 @@ public final Object value() throws RecognitionException { // $ANTLR end "value" // $ANTLR start "object" - // src/com/wavemaker/studio/json/core/json.g:112:1: object returns [JSONObject value] : BEGIN_OBJ ( member[value] ( + // src/com/wavemaker/runtime/json/core/json.g:112:1: object returns [JSONObject value] : BEGIN_OBJ ( member[value] ( // VALUE_SEP member[value] )* )? ( VALUE_SEP )? END_OBJ ; public final JSONObject object() throws RecognitionException { JSONObject value = null; try { - // src/com/wavemaker/studio/json/core/json.g:112:35: ( BEGIN_OBJ ( member[value] ( VALUE_SEP member[value] )* )? ( + // src/com/wavemaker/runtime/json/core/json.g:112:35: ( BEGIN_OBJ ( member[value] ( VALUE_SEP member[value] )* )? ( // VALUE_SEP )? END_OBJ ) - // src/com/wavemaker/studio/json/core/json.g:113:2: BEGIN_OBJ ( member[value] ( VALUE_SEP member[value] )* )? ( + // src/com/wavemaker/runtime/json/core/json.g:113:2: BEGIN_OBJ ( member[value] ( VALUE_SEP member[value] )* )? ( // VALUE_SEP )? END_OBJ { value = new JSONObject(); match(this.input, BEGIN_OBJ, FOLLOW_BEGIN_OBJ_in_object213); - // src/com/wavemaker/studio/json/core/json.g:116:12: ( member[value] ( VALUE_SEP member[value] )* )? + // src/com/wavemaker/runtime/json/core/json.g:116:12: ( member[value] ( VALUE_SEP member[value] )* )? int alt4 = 2; int LA4_0 = this.input.LA(1); @@ -344,14 +344,14 @@ public final JSONObject object() throws RecognitionException { } switch (alt4) { case 1: - // src/com/wavemaker/studio/json/core/json.g:116:13: member[value] ( VALUE_SEP member[value] )* + // src/com/wavemaker/runtime/json/core/json.g:116:13: member[value] ( VALUE_SEP member[value] )* { pushFollow(FOLLOW_member_in_object216); member(value); this.state._fsp--; - // src/com/wavemaker/studio/json/core/json.g:116:27: ( VALUE_SEP member[value] )* + // src/com/wavemaker/runtime/json/core/json.g:116:27: ( VALUE_SEP member[value] )* loop3: do { int alt3 = 2; int LA3_0 = this.input.LA(1); @@ -367,7 +367,7 @@ public final JSONObject object() throws RecognitionException { switch (alt3) { case 1: - // src/com/wavemaker/studio/json/core/json.g:116:28: VALUE_SEP member[value] + // src/com/wavemaker/runtime/json/core/json.g:116:28: VALUE_SEP member[value] { match(this.input, VALUE_SEP, FOLLOW_VALUE_SEP_in_object220); pushFollow(FOLLOW_member_in_object222); @@ -388,7 +388,7 @@ public final JSONObject object() throws RecognitionException { } - // src/com/wavemaker/studio/json/core/json.g:116:56: ( VALUE_SEP )? + // src/com/wavemaker/runtime/json/core/json.g:116:56: ( VALUE_SEP )? int alt5 = 2; int LA5_0 = this.input.LA(1); @@ -397,7 +397,7 @@ public final JSONObject object() throws RecognitionException { } switch (alt5) { case 1: - // src/com/wavemaker/studio/json/core/json.g:116:56: VALUE_SEP + // src/com/wavemaker/runtime/json/core/json.g:116:56: VALUE_SEP { match(this.input, VALUE_SEP, FOLLOW_VALUE_SEP_in_object229); @@ -421,7 +421,7 @@ public final JSONObject object() throws RecognitionException { // $ANTLR end "object" // $ANTLR start "member" - // src/com/wavemaker/studio/json/core/json.g:118:1: member[JSONObject object] : ( STRING NAME_SEP value | JS_IDENT NAME_SEP + // src/com/wavemaker/runtime/json/core/json.g:118:1: member[JSONObject object] : ( STRING NAME_SEP value | JS_IDENT NAME_SEP // value ); public final void member(JSONObject object) throws RecognitionException { Token STRING7 = null; @@ -431,7 +431,7 @@ public final void member(JSONObject object) throws RecognitionException { Object value10 = null; try { - // src/com/wavemaker/studio/json/core/json.g:124:27: ( STRING NAME_SEP value | JS_IDENT NAME_SEP value ) + // src/com/wavemaker/runtime/json/core/json.g:124:27: ( STRING NAME_SEP value | JS_IDENT NAME_SEP value ) int alt6 = 2; int LA6_0 = this.input.LA(1); @@ -446,7 +446,7 @@ public final void member(JSONObject object) throws RecognitionException { } switch (alt6) { case 1: - // src/com/wavemaker/studio/json/core/json.g:125:2: STRING NAME_SEP value + // src/com/wavemaker/runtime/json/core/json.g:125:2: STRING NAME_SEP value { STRING7 = (Token) match(this.input, STRING, FOLLOW_STRING_in_member244); match(this.input, NAME_SEP, FOLLOW_NAME_SEP_in_member246); @@ -460,7 +460,7 @@ public final void member(JSONObject object) throws RecognitionException { } break; case 2: - // src/com/wavemaker/studio/json/core/json.g:129:2: JS_IDENT NAME_SEP value + // src/com/wavemaker/runtime/json/core/json.g:129:2: JS_IDENT NAME_SEP value { JS_IDENT9 = (Token) match(this.input, JS_IDENT, FOLLOW_JS_IDENT_in_member256); match(this.input, NAME_SEP, FOLLOW_NAME_SEP_in_member258); @@ -486,7 +486,7 @@ public final void member(JSONObject object) throws RecognitionException { // $ANTLR end "member" // $ANTLR start "array" - // src/com/wavemaker/studio/json/core/json.g:134:1: array returns [JSONArray array] : BEGIN_ARRAY (va= value ( VALUE_SEP + // src/com/wavemaker/runtime/json/core/json.g:134:1: array returns [JSONArray array] : BEGIN_ARRAY (va= value ( VALUE_SEP // vap= value )* ( VALUE_SEP )? )? END_ARRAY ; public final JSONArray array() throws RecognitionException { JSONArray array = null; @@ -496,16 +496,16 @@ public final JSONArray array() throws RecognitionException { Object vap = null; try { - // src/com/wavemaker/studio/json/core/json.g:142:33: ( BEGIN_ARRAY (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP + // src/com/wavemaker/runtime/json/core/json.g:142:33: ( BEGIN_ARRAY (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP // )? )? END_ARRAY ) - // src/com/wavemaker/studio/json/core/json.g:143:2: BEGIN_ARRAY (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? + // src/com/wavemaker/runtime/json/core/json.g:143:2: BEGIN_ARRAY (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? // )? END_ARRAY { array = new JSONArray(); match(this.input, BEGIN_ARRAY, FOLLOW_BEGIN_ARRAY_in_array281); - // src/com/wavemaker/studio/json/core/json.g:147:3: (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? )? + // src/com/wavemaker/runtime/json/core/json.g:147:3: (va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? )? int alt9 = 2; int LA9_0 = this.input.LA(1); @@ -514,7 +514,7 @@ public final JSONArray array() throws RecognitionException { } switch (alt9) { case 1: - // src/com/wavemaker/studio/json/core/json.g:148:4: va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? + // src/com/wavemaker/runtime/json/core/json.g:148:4: va= value ( VALUE_SEP vap= value )* ( VALUE_SEP )? { pushFollow(FOLLOW_value_in_array293); va = value(); @@ -522,7 +522,7 @@ public final JSONArray array() throws RecognitionException { this.state._fsp--; array.add(va); - // src/com/wavemaker/studio/json/core/json.g:149:4: ( VALUE_SEP vap= value )* + // src/com/wavemaker/runtime/json/core/json.g:149:4: ( VALUE_SEP vap= value )* loop7: do { int alt7 = 2; int LA7_0 = this.input.LA(1); @@ -538,7 +538,7 @@ public final JSONArray array() throws RecognitionException { switch (alt7) { case 1: - // src/com/wavemaker/studio/json/core/json.g:149:5: VALUE_SEP vap= value + // src/com/wavemaker/runtime/json/core/json.g:149:5: VALUE_SEP vap= value { match(this.input, VALUE_SEP, FOLLOW_VALUE_SEP_in_array301); pushFollow(FOLLOW_value_in_array305); @@ -556,7 +556,7 @@ public final JSONArray array() throws RecognitionException { } } while (true); - // src/com/wavemaker/studio/json/core/json.g:150:13: ( VALUE_SEP )? + // src/com/wavemaker/runtime/json/core/json.g:150:13: ( VALUE_SEP )? int alt8 = 2; int LA8_0 = this.input.LA(1); @@ -565,7 +565,7 @@ public final JSONArray array() throws RecognitionException { } switch (alt8) { case 1: - // src/com/wavemaker/studio/json/core/json.g:150:13: VALUE_SEP + // src/com/wavemaker/runtime/json/core/json.g:150:13: VALUE_SEP { match(this.input, VALUE_SEP, FOLLOW_VALUE_SEP_in_array323); From 25820a121757f2ef60d9375dac8656f8cf474eef Mon Sep 17 00:00:00 2001 From: Abhilash Sandi Date: Wed, 1 Feb 2017 12:35:56 +0530 Subject: [PATCH 029/334] Live form: Do not render the editable widgets in read mode. Use html elements instead of wm widgets for composite and label. Change-Id: I6b7bc7fe25e767099b33cfac22a2e8f4d4353b86 --- src/main/webapp/scripts/liveWidgetUtils.js | 10 +++++----- .../scripts/modules/widgets/live/form/liveform.js | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/scripts/liveWidgetUtils.js b/src/main/webapp/scripts/liveWidgetUtils.js index e1e78cf7b..f6d10549f 100644 --- a/src/main/webapp/scripts/liveWidgetUtils.js +++ b/src/main/webapp/scripts/liveWidgetUtils.js @@ -478,7 +478,7 @@ WM.module('wm.widgets.live') function getDefaultTemplate(widgetType, fieldDef, index, minPlaceholderDefault, maxPlaceholderDefault, defaultPlaceholder, additionalFields, isCustomWidget) { var template = '', widgetName = 'wm-' + widgetType, - updateModeCondition = isCustomWidget ? '' : (widgetType === 'richtexteditor' ? 'show = "bind:isUpdateMode"' : 'show="{{isUpdateMode}}"'), + updateModeCondition = isCustomWidget ? '' : (widgetType === 'richtexteditor' ? 'show = "bind:isUpdateMode"' : 'ng-if="isUpdateMode"'), allowInvalidAttr = fieldDef.widget === 'number' ? ' allowinvalid=true ' : '', readonly = (widgetType !== 'richtexteditor' || fieldDef.readonly ? 'readonly="{{!isUpdateMode || formFields[' + index + '].readonly}}"' : ''); additionalFields = additionalFields || ''; @@ -658,10 +658,10 @@ WM.module('wm.widgets.live') widgetType = fieldDef.widget || fieldTypeWidgetTypeMap[fieldDef.type][0]; widgetType = widgetType.toLowerCase(); template = template + - '' + - '' + + '
' + + '' + '
' + - ''; + ''; switch (widgetType) { case 'number': @@ -726,7 +726,7 @@ WM.module('wm.widgets.live') } template = template + (fieldDef.hint ? '

{{formFields[' + index + '].hint}}

' : ''); template = template + '

{{formFields[' + index + '].validationmessage}}

'; - template = template + '
'; + template = template + '
'; return template; } diff --git a/src/main/webapp/scripts/modules/widgets/live/form/liveform.js b/src/main/webapp/scripts/modules/widgets/live/form/liveform.js index 8d56aa54c..bd5806a2e 100644 --- a/src/main/webapp/scripts/modules/widgets/live/form/liveform.js +++ b/src/main/webapp/scripts/modules/widgets/live/form/liveform.js @@ -440,8 +440,7 @@ WM.module('wm.widgets.live') }; /*Method to clear the fields and set the form to readonly*/ $scope.formCancel = function () { - resetFormState(); - $scope.clearData(); + $scope.reset(); $scope.toggleMessage(false); /*Show the previous selected data*/ if ($scope.isSelected) { From a1dd0c27b285a5d5766c4333ea597f1caee1df05 Mon Sep 17 00:00:00 2001 From: Uday Date: Wed, 1 Feb 2017 16:13:14 +0530 Subject: [PATCH 030/334] Removing batik-ext exclusion from antisamy Change-Id: I312ca8dec18bd83d3ad0f9f66bec4d52891dfd60 --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index 06e68dd55..bbe849403 100644 --- a/pom.xml +++ b/pom.xml @@ -812,12 +812,6 @@ org.owasp antisamy ${antisamy.version} - - - org.apache.xmlgraphics - batik-ext - - From 53129d8183865b2816ee7e1eb8ae4563e4d4a6d0 Mon Sep 17 00:00:00 2001 From: soujanyaj Date: Wed, 1 Feb 2017 16:08:18 +0530 Subject: [PATCH 031/334] Applied icons on to the dialog view tabs and fixed WMS-10223[Provided hint for the search option in the db designer] Change-Id: I5bb72fd37a80b26e41dff83a0bff8f31477ef672 --- .../modules/layouts/styles/less/layouts.less | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less b/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less index 21f707a57..d67a5e1bf 100644 --- a/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less +++ b/src/main/webapp/scripts/modules/layouts/styles/less/layouts.less @@ -1533,20 +1533,23 @@ body { .inline { display: inline; } + .bold { + font-weight: bold; + } .bordered { - border: 1px solid rgb(0,0,0,0.2); + border: 1px solid rgba(0,0,0,0.2); } .bordered-left { - border-left: 1px solid rgb(0,0,0,0.2); + border-left: 1px solid rgba(0,0,0,0.2); } .bordered-right { - border-right: 1px solid rgb(0,0,0,0.2); + border-right: 1px solid rgba(0,0,0,0.2); } .bordered-top { - border-top: 1px solid rgb(0,0,0,0.2); + border-top: 1px solid rgba(0,0,0,0.2); } .bordered-bottom { - border-bottom: 1px solid rgb(0,0,0,0.2); + border-bottom: 1px solid rgba(0,0,0,0.2); } .vertical-align-top { vertical-align: top; From ce7be88bbfba2809e73f4dd0091ce22ed0de7924 Mon Sep 17 00:00:00 2001 From: Abhilash Sandi Date: Wed, 1 Feb 2017 17:04:28 +0530 Subject: [PATCH 032/334] Data table: Add loading icon property Change-Id: I5c8d09c678689cd5dfbd1ecdf6d91281db03933f --- src/main/webapp/scripts/modules/widgets/base/Base.js | 1 + src/main/webapp/scripts/modules/widgets/grid/datagrid.js | 8 ++++++-- src/main/webapp/scripts/modules/widgets/grid/grid.js | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/base/Base.js b/src/main/webapp/scripts/modules/widgets/base/Base.js index 9cf197040..2a3dc8bd5 100644 --- a/src/main/webapp/scripts/modules/widgets/base/Base.js +++ b/src/main/webapp/scripts/modules/widgets/base/Base.js @@ -1492,6 +1492,7 @@ WM.module('wm.widgets.base', []) "filternullrecords": {"type": "boolean", "value": true}, "nodatamessage": {"type": "string", "value": "No data found.", "bindable": "in-bound", "showindesigner": true}, "loadingdatamsg": {"type": "string", "value": "Loading...", "bindable": "in-bound", "showindesigner": true}, + "loadingicon": {"type": "string", "widget": "select-icon", "bindable": "in-bound", "value": "fa fa-spinner fa-spin", "pattern": classRegex}, "deletemessage": {"type": "string", "value": "Record deleted successfully", "bindable": "in-bound", "show": true, "showindesigner": true}, "errormessage": {"type": "string", "value": "", "bindable": "in-bound", "showindesigner": true}, "insertmessage": {"type": "string", "value": "Record added successfully", "bindable": "in-bound", "showindesigner": true}, diff --git a/src/main/webapp/scripts/modules/widgets/grid/datagrid.js b/src/main/webapp/scripts/modules/widgets/grid/datagrid.js index 2523794db..a38252e31 100644 --- a/src/main/webapp/scripts/modules/widgets/grid/datagrid.js +++ b/src/main/webapp/scripts/modules/widgets/grid/datagrid.js @@ -42,11 +42,12 @@ $.widget('wm.datagrid', { 'descIcon' : 'wi wi-long-arrow-down' }, dataStates: { - 'loading': 'Loading...', + 'loading': '', 'ready': '', 'error': 'An error occurred in loading the data.', 'nodata': 'No data found.' }, + loadingicon: '', startRowIndex: 1, editmode: '', searchHandler: WM.noop, @@ -1074,6 +1075,9 @@ $.widget('wm.datagrid', { this.setStatus('loading'); } break; + case 'loadingicon': + this.dataStatusContainer.find('i').removeClass().addClass(this.options.loadingicon); + break; case 'multiselect': // Fallthrough case 'showRadioColumn': case 'colDefs': @@ -2387,7 +2391,7 @@ $.widget('wm.datagrid', { } var statusContainer = '', table = '
' + diff --git a/src/main/webapp/scripts/modules/widgets/grid/grid.js b/src/main/webapp/scripts/modules/widgets/grid/grid.js index d58b8c981..62ec98424 100644 --- a/src/main/webapp/scripts/modules/widgets/grid/grid.js +++ b/src/main/webapp/scripts/modules/widgets/grid/grid.js @@ -129,6 +129,7 @@ WM.module('wm.widgets.grid') 'rowclass' : CONSTANTS.isStudioMode, 'nodatamessage' : true, 'loadingdatamsg' : true, + 'loadingicon' : true, 'filternullrecords' : true, 'spacing' : true, 'exportformat' : true, @@ -561,6 +562,9 @@ WM.module('wm.widgets.grid') case 'loadingdatamsg': $is.callDataGridMethod('option', 'dataStates.loading', newVal); break; + case 'loadingicon': + $is.callDataGridMethod('option', 'loadingicon', newVal); + break; case 'filternullrecords': if (CONSTANTS.isStudioMode) { $is.callDataGridMethod('option', 'filterNullRecords', newVal); From 788b896c92f7cd70dd6bf53e6b4ca005a09f8f87 Mon Sep 17 00:00:00 2001 From: Nikhilesh Date: Wed, 1 Feb 2017 18:34:09 +0530 Subject: [PATCH 033/334] Tree Widget: Fix for "Tree Widget datavalue is empty when nodeid is present". Change-Id: I9a218e87f3c035aeebdf08085097c7fc58275d97 --- .../scripts/modules/widgets/basic/tree/tree.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/basic/tree/tree.js b/src/main/webapp/scripts/modules/widgets/basic/tree/tree.js index 658ba8e22..ee5fd0d6a 100644 --- a/src/main/webapp/scripts/modules/widgets/basic/tree/tree.js +++ b/src/main/webapp/scripts/modules/widgets/basic/tree/tree.js @@ -59,7 +59,7 @@ WM.module('wm.widgets.basic') var $ul = WM.element('
    '), _iconClses = ICON_CLASSES[$is.treeicons || defaultTreeIconClass], - _expr = CONSTANTS.isRunMode ? $is.datavalue : undefined, + _expr = CONSTANTS.isRunMode ? ($is.binddatavalue ? $is.binddatavalue.replace('bind:', '') : $is.datavalue) : undefined, _iconCls, _cls; @@ -252,7 +252,9 @@ WM.module('wm.widgets.basic') path = '', $liPath, fn; - + if (!$li.length) { + return; + } $el.find('.selected').removeClass('selected'); $li.addClass('selected'); data = $li.data('nodedata'); @@ -280,7 +282,13 @@ WM.module('wm.widgets.basic') //if it is a click event update the datavalue and assign a watch as the previous watch will break after assigning if (target) { - $is.datavalue = WidgetUtilService.getEvaluatedData($is, data, {expressionName: 'nodeid'}); + if ($is.nodeid) { + $is.datavalue = $is.$eval($is.nodeid, data); + } else if ($is.bindnodeid) { + $is.datavalue = WidgetUtilService.getEvaluatedData($is, data, {expressionName: 'nodeid'}); + } else { + $is.datavalue = Utils.getClonedObject(data) || {}; + } $is.$watch('datavalue', function (newVal) { propertyChangeHandler($is, undefined, undefined, 'datavalue', newVal); }, true); @@ -345,6 +353,9 @@ WM.module('wm.widgets.basic') if (!attrs.widgetid && attrs.datavalue) { $is.$watch('datavalue', function (newVal) { + if (!newVal) { + return; + } onPropertyChange('datavalue', newVal); }, true); } From d2a0dfd817d2546e57811f74bfd00544a8c1c3c4 Mon Sep 17 00:00:00 2001 From: Uday Date: Wed, 1 Feb 2017 19:15:28 +0530 Subject: [PATCH 034/334] Removing jboss-transaction-api exclusion Change-Id: I1275f96ecc1a0ca47032586713163051e5183741 --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index bbe849403..6c32c1aa3 100644 --- a/pom.xml +++ b/pom.xml @@ -427,12 +427,6 @@ org.hibernate hibernate-entitymanager ${hibernate.version} - - - org.jboss.spec.javax.transaction - jboss-transaction-api_1.2_spec - - com.mchange From a456ecf8e70c9d5db9e2eaeb63a412f5fa57d347 Mon Sep 17 00:00:00 2001 From: Punith Date: Fri, 27 Jan 2017 19:11:15 +0530 Subject: [PATCH 035/334] LiveList : aligning loading message to center and allowing loading message and spinner icon to show up simultaneously. Change-Id: I164b98468d4bdb0a9cd6f856334832603ac11143 --- src/main/webapp/scripts/modules/widgets/base/Base.js | 2 +- .../webapp/scripts/modules/widgets/live/list/liveList.js | 2 +- src/main/webapp/styles/less/wm-widgets.less | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/base/Base.js b/src/main/webapp/scripts/modules/widgets/base/Base.js index 2a3dc8bd5..0eccf3daa 100644 --- a/src/main/webapp/scripts/modules/widgets/base/Base.js +++ b/src/main/webapp/scripts/modules/widgets/base/Base.js @@ -1770,7 +1770,7 @@ WM.module('wm.widgets.base', []) "showcount": {"type": "boolean", "show": false}, "disableitem": {"type": "boolean", "bindable": "in-bound", "value": false}, "ondemandmessage": {"type": "string", "bindable": "in-bound", "showPrettyExprInDesigner": true, "value": "Load More"}, - "loadingicon": {"type": "string", "widget": "select-icon", "bindable": "in-bound", "value": "", "pattern": classRegex}, + "loadingicon": {"type": "string", "widget": "select-icon", "bindable": "in-bound", "value": "fa fa-circle-o-notch", "pattern": classRegex}, "paginationclass": {"type": "string", "pattern": classRegex, "widget": "list-picker", "options": ["pagination-sm", "pagination-lg", "btn-default", "btn-primary", "btn-info", "btn-warning", "btn-success", "btn-danger", "btn-inverse", "btn-lg", "btn-sm", "btn-xs", "btn-raised", "btn-fab", "btn-link", "btn-transparent", "jumbotron"]} }, "wm.medialist": { diff --git a/src/main/webapp/scripts/modules/widgets/live/list/liveList.js b/src/main/webapp/scripts/modules/widgets/live/list/liveList.js index 58ed33b92..ec7840301 100644 --- a/src/main/webapp/scripts/modules/widgets/live/list/liveList.js +++ b/src/main/webapp/scripts/modules/widgets/live/list/liveList.js @@ -23,7 +23,7 @@ WM.module('wm.widgets.live') '
      ' + '
    ' + '
    {{nodatamessage}}
    ' + - '
    {{loadingdatamsg}}
    ' + + '
    {{loadingdatamsg}}
    ' + '
    ", + idxRow, + idxCol, + row; + for (idxRow = 0; idxRow < tableParams.rows; idxRow++) { + row = ""; + for (idxCol = 0; idxCol < tableParams.columns; idxCol++) { + row += ""; + } + table += row + ""; + } + return table + "
     
    "; + } + } + + //inserts the content into the rich text editor + function insertIntoTextEditor(scope, content) { + scope.$editor().wrapSelection('insertHtml', content); + } + + //sets the toolbar config to include new plugins + function setToolBarConfig(taOptions) { + toolbarConfig.insertTable = { + 'display': "
    " + + "
    ", + 'iconclass': 'fa fa-table', + 'tooltiptext': 'Insert table', + 'action': function (promise, restoreSelection) { + var backgroundPicker = _.get(this.$parent.tools, 'backgroundColor'), + fontColorPicker = _.get(this.$parent.tools, 'fontColor'), + watcher; + //close other colorpickers + if (_.get(backgroundPicker, 'isColorPickerOpen')) { + backgroundPicker.isOpen = false; + backgroundPicker.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + if (_.get(fontColorPicker, 'isColorPickerOpen')) { + fontColorPicker.isOpen = false; + fontColorPicker.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + //resume the editor selection after the popover closes. + watcher = this.$watch('popoverIsOpen', function (nv) { + if (!nv) { + watcher(); + restoreSelection(); + } + }); + return false; + }, + 'onSelect': function (result) { + this.$parent.popoverIsOpen = false; + insertIntoTextEditor(this, createTableMarkup(result)); + this.$root.$safeApply(this.$parent); + } + }; + toolbarConfig.fontColor = { + 'display': "
    " + + "
    ", + 'action': function (promise, restoreSelection) { + var backgroundPicker = _.get(this.$parent.tools, 'backgroundColor'), + tablePopover = _.get(this.$parent.tools, 'insertTable'); + if (_.get(backgroundPicker, 'isColorPickerOpen')) { + backgroundPicker.isOpen = false; + backgroundPicker.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + if (_.get(tablePopover, 'popoverIsOpen')) { + tablePopover.popoverIsOpen = false; + } + if (this.isOpen) { + this.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + this.isOpen = !this.isOpen; + if (!this.colorPicker || !this.colorPicker.foreColor) { + promise.resolve(); + return promise; + } + return this.$editor().wrapSelection('foreColor', this.colorPicker.foreColor); + } + }; + toolbarConfig.backgroundColor = { + 'display': "
    " + + "" + + "
    ", + 'action': function(promise, restoreSelection) { + var fontColorPicker = _.get(this.$parent.tools, 'fontColor'), + tablePopover = _.get(this.$parent.tools, 'insertTable'); + if (_.get(fontColorPicker, 'isColorPickerOpen')) { + fontColorPicker.isOpen = false; + fontColorPicker.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + if (_.get(tablePopover, 'popoverIsOpen')) { + tablePopover.popoverIsOpen = false; + } + if (this.isOpen) { + this.$element.find('.colorpicker').removeClass('colorpicker-visible'); + } + this.isOpen = !this.isOpen; + if (!this.colorPicker || !this.colorPicker.backColor) { + promise.resolve(); + return promise; + } + return this.$editor().wrapSelection('backColor', this.colorPicker.backColor); + } + }; + toolbarConfig.fontName = { + 'display': "
    " + + "" + + "
    ", + 'action': function (promise, restoreSelection) { + var font = this.font, + editor = this.$editor(), + $richTextEditor = editor.$parent.$element; + if (!font) { + return promise.resolve(); + } + this.font = undefined; + $richTextEditor.find('[contenteditable]').trigger('click'); + return this.$editor().wrapSelection('fontName', font); + }, + 'selectFont': function(event, font) { + this.$parent.font = font; + }, + 'options': [ + { name: 'Sans-Serif', css: 'Arial, Helvetica, sans-serif' }, + { name: 'Serif', css: "'times new roman', serif" },/* TODO: + { name: 'Wide', css: "'arial black', sans-serif" }, + { name: 'Narrow', css: "'arial narrow', sans-serif" }, + { name: 'Comic Sans MS', css: "'comic sans ms', sans-serif" },*/ + { name: 'Courier New', css: "'courier new', monospace" }, + { name: 'Garamond', css: 'garamond, serif' }, + { name: 'Georgia', css: 'georgia, serif' }, + { name: 'Tahoma', css: 'tahoma, sans-serif' },/* TODO: + { name: 'Trebuchet MS', css: "'trebuchet ms', sans-serif" }, + { name: "Helvetica", css: "'Helvetica Neue', Helvetica, Arial, sans-serif" }, + { name: 'Verdana', css: 'verdana, sans-serif' },*/ + { name: 'Proxima Nova', css: 'proxima_nova_rgregular' } + ] + }; + toolbarConfig.fontSize = { + 'display': "
    " + + "" + + "
    " + + "
    ", + 'action': function (promise, restoreSelection) { + var size = this.size, + editor = this.$editor(), + $richTextEditor = editor.$parent.$element; + if (!size) { + return promise.resolve(); + } + this.size = undefined; + $richTextEditor.find('[contenteditable]').trigger('click'); + return this.$editor().wrapSelection('fontSize', parseInt(size)); + }, + 'selectSize': function (event, size) { + this.$parent.size = size; + }, + 'options': [ + { name: 'xx-small', css: 'xx-small', value: 1 }, + { name: 'x-small', css: 'x-small', value: 2 }, + { name: 'small', css: 'small', value: 3 }, + { name: 'medium', css: 'medium', value: 4 }, + { name: 'large', css: 'large', value: 5 }, + { name: 'x-large', css: 'x-large', value: 6 }, + { name: 'xx-large', css: 'xx-large', value: 7 } + ] + }; + toolbarConfig.formatHeader = { + 'display': "
    ", + 'tooltiptext': 'Insert Style', + 'action': function (promise, restoreSelection) { + var format = this.format, + editor = this.$editor(), + $richTextEditor = editor.$parent.$element; + if (!format) { + return promise.resolve(); + } + this.format = undefined; + this.$editor().queryFormatBlockState(format.toLowerCase()); + $richTextEditor.find('[contenteditable]').trigger('click'); + return this.$editor().wrapSelection('formatBlock', '<' + format + '>'); + }, + 'selectFormat': function (event, format) { + this.$parent.format = format; + }, + 'setNodeName': function (el) { + var nodeName; + if (!el) { + this.nodeLabel = this.options.P; + } + nodeName = el.nodeName; + if (nodeName === 'FONT' || nodeName === '#text') { + el = _.get(el, 'parentNode'); + this.setNodeName(el); + } else if (_.includes(_.keys(this.options), nodeName)) { + this.nodeLabel = this.options[nodeName]; + } else { + this.nodeLabel = this.options.P; + } + }, + 'options': { + 'H1': 'Heading 1', + 'H2': 'Heading 2', + 'H3': 'Heading 3', + 'H4': 'Heading 4', + 'P' : 'Paragraph', + 'PRE': 'Pre-formatted' + }, + //activestate is triggered when the caret position changes or any operation is performed on editor, set the button text based on it + 'activeState': function () { + var rangeCount = window.getSelection().rangeCount, + currentEl = rangeCount ? _.get(window.getSelection().getRangeAt(0), 'startContainer') : ''; + + this.setNodeName(currentEl); + + this.$element.find('button span').text(this.nodeLabel); + this.$element.find('button').addClass('active'); + return true; + } + }; + + //set the key mappings for the tab and shift tab combinations when inside the table to perform cell navigation + taOptions.keyMappings = [{ + 'commandKeyCode': 'TabKey', + 'tableNodes': ['TR', 'TD', 'TABLE'], + 'addTableRow': function($el, columnLength) { + var columnTemplate = ' ', + row = WM.element(''); + for (var i =0; i'; + } + + html += ''; + } + + html += ''; + + html += '
    1 x 1
    '; + + return '
    ' + html + '
    '; + } + + function addRow($el) { + var html = '', + x; + + html += ''; + + for (x = 0; x < columnCount; x++) { + html += ''; + } + + html += ''; + + $el.find('table tbody').append(html); + + rowCount++; + } + + function deleteRow($el, y) { + $el.find('table tr:last').remove(); + rowCount--; + if ($el.find('table tr').length > minRows && y + 1 < minRows) { + deleteRow($el, y); + } + } + + function addColumn($el) { + var rows = $el.find('tr'); + + rows.each(function (index, row) { + var anchor = '', + newColEl = row.insertCell(columnCount); + WM.element(newColEl).append(anchor); + }); + + columnCount++; + } + + function deleteColumn($el, x) { + var rows = $el.find('tr'); + + rows.each(function (index, row) { + WM.element(row).find('td:last').remove(); + }); + columnCount--; + + if ($el.find('table tr:first td').length > minColumns && x + 1 < minColumns) { + deleteColumn($el, x); + } + } + + function selectGrid(tx, ty, control) { + var table = WM.element(control).find('table')[0], + x, + y, + focusCell, + cell, + active; + + table.nextSibling.innerHTML = (tx + 1) + ' x ' + (ty + 1); + + for (y = 0; y < rowCount; y++) { + for (x = 0; x < columnCount; x++) { + cell = table.rows[y].childNodes[x].firstChild; + active = x <= tx && y <= ty; + + if (active) { + WM.element(cell).addClass('editor-active'); + focusCell = cell; + } else { + WM.element(cell).removeClass('editor-active'); + } + } + } + + return focusCell.parentNode; + } + + return { + 'restrict': 'A', + 'replace': true, + 'scope': { + 'onSelect': '&' + }, + 'template': function() { + return generateTableGrid(); + }, + 'compile': function () { + return { + 'post': function ($is, $el, attrs) { + $el.on('mouseover', function (e) { + var target = e.target, x, y; + + if (target.tagName.toUpperCase() == 'A') { + x = parseInt(target.getAttribute('data-mce-x'), 10); + y = parseInt(target.getAttribute('data-mce-y'), 10); + + if (x !== this.lastX || y !== this.lastY) { + selectGrid(x, y, $el[0]); + this.lastX = x; + this.lastY = y; + } + //add new rows and columns when user mouseovers the last element + if (y >= minRows - 1 && y + 1 === rowCount) { + addRow($el); + } else if (y < rowCount && rowCount > minRows) { + deleteRow($el, y); + } + if (x >= minColumns - 1 && x + 1 === columnCount) { + addColumn($el); + } else if (x < columnCount && columnCount > minColumns) { + deleteColumn($el, x); + } + } + }); + + $el.on('click', function (e) { + var self = this; + + if (e.target.tagName.toUpperCase() == 'A') { + e.preventDefault(); + e.stopPropagation(); + $is.$parent.selectedRow = { + rows: self.lastY + 1, + columns: self.lastX + 1 + }; + if (WM.isFunction($is.onSelect)) { + $is.onSelect({ + rows: self.lastY + 1, + columns: self.lastX + 1 + }); + } + } + }); + + selectGrid(0, 0, $el[0]); + } + }; + } + }; + }]); /** diff --git a/src/main/webapp/styles/less/wm-widgets.less b/src/main/webapp/styles/less/wm-widgets.less index 0cc49bfb2..d9a6abf6f 100644 --- a/src/main/webapp/styles/less/wm-widgets.less +++ b/src/main/webapp/styles/less/wm-widgets.less @@ -2312,10 +2312,74 @@ If the height and width are not specified the video takes the height of the post font-size: @app-richtexteditor-font-size; padding: 0.33em 0.66em; float: left; + &.toolbar-plugin { + position: relative; + padding: 0!important; + &.colorpicker { + width:32px; + } + .colorpicker .dropdown-menu{ + min-width:auto; + } + .colorpicker-togglebtn { + width: 100%; + border-radius:0; + border-width: 0 0 4px 0; + } + &.fontname-plugin { + width:42px; + .font-list { + height: 350px; + overflow: scroll; + overflow-x: hidden; + } + } + &.formatheader-plugin { + width:auto; + .dropdown-toggle { + border:0; + } + .btn span { + width:100px; + display: inline-block; + } + } + .table-insert { + border:0; + } + &.fontname-plugin, &.formatheader-plugin { + .dropdown-menu { + .btn-default { + border: 0; + text-align:start; + width:100%; + padding:10px; + } + } + } + } } .btn-default[disabled] { pointer-events:none; } + .table-plugin-text { + text-align: center; + } + .editor-grid-border { + td { + padding:1px 0; + a { + padding:0 10px; + border:1px solid #d6d6d6; + width:13px; + height:13px; + &.editor-active { + border-color: #3498db; + background: #3498db; + } + } + } + } } } .btn { @@ -2341,6 +2405,14 @@ If the height and width are not specified the video takes the height of the post position: relative; max-width: 100%; } + td[contenteditable='true'] { + &:focus { + border: 2px rgba(128,128,128,0.5) solid; + } + } + .table { + table-layout: fixed; + } } } } From 753d6143f04dbfa248217eb4062cd64f08de0cb8 Mon Sep 17 00:00:00 2001 From: Nikhilesh Date: Fri, 17 Mar 2017 16:27:48 +0530 Subject: [PATCH 319/334] Calendar Widget: 1. (WMS-10758) Observing console error "scrollTop of undefined" while switching between markup and design when there is calendar widget 2. (WMS-10772) Calendar widget outbound property current view end date is wrong Change-Id: Ib8f282830d854906f5e54303af80fd486251b57f --- .../scripts/modules/widgets/advanced/calendar/calendar.js | 7 +++++-- src/main/webapp/scripts/modules/widgets/base/Base.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/advanced/calendar/calendar.js b/src/main/webapp/scripts/modules/widgets/advanced/calendar/calendar.js index dab1d1daa..f8c8f4601 100644 --- a/src/main/webapp/scripts/modules/widgets/advanced/calendar/calendar.js +++ b/src/main/webapp/scripts/modules/widgets/advanced/calendar/calendar.js @@ -161,7 +161,10 @@ WM.module('wm.widgets.advanced') eventSet.push(event); } }); - $is.eventSources.push(eventSet); + //as the calendar is not yet rendered, the fullcalendar tries to draw the events when events are bound. hence delay the event assignment. + $timeout(function () { + $is.eventSources.push(eventSet); + }); } } break; @@ -312,7 +315,7 @@ WM.module('wm.widgets.advanced') $is.onEventclick({$event: jsEvent, $data: event, $view: view}); } function viewRenderProxy(view) { - $is.currentview = {start: view.start.format(), end: view.end.format()}; + $is.currentview = {start: view.start.format(), end: view.end.subtract(1, 'days').format()}; $is.onViewrender({$view: view}); } function eventRenderProxy(event, jsEvent, view) { diff --git a/src/main/webapp/scripts/modules/widgets/base/Base.js b/src/main/webapp/scripts/modules/widgets/base/Base.js index c6432269d..113b5c010 100644 --- a/src/main/webapp/scripts/modules/widgets/base/Base.js +++ b/src/main/webapp/scripts/modules/widgets/base/Base.js @@ -536,7 +536,7 @@ WM.module('wm.widgets.base', []) "wm.calendar": { "backgroundcolor": {"type": "string", "widget": "color"}, "width": {"type": "string", "value": "100%", "pattern": dimensionRegex}, - "height": {"type": "string", "value": "500px", "pattern": dimensionRegex}, + "height": {"type": "string", "pattern": dimensionRegex}, "dataset": {"type": "array, object", "bindable": "in-bound", "widget": "string"}, "scopedataset": {"type": "string"}, "selectionmode": {"type": "list", "widget": "select-by-object", "value": "none", "options": [{"label": "None", "value": "none"}, {"label": "Single", "value": "single"}, {"label": "Multiple", "value": "multiple"}]}, From 3f96a06bacba1607f7aa9f40aa0c6c6603683b2f Mon Sep 17 00:00:00 2001 From: Dilip Date: Fri, 17 Mar 2017 12:17:46 +0530 Subject: [PATCH 320/334] 1. implemented get results by aggregations api. 2. Code generation changes to new api. Change-Id: I52504da8d9c8aab4c654bcab5b9efb143e70a696 --- .../runtime/data/dao/WMGenericDao.java | 5 +- .../runtime/data/dao/WMGenericDaoImpl.java | 24 ++- .../AbstractPaginatedQueryCallback.java | 72 ++++++++ .../dao/callbacks/AbstractQueryCallback.java | 35 ++++ .../dao/callbacks/NamedQueryCallback.java | 24 +-- .../PaginatedNamedQueryCallback.java | 61 +++---- .../callbacks/RuntimePaginatedCallback.java | 74 ++++++++ .../dao/callbacks/RuntimeQueryCallback.java | 43 +++++ .../runtime/data/dao/util/QueryHelper.java | 15 +- .../runtime/data/filter/WMQueryInfo.java | 5 + .../runtime/data/model/Aggregation.java | 74 ++++++++ .../runtime/data/model/AggregationInfo.java | 63 +++++++ .../runtime/data/model/AggregationType.java | 12 ++ .../runtime/data/util/HQLQueryUtils.java | 2 +- .../runtime/data/util/HqlQueryBuilder.java | 168 ++++++++++++++++++ .../runtime/data/util/HqlQueryHolder.java | 28 +++ 16 files changed, 650 insertions(+), 55 deletions(-) create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractPaginatedQueryCallback.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractQueryCallback.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimePaginatedCallback.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimeQueryCallback.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/Aggregation.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationInfo.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationType.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryBuilder.java create mode 100644 wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryHolder.java diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDao.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDao.java index aa4b8f5c2..51829b8f1 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDao.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDao.java @@ -5,7 +5,7 @@ * 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 + * 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, @@ -22,6 +22,7 @@ import com.wavemaker.runtime.data.export.ExportType; import com.wavemaker.runtime.data.expression.QueryFilter; +import com.wavemaker.runtime.data.model.AggregationInfo; import com.wavemaker.runtime.file.model.Downloadable; public interface WMGenericDao { @@ -48,5 +49,7 @@ public interface WMGenericDao { long count(String query); + Page> getAggregatedValues(final AggregationInfo aggregationInfo, Pageable pageable); + Downloadable export(ExportType exportType, String query, Pageable pageable); } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDaoImpl.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDaoImpl.java index c09619df1..35cb5d4f7 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDaoImpl.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/WMGenericDaoImpl.java @@ -5,7 +5,7 @@ * 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 + * 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, @@ -40,6 +40,8 @@ import org.springframework.orm.hibernate4.HibernateCallback; import org.springframework.orm.hibernate4.HibernateTemplate; +import com.wavemaker.commons.util.Tuple; +import com.wavemaker.runtime.data.dao.callbacks.RuntimePaginatedCallback; import com.wavemaker.runtime.data.dao.util.QueryHelper; import com.wavemaker.runtime.data.export.DataExporter; import com.wavemaker.runtime.data.export.ExportType; @@ -47,11 +49,13 @@ import com.wavemaker.runtime.data.expression.AttributeType; import com.wavemaker.runtime.data.expression.QueryFilter; import com.wavemaker.runtime.data.expression.Type; +import com.wavemaker.runtime.data.filter.WMQueryInfo; +import com.wavemaker.runtime.data.model.AggregationInfo; import com.wavemaker.runtime.data.util.CriteriaUtils; import com.wavemaker.runtime.data.util.HQLQueryUtils; +import com.wavemaker.runtime.data.util.HqlQueryBuilder; import com.wavemaker.runtime.file.model.DownloadResponse; import com.wavemaker.runtime.file.model.Downloadable; -import com.wavemaker.commons.util.Tuple; public abstract class WMGenericDaoImpl implements WMGenericDao { @@ -63,8 +67,9 @@ public abstract class WMGenericDaoImpl) genericSuperclass.getActualTypeArguments()[0]; @@ -244,4 +249,17 @@ public Long doInHibernate(Session session) throws HibernateException { } }); } + + @Override + public Page> getAggregatedValues( + final AggregationInfo aggregationInfo, final Pageable pageable) { + HqlQueryBuilder builder = new HqlQueryBuilder(entityClass); + builder.withAggregationInfo(aggregationInfo); + + final WMQueryInfo queryInfo = builder.build(); + String countQuery = QueryHelper.getCountQuery(queryInfo.getQuery(), false); + return getTemplate() + .execute(new RuntimePaginatedCallback(queryInfo.getQuery(), countQuery, queryInfo.getParameters(), + pageable)); + } } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractPaginatedQueryCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractPaginatedQueryCallback.java new file mode 100644 index 000000000..dd4e37e83 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractPaginatedQueryCallback.java @@ -0,0 +1,72 @@ +package com.wavemaker.runtime.data.dao.callbacks; + +import java.util.List; +import java.util.Map; + +import org.hibernate.HibernateException; +import org.hibernate.Query; +import org.hibernate.SQLQuery; +import org.hibernate.Session; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.orm.hibernate4.HibernateCallback; + +import com.google.common.base.Optional; +import com.wavemaker.runtime.data.dao.util.QueryHelper; +import com.wavemaker.runtime.data.spring.WMPageImpl; + +/** + * @author Dilip Kumar + * @since 16/3/17 + */ +public abstract class AbstractPaginatedQueryCallback implements HibernateCallback> { + + @Override + @SuppressWarnings("unchecked") + public Page doInHibernate(final Session session) throws HibernateException { + Query query = getQuery(session); + + final Class responseType = getReturnType(); + final Sort sort = getPageable().getSort(); + if (query instanceof SQLQuery) { + query = QueryHelper.createNewNativeQueryWithSorted(session, (SQLQuery) query, + responseType, sort); + } else { + query = QueryHelper.createNewHqlQueryWithSorted(session, query, responseType, sort); + } + QueryHelper.setResultTransformer(query, responseType); + QueryHelper.configureParameters(query, getParameters()); + + query.setFirstResult(getPageable().getOffset()); + query.setMaxResults(getPageable().getPageSize()); + + return new WMPageImpl((List) query.list(), getPageable(), findCount(session)); + } + + private Long findCount(final Session session) { + long count = Integer.MAX_VALUE; + final Optional optionalQuery = getCountQuery(session); + + if (optionalQuery.isPresent()) { + final Query query = optionalQuery.get(); + + QueryHelper.configureParameters(query, getParameters()); + + final Object result = query.uniqueResult(); + count = (result == null) ? 0 : ((Number) result).longValue(); + } + + return count; + } + + protected abstract Query getQuery(final Session session); + + protected abstract Optional getCountQuery(final Session session); + + protected abstract Map getParameters(); + + protected abstract Pageable getPageable(); + + protected abstract Class getReturnType(); +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractQueryCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractQueryCallback.java new file mode 100644 index 000000000..47271379f --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/AbstractQueryCallback.java @@ -0,0 +1,35 @@ +package com.wavemaker.runtime.data.dao.callbacks; + +import java.util.List; +import java.util.Map; + +import org.hibernate.HibernateException; +import org.hibernate.Query; +import org.hibernate.Session; +import org.springframework.orm.hibernate4.HibernateCallback; + +import com.wavemaker.runtime.data.dao.util.QueryHelper; + +/** + * @author Dilip Kumar + * @since 16/3/17 + */ +public abstract class AbstractQueryCallback implements HibernateCallback { + + @Override + @SuppressWarnings("unchecked") + public T doInHibernate(final Session session) throws HibernateException { + final Query query = getQuery(session); + QueryHelper.configureParameters(query, getParameters()); + QueryHelper.setResultTransformer(query, getReturnType()); + + final List list = query.list(); + return list.isEmpty() ? null : (T) list.get(0); + } + + protected abstract Query getQuery(final Session session); + + protected abstract Map getParameters(); + + protected abstract Class getReturnType(); +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/NamedQueryCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/NamedQueryCallback.java index 3407e9909..13ccf5a94 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/NamedQueryCallback.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/NamedQueryCallback.java @@ -15,21 +15,18 @@ */ package com.wavemaker.runtime.data.dao.callbacks; -import java.util.List; +import java.util.Map; -import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; -import org.springframework.orm.hibernate4.HibernateCallback; -import com.wavemaker.runtime.data.dao.util.QueryHelper; import com.wavemaker.runtime.data.model.QueryInfo; /** * @author Dilip Kumar * @since 15/11/16 */ -public class NamedQueryCallback implements HibernateCallback { +public class NamedQueryCallback extends AbstractQueryCallback { private final QueryInfo queryInfo; @@ -38,15 +35,18 @@ public NamedQueryCallback(final QueryInfo queryInfo) { } @Override - @SuppressWarnings("unchecked") - public T doInHibernate(final Session session) throws HibernateException { - final Query namedQuery = session.getNamedQuery(queryInfo.getQueryName()); - QueryHelper.configureParameters(namedQuery, queryInfo.getParams()); - QueryHelper.setResultTransformer(namedQuery, queryInfo.getReturnClass()); + protected Query getQuery(final Session session) { + return session.getNamedQuery(queryInfo.getQueryName()); + } + @Override + protected Map getParameters() { + return queryInfo.getParams(); + } - final List list = namedQuery.list(); - return list.isEmpty() ? null : (T) list.get(0); + @Override + protected Class getReturnType() { + return queryInfo.getReturnClass(); } } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/PaginatedNamedQueryCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/PaginatedNamedQueryCallback.java index 94c5853fe..26c103197 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/PaginatedNamedQueryCallback.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/PaginatedNamedQueryCallback.java @@ -15,28 +15,23 @@ */ package com.wavemaker.runtime.data.dao.callbacks; -import java.util.List; +import java.util.Map; -import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.Query; -import org.hibernate.SQLQuery; import org.hibernate.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Sort; -import org.springframework.orm.hibernate4.HibernateCallback; +import org.springframework.data.domain.Pageable; -import com.wavemaker.runtime.data.dao.util.QueryHelper; +import com.google.common.base.Optional; import com.wavemaker.runtime.data.model.PageableQueryInfo; -import com.wavemaker.runtime.data.spring.WMPageImpl; /** * @author Dilip Kumar * @since 15/11/16 */ -public class PaginatedNamedQueryCallback implements HibernateCallback> { +public class PaginatedNamedQueryCallback extends AbstractPaginatedQueryCallback { private static final Logger LOGGER = LoggerFactory.getLogger(PaginatedNamedQueryCallback.class); @@ -47,37 +42,37 @@ public PaginatedNamedQueryCallback(final PageableQueryInfo queryInfo) { } @Override - @SuppressWarnings("unchecked") - public Page doInHibernate(final Session session) throws HibernateException { - Query namedQuery = session.getNamedQuery(queryInfo.getQueryName()); - - final Class responseType = queryInfo.getReturnClass(); - final Sort sort = queryInfo.getPageable().getSort(); - if (namedQuery instanceof SQLQuery) { - namedQuery = QueryHelper.createNewNativeQueryWithSorted(session, (SQLQuery) namedQuery, - responseType, sort); - } else { - namedQuery = QueryHelper.createNewHqlQueryWithSorted(session, namedQuery, responseType, sort); - } - QueryHelper.setResultTransformer(namedQuery, responseType); - QueryHelper.configureParameters(namedQuery, queryInfo.getParams()); - - namedQuery.setFirstResult(queryInfo.getPageable().getOffset()); - namedQuery.setMaxResults(queryInfo.getPageable().getPageSize()); - - return new WMPageImpl((List) namedQuery.list(), queryInfo.getPageable(), findCount(session)); + protected Query getQuery(final Session session) { + return session.getNamedQuery(queryInfo.getQueryName()); } - private long findCount(Session session) { + @Override + protected Optional getCountQuery(final Session session) { + Optional optionalQuery = Optional.absent(); + try { final Query countQuery = session.getNamedQuery(queryInfo.getQueryName() + "__count"); - QueryHelper.configureParameters(countQuery, queryInfo.getParams()); - final Object result = countQuery.uniqueResult(); - return result == null ? 0 : ((Number) result).longValue(); + optionalQuery = Optional.of(countQuery); } catch (MappingException e) { LOGGER.debug("Count query not configured, returning max count, ERROR:{} ", e.getMessage()); - return Integer.MAX_VALUE; } + + return optionalQuery; + } + + @Override + protected Map getParameters() { + return queryInfo.getParams(); + } + + @Override + protected Pageable getPageable() { + return queryInfo.getPageable(); + } + + @Override + protected Class getReturnType() { + return queryInfo.getReturnClass(); } } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimePaginatedCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimePaginatedCallback.java new file mode 100644 index 000000000..735e357b3 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimePaginatedCallback.java @@ -0,0 +1,74 @@ +package com.wavemaker.runtime.data.dao.callbacks; + +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.hibernate.Query; +import org.hibernate.Session; +import org.springframework.data.domain.Pageable; + +import com.google.common.base.Optional; + +import static com.wavemaker.runtime.data.dao.util.QueryHelper.createQuery; + +/** + * @author Dilip Kumar + * @since 16/3/17 + */ +public class RuntimePaginatedCallback extends AbstractPaginatedQueryCallback> { + + private String query; + private String countQuery; + private Map parameters; + private Pageable pageable; + + private boolean isNative; + + public RuntimePaginatedCallback( + final String query, final String countQuery, final Map parameters, + final Pageable pageable) { + this.query = query; + this.countQuery = countQuery; + this.parameters = parameters; + this.pageable = pageable; + } + + public RuntimePaginatedCallback( + final String query, final String countQuery, final Map parameters, + final Pageable pageable, final boolean isNative) { + this.query = query; + this.countQuery = countQuery; + this.parameters = parameters; + this.pageable = pageable; + this.isNative = isNative; + } + + @Override + protected Query getQuery(final Session session) { + return createQuery(session, isNative, query); + } + + @Override + protected Optional getCountQuery(final Session session) { + if (StringUtils.isBlank(countQuery)) { + return Optional.absent(); + } else { + return Optional.of(createQuery(session, isNative, countQuery)); + } + } + + @Override + protected Map getParameters() { + return parameters; + } + + @Override + protected Pageable getPageable() { + return pageable; + } + + @Override + protected Class getReturnType() { + return Map.class; + } +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimeQueryCallback.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimeQueryCallback.java new file mode 100644 index 000000000..51133f972 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/callbacks/RuntimeQueryCallback.java @@ -0,0 +1,43 @@ +package com.wavemaker.runtime.data.dao.callbacks; + +import java.util.Map; + +import org.hibernate.Query; +import org.hibernate.Session; + +/** + * @author Dilip Kumar + * @since 16/3/17 + */ +public class RuntimeQueryCallback extends AbstractQueryCallback> { + + private String query; + private Map parameters; + private boolean isNative; + + public RuntimeQueryCallback(final String query, final Map parameters) { + this.query = query; + this.parameters = parameters; + } + + public RuntimeQueryCallback(final String query, final Map parameters, final boolean isNative) { + this.query = query; + this.parameters = parameters; + this.isNative = isNative; + } + + @Override + protected Query getQuery(final Session session) { + return isNative ? session.createSQLQuery(query) : session.createQuery(query); + } + + @Override + protected Map getParameters() { + return parameters; + } + + @Override + protected Class getReturnType() { + return Map.class; + } +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/util/QueryHelper.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/util/QueryHelper.java index f9c919140..5ec816c64 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/util/QueryHelper.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/dao/util/QueryHelper.java @@ -140,7 +140,7 @@ private static void configureNamedParameter( public static String arrangeForSort(String queryStr, Sort sort, boolean isNative, Dialect dialect) { if (isNative && sort != null) { final Iterator iterator = sort.iterator(); - StringBuffer queryWithOrderBy = new StringBuffer(ORDER_BY_QUERY_TEMPLATE.replace("{0}", queryStr)); + StringBuilder queryWithOrderBy = new StringBuilder(ORDER_BY_QUERY_TEMPLATE.replace("{0}", queryStr)); int count = 0; while (iterator.hasNext()) { Sort.Order order = iterator.next(); @@ -149,7 +149,7 @@ public static String arrangeForSort(String queryStr, Sort sort, boolean isNative .name(); queryWithOrderBy.append(count == 0 ? ORDER_BY : ORDER_PROPERTY_SEPARATOR); final String quotedParam = dialect.quote(quoteWithBackTick(order.getProperty())); - queryWithOrderBy.append(quotedParam + EMPTY_SPACE + direction); + queryWithOrderBy.append(quotedParam).append(EMPTY_SPACE).append(direction); count++; } } @@ -164,7 +164,7 @@ public static String quoteWithBackTick(final String str) { } if (str.charAt(0) != '`') { - return new StringBuilder().append(BACK_TICK).append(str).append(BACK_TICK).toString(); + return BACK_TICK + str + BACK_TICK; } return str; @@ -176,6 +176,11 @@ public static void setResultTransformer(Query query, Class type) { } } + public static Query createQuery(final Session session, final boolean isNative, final String query) { + return (isNative) ? session.createSQLQuery(query) : session.createQuery(query); + } + + public static Long getQueryResultCount( String queryStr, Map params, boolean isNative, HibernateTemplate template) { return getCountFromCountStringQuery(queryStr, params, isNative, template); @@ -306,14 +311,14 @@ public static Query createQuery( public static SQLQuery createNativeQuery(String queryString, Map params, final Session session) { SQLQuery sqlQuery = session.createSQLQuery(queryString); - QueryHelper.setResultTransformer(sqlQuery, Object.class); + QueryHelper.setResultTransformer(sqlQuery, Map.class); QueryHelper.configureParameters(sqlQuery, params); return sqlQuery; } public static Query createHQLQuery(String queryString, Map params, final Session session) { Query hqlQuery = session.createQuery(queryString); - QueryHelper.setResultTransformer(hqlQuery, Object.class); + QueryHelper.setResultTransformer(hqlQuery, Map.class); QueryHelper.configureParameters(hqlQuery, params); return hqlQuery; } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/filter/WMQueryInfo.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/filter/WMQueryInfo.java index 31c2f8b7f..b665b20f2 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/filter/WMQueryInfo.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/filter/WMQueryInfo.java @@ -32,6 +32,11 @@ public WMQueryInfo(final String query) { this.parameters = new HashMap<>(); } + public WMQueryInfo(final String query, final Map parameters) { + this.query = query; + this.parameters = parameters; + } + public String getQuery() { return query; } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/Aggregation.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/Aggregation.java new file mode 100644 index 000000000..8db5ec663 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/Aggregation.java @@ -0,0 +1,74 @@ +package com.wavemaker.runtime.data.model; + +import java.util.Objects; + +/** + * @author Dilip Kumar + * @since 15/3/17 + */ +public class Aggregation { + private String field; + private AggregationType type; + private String alias; + + public Aggregation() { + } + + public Aggregation(final String field, final AggregationType type, final String alias) { + this.field = field; + this.type = type; + this.alias = alias; + } + + public String getField() { + return field; + } + + public void setField(final String field) { + this.field = field; + } + + public AggregationType getType() { + return type; + } + + public void setType(final AggregationType type) { + this.type = type; + } + + public String getAlias() { + return alias; + } + + public void setAlias(final String alias) { + this.alias = alias; + } + + public String asSelection() { + return type.name() + "(" + field + ") as " + alias; + } + + @Override + public String toString() { + return "Aggregation{" + + "field='" + field + '\'' + + ", type=" + type + + ", alias='" + alias + '\'' + + '}'; + } + + @Override + public boolean equals(final Object o) { + if (this == o) return true; + if (!(o instanceof Aggregation)) return false; + final Aggregation that = (Aggregation) o; + return Objects.equals(getField(), that.getField()) && + Objects.equals(getType(), that.getType()) && + Objects.equals(getAlias(), that.getAlias()); + } + + @Override + public int hashCode() { + return Objects.hash(getField(), getType(), getAlias()); + } +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationInfo.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationInfo.java new file mode 100644 index 000000000..737399163 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationInfo.java @@ -0,0 +1,63 @@ +package com.wavemaker.runtime.data.model; + +import java.util.List; +import java.util.Objects; + +/** + * @author Dilip Kumar + * @since 15/3/17 + */ +public class AggregationInfo { + + private List groupByFields; + private List aggregations; + private String filter; + + public List getGroupByFields() { + return groupByFields; + } + + public void setGroupByFields(final List groupByFields) { + this.groupByFields = groupByFields; + } + + public List getAggregations() { + return aggregations; + } + + public void setAggregations(final List aggregations) { + this.aggregations = aggregations; + } + + public String getFilter() { + return filter; + } + + public void setFilter(final String filter) { + this.filter = filter; + } + + @Override + public boolean equals(final Object o) { + if (this == o) return true; + if (!(o instanceof AggregationInfo)) return false; + final AggregationInfo that = (AggregationInfo) o; + return Objects.equals(getGroupByFields(), that.getGroupByFields()) && + Objects.equals(getAggregations(), that.getAggregations()) && + Objects.equals(getFilter(), that.getFilter()); + } + + @Override + public int hashCode() { + return Objects.hash(getGroupByFields(), getAggregations(), getFilter()); + } + + @Override + public String toString() { + return "AggregationInfo{" + + "groupByFields=" + groupByFields + + ", aggregations=" + aggregations + + ", filter='" + filter + '\'' + + '}'; + } +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationType.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationType.java new file mode 100644 index 000000000..6b669c5f6 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/model/AggregationType.java @@ -0,0 +1,12 @@ +package com.wavemaker.runtime.data.model; + +/** + * @author Dilip Kumar + * @since 15/3/17 + */ +public enum AggregationType { + SUM, + MIN, + MAX; + +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HQLQueryUtils.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HQLQueryUtils.java index 5b1240589..7c7e7f467 100644 --- a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HQLQueryUtils.java +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HQLQueryUtils.java @@ -162,7 +162,7 @@ private static WMQueryInfo buildHQL(String entityClass, String query, Pageable p return queryInfo; } - private static boolean isSortAppliedOnPageable(Pageable pageable) { + public static boolean isSortAppliedOnPageable(Pageable pageable) { return (pageable != null) && (pageable.getSort() != null); } } diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryBuilder.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryBuilder.java new file mode 100644 index 000000000..c72f85b6c --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryBuilder.java @@ -0,0 +1,168 @@ +package com.wavemaker.runtime.data.util; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Pageable; + +import com.wavemaker.runtime.data.filter.LegacyQueryFilterInterceptor; +import com.wavemaker.runtime.data.filter.QueryInterceptor; +import com.wavemaker.runtime.data.filter.WMQueryFunctionInterceptor; +import com.wavemaker.runtime.data.filter.WMQueryInfo; +import com.wavemaker.runtime.data.model.Aggregation; +import com.wavemaker.runtime.data.model.AggregationInfo; + +/** + * @author Dilip Kumar + * @since 15/3/17 + */ +public class HqlQueryBuilder { + + private static final List interceptors = Arrays.asList( + new LegacyQueryFilterInterceptor(), + new WMQueryFunctionInterceptor()); + + private List fields; + private String distinctField; + private List groupByFields; + + private List aggregations; + + private String filter; + private Pageable pageable; + + private final Class entityClass; + + public HqlQueryBuilder(final Class entityClass) { + this.entityClass = entityClass; + + } + + public HqlQueryBuilder withFields(final List fields) { + this.fields = fields; + return this; + } + + public HqlQueryBuilder withDistinctFields(final String distinctField) { + this.distinctField = distinctField; + return this; + } + + public HqlQueryBuilder withGroupByFields(final List groupByFields) { + this.groupByFields = groupByFields; + return this; + } + + public HqlQueryBuilder withAggregations(final List aggregations) { + this.aggregations = aggregations; + return this; + } + + public HqlQueryBuilder withFilter(final String filter) { + this.filter = filter; + return this; + } + + public HqlQueryBuilder withPageable(final Pageable pageable) { + this.pageable = pageable; + return this; + } + + public HqlQueryBuilder withAggregationInfo(AggregationInfo aggregationInfo) { + withGroupByFields(aggregationInfo.getGroupByFields()) + .withAggregations(aggregationInfo.getAggregations()) + .withFilter(aggregationInfo.getFilter()); + return this; + } + + public WMQueryInfo build() { + StringBuilder builder = new StringBuilder(); + Map parameters = new HashMap<>(); + + final String projections = generateProjections(); + + if (StringUtils.isNotBlank(projections)) { + builder.append("select ") + .append(projections) + .append(" "); + } + + builder.append("from ") + .append(entityClass.getCanonicalName()) + .append(" "); + + if (StringUtils.isNotBlank(filter)) { + final WMQueryInfo queryInfo = interceptFilter(filter); + builder.append("where ") + .append(queryInfo.getQuery()) + .append(" "); + parameters = queryInfo.getParameters(); + } + + if (CollectionUtils.isNotEmpty(groupByFields)) { + builder.append("group by ") + .append(StringUtils.join(groupByFields, ",")) + .append(" "); + } + + /* if (HQLQueryUtils.isSortAppliedOnPageable(pageable)) { + builder.append(HQLQueryUtils.buildOrderByClause(pageable.getSort())); + }*/ +/* + Query hqlQuery = session.createQuery(builder.toString()); + + if (pageable != null) { + hqlQuery.setFirstResult(pageable.getOffset()); + hqlQuery.setMaxResults(pageable.getPageSize()); + } + + return new HqlQueryHolder(hqlQuery, parameters);*/ + + return new WMQueryInfo(builder.toString(), parameters); + } + + private String generateProjections() { + List projections = new ArrayList<>(); + + if (StringUtils.isNotEmpty(distinctField)) { + projections.add("distinct(" + distinctField + ") as " + cleanAlias(distinctField)); + } + + if (CollectionUtils.isNotEmpty(fields)) { + projections.addAll(fields); + } + + if (CollectionUtils.isNotEmpty(groupByFields)) { + for (final String field : groupByFields) { + projections.add(field + " as " + cleanAlias(field)); + } + } + + if (CollectionUtils.isNotEmpty(aggregations)) { + for (final Aggregation aggregation : aggregations) { + projections.add(aggregation.asSelection()); + } + } + + return StringUtils.join(projections, ","); + } + + private String cleanAlias(String alias) { + return alias.replaceAll("\\.", "\\$"); + } + + private WMQueryInfo interceptFilter(String filter) { + WMQueryInfo queryInfo = new WMQueryInfo(filter); + + for (final QueryInterceptor interceptor : interceptors) { + interceptor.intercept(queryInfo); + } + + return queryInfo; + } +} diff --git a/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryHolder.java b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryHolder.java new file mode 100644 index 000000000..7a5743d90 --- /dev/null +++ b/wavemaker-app-runtime-core/src/main/java/com/wavemaker/runtime/data/util/HqlQueryHolder.java @@ -0,0 +1,28 @@ +package com.wavemaker.runtime.data.util; + +import java.util.Map; + +import org.hibernate.Query; + +/** + * @author Dilip Kumar + * @since 15/3/17 + */ +public class HqlQueryHolder { + + private final Query query; + private final Map parameters; + + public HqlQueryHolder(final Query query, final Map parameters) { + this.query = query; + this.parameters = parameters; + } + + public Query getQuery() { + return query; + } + + public Map getParameters() { + return parameters; + } +} From d973f2f3f46d71f491fc45000a7467bc7a909174 Mon Sep 17 00:00:00 2001 From: Sudheer Date: Fri, 17 Mar 2017 15:01:07 +0530 Subject: [PATCH 321/334] Enable 'closable' property for dialog widgets Change-Id: I791c59d104244377740976244ba87c3f9b32a4f2 --- src/main/webapp/scripts/modules/widgets/base/Base.js | 6 +++--- .../modules/widgets/dialog/alertdialog/alertdialog.js | 2 +- .../modules/widgets/dialog/confirmdialog/confirmdialog.js | 2 +- .../modules/widgets/dialog/logindialog/logindialog.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/scripts/modules/widgets/base/Base.js b/src/main/webapp/scripts/modules/widgets/base/Base.js index 113b5c010..36102f535 100644 --- a/src/main/webapp/scripts/modules/widgets/base/Base.js +++ b/src/main/webapp/scripts/modules/widgets/base/Base.js @@ -877,7 +877,7 @@ WM.module('wm.widgets.base', []) "iconmargin": {"type": "string", "pattern": dimensionRegex}, "actiontitle": {"type": "string", "show": false, "pattern": dimensionRegex}, "actionlink": {"type": "string", "show": false, "pattern": dimensionRegex}, - "closable": {"type": "boolean", "show": false}, + "closable": {"type": "boolean", "show": true, "value": true}, "contentclass": {"type": "string", "pattern": classRegex, "show": false} }, "wm.dialog.dialogheader": { @@ -886,7 +886,7 @@ WM.module('wm.widgets.base', []) "iconwidth": {"type": "string", "pattern": dimensionRegex}, "iconheight": {"type": "string", "pattern": dimensionRegex}, "iconmargin": {"type": "string", "pattern": dimensionRegex}, - "closable": {"type": "boolean", "show": false} + "closable": {"type": "boolean", "show": true, "value": true} }, "wm.dialog.onOk": { "onOk": {"type": "event", "options": widgetEventOptions, "widget": "eventlist"} @@ -939,7 +939,7 @@ WM.module('wm.widgets.base', []) "tabindex": {"show": false}, "height": {"type": "string", "show": false, "pattern": dimensionRegex}, "onClose": {"type": "event", "options": widgetEventOptions, "widget": "eventlist"}, - "closable": {"type": "boolean", "value": true}, + "closable": {"type": "boolean", "value": false, "show": false}, "modal": {"type": "boolean", "value": true}, "keyboard": {"type": "boolean", "value": true}, "onSubmit": {"type": "event", "options": widgetEventOptions, "widget": "eventlist"}, diff --git a/src/main/webapp/scripts/modules/widgets/dialog/alertdialog/alertdialog.js b/src/main/webapp/scripts/modules/widgets/dialog/alertdialog/alertdialog.js index 271e2aadb..b8066f57f 100644 --- a/src/main/webapp/scripts/modules/widgets/dialog/alertdialog/alertdialog.js +++ b/src/main/webapp/scripts/modules/widgets/dialog/alertdialog/alertdialog.js @@ -7,7 +7,7 @@ WM.module('wm.widgets.dialog') $templateCache.put("template/widget/dialog/alertdialog.html", '