Commit Graph
25 Commits
Author SHA1 Message Date
Suraj Khurana 6dfc3c19e7 Improved: Corrected some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
Also fixed some access modifiers for some private class members. Thanks Jacques Le Roux for review.
2020-08-31 20:01:25 +05:30
Suraj Khurana 1207d24062 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in plugins component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:22:19 +05:30
Suraj Khurana 30f796146c Improved: Corrected some line is longer than 150 characters checkstyle issues. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:07:16 +05:30
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00
Jacques Le Roux b5adaeee94 Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859735 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:04 +00:00
Jacques Le Roux 695301d303 Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Nicolas Malin 83b7d0a52a Fixed: Correct library ftl call to render the email body (OFBIZ-9138 Create a common theme)
add possibility to call the ThemeFactory.resolveTheme() with empty request if the visualTheme normaly present on the service context isn't found, so we return the default theme define in general.properties
Thanks to Jacques for raise this problem

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1806238 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 21:25:50 +00:00
Deepak Dixit 96371e329f (OFBIZ-7991) Applied patch from jira issue
=====================================
Add UI labels for success / error messages in example component
=====================================
Thanks Tanmay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1759081 13f79535-47bb-0310-9956-ffa450edef68
2016-09-03 12:14:36 +00:00
Deepak Dixit 8f3141cd46 (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/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb 2963cd7188 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Jacques Le Roux ee836db2ea A patch from Amardeep Singh Jhajj for "Add websocket support in OFBiz" https://issues.apache.org/jira/browse/OFBIZ-7073
It also contains a slightly modified patch from Amardeep Singh Jhajj for "WebSocket Example - Push Notifications" - https://issues.apache.org/jira/browse/OFBIZ-7467 - It's adding working example (in example application) of WebSocket support

I tried to use websockets in OFBiz. I simply added tomcat-embed-websocket.jar in catalina lib and created one webapp for websocket and also added server endpoint class.
It didn't work. After that, I tried the same thing with plain j2ee application with embedded tomcat. It worked there.
I researched on above issue in OFBiz and got the reason. Websockets implementation need jar scanning enabled and it is currently disabled in OFBiz. Below is the code snippet of disabling jar scan from CatalinaContainer.java:

    JarScanner jarScanner = context.getJarScanner();
    if (jarScanner instanceof StandardJarScanner) {
        StandardJarScanner standardJarScanner = (StandardJarScanner) jarScanner;
        standardJarScanner.setScanClassPath(false);
    }

Jar scanning enabling increase OFBiz server startup time upto couples of minutes (in my case, it took approx 8 minutes), so we don't want this much of startup time for OFBiz.
I got the following document where I found the reason why websocket is not working if scanning disabled.

    https://wiki.apache.org/tomcat/HowTo/FasterStartUp

Here tips are given to decrease the startup time. This tips also include disabling of jar scanning. 
We can say disabling jar scanning is right approach because if we enable it then scanner will scan all the jars loaded in OFBiz startup that we don't want.
But, If we want websockets working then we have to enable jar scanning.
For enabling jar scanning, we need below code:

    standardJarScanner.setScanClassPath(true); // Will increase server startup time.

Solution: We can add filter on jar scanning. It will allow only some kind of jars only. For example: jars having websockets endpoints. I am attaching patch for the same here.
I added filter like if jar name string contains "discoverable" word then only it will be considered for jar scan. We can change jar name of our jars using build.xml to make it discoverable for jar scanning.
For example: I have added my websocket endpoint class in "specialpurpose/ecommerce/src" and changed the "name" property in build.xml of ecommerce component from "ofbiz-ecommerce"
to "ofbiz-ecommerce-discoverable". Here is the code snippet from build.xml:

    <property name="name" value="ofbiz-ecommerce-discoverable"/>

This change will create the jar with name "ofbiz-ecommerce-discoverable.jar" in "ecommerce/build/lib/".
Now created jar will be scanned in jar scanner as its name contains "discoverable" word in it.
This change will not increase server start up time more than couple of seconds (in my case, it just two seconds). So scanning time totally depends on the list of jars scanned.
Conclusion: We can use websocket support with the help of jar filters.

The very basic working example of sending push notifications to all connected clients using WebSocket added by Amardeep Singh Jhajj works as follow:
1. Adds support to show push notifications over every screen of an example application using WebSocket when any example created or updated.
2. As it's an example, so for now push notifications will only for example creation and update using SECA's.
3. Push notification will be shown on screen for 5 seconds only, we can close it before 5 seconds using close button if needed.
The UI of notification pop-up can be changed. I kept it simple (No fancy work) to just demonstrate the WebSocket usage.
To see it in action, Please follow the steps given in OFBIZ-7073 and apply patch given here.


jleroux: I committed the 2 patches at the same time because the changes in .classpath and the LICENSE files were in the example patch for OFBIZ-7467. 

I also slightly modified the example patch in order to provide an example where no sync issues are possible by using a Collections.synchronizedSet for the javax.websocket.Session Set. I also used synchronized loops as it's requested for synchronizedSet where it's used. I know it rather symbolic in the example component but it will remember developers about the possible sync issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1750557 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 18:50:04 +00:00
Deepak Dixit f1a8d15c4d (OFBIZ-6288) Replace html widget rendering with Macro widget rendering in ExamplePrintServices.java file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1731353 13f79535-47bb-0310-9956-ffa450edef68
2016-02-20 09:09:50 +00:00
Shi Jinghai c93b665a7e OFBIZ-6504 - Create password protected PDF in OFBiz
1. Changed to use FOP 2.0 native encryption, jars are updated.

2. Now the Embeded options are request parameters supported in ScreenFopViewHandler.java, the options are:
http://xmlgraphics.apache.org/fop/2.0/pdfencryption.html#embedded
the default values of the options can be configured in framework/webapp/config/fop.properties.

3. The demo page is https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01

4. Barcode is tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1691852 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 20:41:32 +00:00
Shi Jinghai 8f446273d6 OFBIZ-6504 - Create password protected PDF in OFBiz
Closed the PDF document.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1690531 13f79535-47bb-0310-9956-ffa450edef68
2015-07-12 20:51:17 +00:00
Shi Jinghai 67e970d4d7 OFBIZ-6504 - Create password protected PDF in OFBiz
1. Fixed two typos.

2. Replaced many tabs with 4 spaces.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1690528 13f79535-47bb-0310-9956-ffa450edef68
2015-07-12 20:44:47 +00:00
Shi Jinghai 75bcea9b8b OFBIZ-6504 - Create PDF with password Protected in OFBiz
Add an example to protect a pdf generated by FOP with owner password and user password.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1690515 13f79535-47bb-0310-9956-ffa450edef68
2015-07-12 19:46:54 +00:00
Nicolas Malin 1e3600618d Convert javolution FastMap, FastSet and FastList by standard java.util.*
Related to OFBIZ-5781 Convert Javolution collections into Java collections
Thanks to Deepak Dixit and Adrian Crum for their help.

By defautl converted :
 * FastMap by HashMap
 * FastList by LinkedList
 * FastSet by HashSet

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1672752 13f79535-47bb-0310-9956-ffa450edef68
2015-04-10 20:22:54 +00:00
Adrian Crum ae9103cf18 Reorganized the screen widget src folder so classes are more organized.
This commit might break some Groovy scripts. There seemed to be a lot of C&P widget import statements, but there were no widget classes being used in the script, so I removed them. I might have overlooked something though.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1652852 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 21:03:40 +00:00
Jacopo Cappellato 6ad4f89105 As discussed in the dev list, removed the experimental jcr component; its development will continue in the proper branch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1347478 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 08:14:28 +00:00
Sascha Rodekamp c0939c2a0a Move the repository mapping files in a sub package. To differ between file and data mappings.
Each node contains now a field which identifies the party who created the content and the party which modified it last.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1329718 13f79535-47bb-0310-9956-ffa450edef68
2012-04-24 13:50:33 +00:00
Erwan de Ferrieres 52e25d2ed3 Moving example* applications to specialpurpose OFBIZ-4790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328503 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 21:11:02 +00:00