Commit Graph
47 Commits
Author SHA1 Message Date
Wiebke Pätzold 5b1552cfef Improved: Convert ContentPermissionServices.xml mini lang to groovy
(OFBIZ-11446)

Also change the reference in DataResourcePermissionServices.xml for checkOwnership
2021-09-19 20:06:17 +02:00
Nicolas Malin 85c6220298 Improved: Convert updateSimpleTextContent service from mini-lang to groovy DSL (OFBIZ-11375)
Thanks to vivek singh bisen for initiate the patch
2021-09-14 14:50:52 +02:00
Nicolas Malin 46d53b513e Improved: Convert findAssocContent service from mini-lang to groovy DSL (OFBIZ-11369)
Thanks to Prakhar Kumar
2021-09-14 14:24:22 +02:00
Nicolas Malin dfb75fbcc7 Improved: Convert createSimpleTextContent service from mini-lang to groovy DSL (OFBIZ-11374)
Thanks to Sourabh Punyani
2021-09-14 14:04:41 +02:00
Nicolas Malin 92d3625153 Fixed: remove unnecessary quote on groovy map 2021-08-18 09:10:39 +02:00
Nicolas Malin bdd5673fe2 Fixed: Clean groovy file ContentServices.groovy
No functional change :
 * remove case syntax
 * use OFBiz dsl
 * condense map creation, entityCondition by builder
 * add typage to help ide and compilation

Fixed to bad engine on service createDownloadContent and updateDownloadContent after the minilang to groovy migration
2021-08-17 17:45:45 +02:00
Benjamin Jugl f5788b2a81 Improved: Converts DataServices.xml to Groovy. (OFBIZ-11469) 2021-02-01 17:08:46 +01:00
Pawan Verma 568fa2c173 Improved: Convert updateSingleContentPurpose service from mini-lang to groovy DSL(OFBIZ-11367)
Thanks: Devanshu for report and Sourabh for the patch.
2020-08-22 10:44:02 +05:30
Pawan Verma 7799673fa3 Improved: Convert createEmailContent service from mini-lang to groovy DSL(OFBIZ-11370)
Thanks, Devanshu for the report and Rohit for initial patch and Nicolas for updated patch and review.
2020-07-18 22:25:55 +05:30
Pawan Verma 904491ede1 Improved: Convert indexContentKeywords and forceIndexContentKeywords services from miniland to groovy(OFBIZ-11390)(OFBIZ-11392)
Thanks, Devanshu for report and Sourabh and Aishwary for the patch.
2020-07-18 22:11:32 +05:30
Pawan Verma 22bb77ebc6 Improved: Convert updateCommContentDataResource service from mini-lang to groovy DSL(OFBIZ-11379)
Thanks, Devanshu for the report, Sourabh for the initial patch and Nicolas for the updated patch.
2020-07-18 14:21:33 +05:30
Suraj Khurana ad586a1c14 Improved: Converted deleteContentKeywords service from mini-lang to groovy DSL.
(OFBIZ-11391)
Thanks Devanshu Vyas for reporting and Yogesh Naroliya for the patch.
2020-07-04 15:12:14 +05:30
Suraj Khurana 9223d40204 Improved: Converted createContentFromDataResource service from mini-lang to groovy DSL.
(OFBIZ-11377)
Thanks Devanshu Vyas for reporting and Anushi Gupta for the patch.
2020-07-04 14:53:12 +05:30
Suraj Khurana 84f82a44d1 Improved: Converted getContentAndDataResource service from mini-lang to groovy DSL.
(OFBIZ-11382)
Thanks Devanshu Vyas for reporting and Ravi Lodhi for the patch.
2020-07-04 14:44:29 +05:30
Pawan Verma 9e97730288 Improved: Convert getDataResource service from mini-lang to groovy DSL(OFBIZ-11381)
Thanks: Devanshu for report and Kirti for the patch.
2020-07-01 16:02:33 +05:30
Priya SharmaandPriya Sharma 5a144c0bed Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779)
Co-authored-by: Priya Sharma <priya.sharma@hotwaxsystems.com>
2020-06-28 01:24:32 +05:30
Priya SharmaandPriya Sharma 15aec7e8f7 WIP: [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#185)
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug
- Replaced the debug.log methods with the respective groovy utility method
- Enhanced the GroovyBaseScript to entertain the fetch the current class name as the module name for logging
- Overloaded the logError method to entertain throwbale object for better logging
- Removed unused import statements and module variables.

(OFBIZ-11762)

* [Removed]: Extra line spaces. (OFBIZ-11762)

* [Revert]: Unwanted changes. (OFBIZ-11762)

* [Added] Same changes to these files. (OFBIZ-11762)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-06-06 10:17:23 +02:00
c8a7c7dd23 Fixed: Create Payment service throws an exception when receiving payment on order (OFBIZ-11754) (#166)
* [Fixed] Create Payment service throws exception when receiving payment on order
- Since the MODULE variable could not be found, the service was throwing error
- Instead used the groovy method directly to print the log instead, which has access to the module variable implicitly.
- Removed the unused import as Debug class is not longer needed here.

(OFBIZ-11754)

* [Improved] The content groovy services to avoid the error in case we try to log a detail, since the module variable is not found. (OFBIZ-11754)

* Update ContentServices.groovy

* [Improved] Added error logs instead of info logs for service excpetions logging. (OFBIZ-11754)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
Co-authored-by: Suraj Khurana <64310724+surajkhurana@users.noreply.github.com>
2020-05-30 11:53:53 +02:00
Suraj Khurana 7aa3db4c45 Improved: Converted createDownloadContent,updateDownloadContent services from mini-lang to groovy.
(OFBIZ-11372)(OFBIZ-11373)
Thanks Devanshu Vyas for reporting, Harman Kaur and Rahul for initial patch, Pawan for review.
2020-05-25 13:37:16 +05:30
Mridul Pathak f9a05c8e30 Improved: Convert setContentStatus service from mini-lang to groovy DSL(OFBIZ-11365). Thanks Devanshu Vyas for the contribution. 2020-05-23 18:12:13 +05:30
Jacques Le Roux 11905d82f5 Improved: Convert deactivateAllContentRoles service from mini-lang to groovy DSL
(OFBIZ-11366)

jleroux: I had to slightly rewrite the patch, mostly the Groovy part (see
comment in Jira)

Thanks: Devanshu Vyas for the initial patch
2020-05-18 13:25:35 +02:00
Priya SharmaandPriya Sharma 6495dc7a91 Improved: Convert createArticleContent service from mini-lang to groovy (#140)
Deleted the old mini-lang service file
Updated the service definitions with the new groovy methods
Added the groovy implementation (with minor enhancement)

(OFBIZ-11383)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-05-17 10:54:16 +02:00
Pawan Verma e9664e94c4 Improved: Convert updateEmailContent service from mini-lang to groovy DSL
(OFBIZ-11371)

Thanks: Devanshu Vyas for report and Anushi Gupta for the patch.
2020-05-04 15:45:33 +05:30
Jacques Le Roux 200c0e85fc Implemented: Convert createContentAlternativeUrl service from mini-lang to Groovy
(OFBIZ-11389)

Thanks:  Priya Sharma for patch and  Pawan Verma for review
2020-04-19 09:48:24 +02:00
Nicolas Malin 27aa23833c Improved: Convert createTextAndUploadedContent service from mini-lang to groovy DSL
(OFBIZ-11368)

Thanks to Rohit Hukkeri for providing the patch
2020-03-06 14:58:15 +01:00
Mathieu Lirzin 9b68a55d64 Improved: Compile groovy integration tests
(OFBIZ-11165)

Since there is no need for dynamic reload for integration tests,
it is better to compile Groovy tests.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865786 13f79535-47bb-0310-9956-ffa450edef68
2019-08-23 18:00:01 +00:00
Suraj Khurana 922ca2d1a6 Added: Unit test case for service - getDataResource.
(OFBIZ-8423)
Thanks Tanmay Muley for reporting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856597 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 05:43:33 +00:00
Deepak Dixit d01361303c Improved: Reorganize import
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835954 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 08:46:54 +00:00
Deepak Dixit 092a5cc390 Fixed: Missing Import in CmsEditAddPrep.groovy
(OFBIZ-10475)

Applied slightly modified patch, Thanks Dennis Balkir for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835953 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 08:45:35 +00:00
Jacques Le Roux dbab78e671 Improved: no functional change, removes unneeded log info (missed it previously)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835383 13f79535-47bb-0310-9956-ffa450edef68
2018-07-09 08:25:48 +00:00
Jacques Le Roux 04d398d97b Improved: no functional change, removes unneeded log info
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835382 13f79535-47bb-0310-9956-ffa450edef68
2018-07-09 08:24:19 +00:00
Jacques Le Roux e9e0158458 Fixed: Template edit are not working correctly
(OFBIZ-9830)

jleroux: just noticed after r1811559  that the mimeTypeId was not used

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811564 13f79535-47bb-0310-9956-ffa450edef68
2017-10-09 12:34:19 +00:00
Jacques Le Roux fe38302313 Fixed: Template edit are not working correctly
(OFBIZ-9830)

Steps to recreate:
1. Go to ContentManager.
2. Go to Template.
3. Click Find, then click LEFTBAR in the search result.
4. Click Edit, then we get a error page.

Thanks: fumiyoshi.to

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811559 13f79535-47bb-0310-9956-ffa450edef68
2017-10-09 12:23:04 +00:00
Deepak Dixit ea5d994b78 Improved: Content : Remove unused imports from groovy files for code optimization.(OFBIZ-8487)
Thanks Suraj Khurana and Pradeep Choudhary for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806264 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 07:21:00 +00:00
Deepak Dixit dea31737ea Fixed: Moved SurveyOptions.ftl in correct location.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801364 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 10:03:41 +00:00
Jacques Le Roux ec2f674a92 Improved: EntityListIterator closed but not in case of exception
(OFBIZ-9385)

This is an improvement only because no cases were reported. But obviously in 
case of unlucky exception after the EntityListIterator creation and before it's 
closed the EntityListIterator remains in memory. 
It should be closed in EntityListIterator.finalize() but the less happens there 
the better.

I noticed Groovy has no try-with-ressources statement. I put a comment in
the description of OFBIZ-9296 "Update Gradle to 2.4.10" Maybe a solution would
be to use streams but really WTF! It seems Gradle 2.5 has autocloseable...

This contains also some refactoring and code cleaning




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797373 13f79535-47bb-0310-9956-ffa450edef68
2017-06-02 11:25:17 +00:00
Jacques Le Roux 308b18ee83 No functional change.
Michael suggested in dev ML that we don't show the error in UI because VIEW_SIZE
 is only technical, which I agree with. The log is enough.
 
Actually it was already the case because I missed to move the
if (errMsgList) {
    request.setAttribute("_ERROR_MESSAGE_LIST_", errMsgList)
}
block below the now caught NumberFormatException

So I just need to remove the 2nd line in the catch, done.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789736 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 19:23:12 +00:00
Jacques Le Roux 4a3230c15c No functional change, fixes a C/P with wrong value name in errMsgList
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789711 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 17:00:58 +00:00
Jacques Le Roux ffc82e67ea Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

While working on OFBIZ-7759, I stumbled upon this by chance. 
It's unlikely that this NumberFormatException is ever caught, but not a reason 
to swallow it. 

I checked there are no other swallowed exceptions in Groovy files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789710 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 16:56:04 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Jacques Le Roux a4cd270ca4 Fixed: You cannot edit an image in content
(OFBIZ-7000)

If you get to
content/control/EditLayout?drDataResourceId=NOCONTENTFOUND&contentId=NOCONTENTFOUND
When trying to editing you get an error

Mohammed Rehan Khan explored the issue and found that there is a condition in 
DataResourceWorker method to render content of 'text' mime type only, for others
 it returns exception.

We can fix this by setting up mimeTypeID as null in request param

Question: Why setting up mimeTypeTypeId as 'null' is fixing this issue?
Answer: As we don't have image specific worker method for rendering these type 
of contents, so we are using DataResourceWorker.renderDataResourceAsText() 
to render image type content as well. Due to following condition, 
targetMimeTypeId is setting up as "text/html" if sent null and hence not 
throwing the exception reported in the ticket.

Thanks: Mohammed Rehan Khan for the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765094 13f79535-47bb-0310-9956-ffa450edef68
2016-10-15 17:12:28 +00:00
Ashish Vijaywargiya 6f013aea3e Applied patch from jira issue - OFBIZ-8070 - Clean up commented out code in Groovy for Content. Thanks Aman for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759151 13f79535-47bb-0310-9956-ffa450edef68
2016-09-04 07:32:47 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Ashish Vijaywargiya 86ec0749b9 Applied patch from jira issue - OFBIZ-6214 - Have overview of questions in EditSurveyQuestions.ftl paginate properly.
Thanks Pierre for creating the issue and thanks Yashwant for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751483 13f79535-47bb-0310-9956-ffa450edef68
2016-07-05 14:07:47 +00:00
Ashish Vijaywargiya 2e30592be6 Applied patch from jira issue OFBIZ-7565 - Remove HtmlFormWrapper dependencies from Survey Question Screen.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750306 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 08:14:21 +00:00
Ashish Vijaywargiya 2672c0d915 Applied patch from jira issue OFBIZ-7527 - Questions from category should not come to apply on survey when creating/editing any question.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749845 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 06:45:28 +00:00
Deepak Dixit 25b56a03ea (OFBIZ-7223) Relocate .groovy files in the content component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747756 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 17:21:10 +00:00