Re: License issue with iText 4.2.0
I guess you mean Le 12/06/2018 à 15:54, Taher Alkhateeb a écrit : I'm no longer interested in discussing this, I already explained it. -1 on the comment -1 on the removal +1 on excluding the transitive dependency If you want to fix things for BIRT, I recommend you do it_outside_ the framework. I'd veto that, it's not legally serious. You did not get it, it's not about fixing BIRT, please read our last exchange with Scott. Thanks to care. Jacques Le 29/06/2018 à 16:12, Taher Alkhateeb a écrit : Ahh, so you just decided to ignore my input? On Fri, Jun 29, 2018, 3:28 PM Jacques Le Roux wrote: Hi All, Do we need a vote here to decide if we should ask infra or not? Else I'll tomorrow consider the last exchange with Scott 2 weeks ago a lazy consensus and will simply replace using -compile 'com.lowagie:itext:4.2.0' + compile 'com.lowagie:itext:2.1.7' // don't update because of license issue. The BIRT runtime package still uses the same for the same reason Thanks Jacques Le 15/06/2018 à 09:07, Jacques Le Roux a écrit : Le 14/06/2018 à 21:43, Scott Gray a écrit : Are there any genuine doubts about 2.1.7? Or just a warning from the company trying to sell the AGL licensed versions? If we revert back to 2.1.7 then I don't think we need to ask legal anything. Yes that's also my opinion after deeply checking. BIRT runtime is the proof, IMO. Jacques Regards Scott On 14 June 2018 at 18:56, Jacques Le Roux Le 14/06/2018 à 07:22, Scott Gray a écrit : My first inclination is that taking legal advice from a company that is trying to sell you a license, probably isn't a good idea. They have a vested interest in trying to convince you not to use the MIT version. Regardless, I think Taher's solution works in the short term For that I think we need to ask Legal. Anyway better to ask them for both versions (2.1.7 or 4.2.0) and the other alternative is to revert back to a 2.x version until a suitable replacement is found. Why a replacement would be needed? Looking at the commit logs it hasn't been very long since we switched from 2.x to 4.x for no other reason than "let's update everything!". Right, I believe using 2.1.7 is the way. We were using it until Oct 13 2017, r1812161. It's the same than in BIRT distributed runtime packages and I expect Eclipse Legal team is aware. Certainly a reason why they never updated. So the question for our Legal could as simple as: 1. Eclipse BIRT distributes itext 2.1.7 in their runtime packages under the EPL license. 2. We want to use the same directly as a declared dependency 3. But we wonder what to think about https://developers.itextpdf.co m/question/versions-older-than-5 @team: what do you think? I'd not even ask for 4.2.0 because I expect a negative answer. But if you prefer we can add it. Should we say that we use the 2.1.7 version for years? Jacques Regards Scott On 14 June 2018 at 05:47, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: Hi Jacopo, Yes good idea. I'll try to write next week... Jacques Le 13/06/2018 à 08:14, Jacopo Cappellato a écrit : On Tue, Jun 12, 2018 at 11:47 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: [...] Of course we need to ask the legal team before taking a formal decision about it. I think we have now enough material to ask, and without opposition I'll create a LEGAL Jira in a week. I think it would be useful if you will post the draft of the text for the Jira ticket to this list for community's review before submitting it to Legal. Thank you, Jacopo
Re: svn commit: r1834662 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
I'm currently reviewing http://svn.apache.org/viewvc?view=revision&revision=1834389 http://svn.apache.org/viewvc?view=revision&revision=1834465 I'll get back to this later, but I'm surprised that it would be an issue, it's just simple and fast to review... unlike above... Jacques Le 29/06/2018 à 16:11, Taher Alkhateeb a écrit : I refactored many parts of the framework. I might have done more refactoring than anyone recently. However, I never just pushed a commit. I always ask for feedback, I make a patch and I consistently ask for people's feedback, some of that feedback came directly from you Jacques. So for you to call it just refactoring as if this makes it a benign this is surprising to me. I would join Michael in recommending that you revert and start a proper discussion. On Jun 29, 2018 1:29 PM, "Jacques Le Roux" wrote: Michael It's not a change just a refactorization. I thought it was simple enough to be committed. If we go this way for simple and small changes like here things will be quite slow I also answered in the Jira since you also asked the same there Jacques Le 29/06/2018 à 12:21, Michael Brohl a écrit : Jacques, didn't we just agreed upon a slower process and review from more committers when changing these core aspects of the framework? Especially when you change the patch there is no chance for anyone to review before it gets committed {#emotions_dlg.sad} Michael Am 29.06.18 um 12:03 schrieb jler...@apache.org: Author: jleroux Date: Fri Jun 29 10:03:22 2018 New Revision: 1834662 URL: http://svn.apache.org/viewvc?rev=1834662&view=rev Log: Improved: Factorize code logic from ‘ConfigXMLReader’ (OFBIZ-10453) There is a lot of repetitive code in ConfigXMLReader. Using a functional interface as a parameter of a generic algorithm avoids those repetitions. Thanks: Mathieu Lirzin Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1834662&r1=1834661&r2=1834662&view=diff == --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Fri Jun 29 10:03:22 2018 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import javax.servlet.ServletContext; @@ -218,120 +219,67 @@ public class ConfigXMLReader { } } -public Map getAfterLoginEventList() throws WebAppConfigurationException { -MapContext result = MapContext.getMapContext(); -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); - result.push(controllerConfig.getAfterLoginEventList()); +private Map pushIncludes(Function> f) throws WebAppConfigurationException { +MapContext res = MapContext.getMapContext(); +for (URL include : includes) { + res.push(getControllerConfig(include).pushIncludes(f)); +} +res.push(f.apply(this)); +return res; +} + +private String getIncludes(Function f) throws WebAppConfigurationException { +String val = f.apply(this); +if (val != null) { +return val; +} +for (URL include : includes) { +String inc = getControllerConfig(include).getIncludes(f); +if (inc != null) { +return inc; +} } -result.push(afterLoginEventList); -return result; +return null; +} + +public Map getAfterLoginEventList() throws WebAppConfigurationException { +return pushIncludes(ccfg -> ccfg.afterLoginEventList); } public Map getBeforeLogoutEventList() throws WebAppConfigurationException { -MapContext result = MapContext.getMapContext(); -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); - result.push(controllerConfig.getBeforeLogoutEventList()); -} -result.push(beforeLogoutEventList); -return result; +return pushIncludes(ccfg -> ccfg.beforeLogoutEventList); } public String getDefaultRequest() throws WebAppConfigurationException { -
Re: License issue with iText 4.2.0
Ahh, so you just decided to ignore my input? On Fri, Jun 29, 2018, 3:28 PM Jacques Le Roux wrote: > Hi All, > > Do we need a vote here to decide if we should ask infra or not? > > Else I'll tomorrow consider the last exchange with Scott 2 weeks ago a > lazy consensus and will simply replace using > > -compile 'com.lowagie:itext:4.2.0' > + compile 'com.lowagie:itext:2.1.7' // don't update because of > license issue. The BIRT runtime package still uses the same for the same > reason > > Thanks > > Jacques > > > Le 15/06/2018 à 09:07, Jacques Le Roux a écrit : > > Le 14/06/2018 à 21:43, Scott Gray a écrit : > >> Are there any genuine doubts about 2.1.7? Or just a warning from the > >> company trying to sell the AGL licensed versions? > >> > >> If we revert back to 2.1.7 then I don't think we need to ask legal > anything. > > Yes that's also my opinion after deeply checking. BIRT runtime is the > proof, IMO. > > > > Jacques > >> > >> Regards > >> Scott > >> > >> On 14 June 2018 at 18:56, Jacques Le Roux > > >> wrote: > >> > >>> Le 14/06/2018 à 07:22, Scott Gray a écrit : > >>> > My first inclination is that taking legal advice from a company that > is > trying to sell you a license, probably isn't a good idea. They have a > vested interest in trying to convince you not to use the MIT version. > > Regardless, I think Taher's solution works in the short term > > >>> For that I think we need to ask Legal. Anyway better to ask them for > both > >>> versions (2.1.7 or 4.2.0) > >>> > >>> and the other > alternative is to revert back to a 2.x version until a suitable > replacement > is found. > > >>> Why a replacement would be needed? > >>> > >>> Looking at the commit logs it hasn't been very long since we > switched from 2.x to 4.x for no other reason than "let's update > everything!". > > >>> Right, I believe using 2.1.7 is the way. We were using it until Oct 13 > >>> 2017, r1812161. > >>> It's the same than in BIRT distributed runtime packages and I expect > >>> Eclipse Legal team is aware. Certainly a reason why they never updated. > >>> > >>> So the question for our Legal could as simple as: > >>> > >>> 1. Eclipse BIRT distributes itext 2.1.7 in their runtime packages under > >>> the EPL license. > >>> 2. We want to use the same directly as a declared dependency > >>> 3. But we wonder what to think about https://developers.itextpdf.co > >>> m/question/versions-older-than-5 > >>> > >>> @team: what do you think? I'd not even ask for 4.2.0 because I expect a > >>> negative answer. But if you prefer we can add it. > >>> > >>> Should we say that we use the 2.1.7 version for years? > >>> > >>> Jacques > >>> > >>> > >>> > Regards > Scott > > On 14 June 2018 at 05:47, Jacques Le Roux < > jacques.le.r...@les7arts.com> > wrote: > > Hi Jacopo, > > Yes good idea. I'll try to write next week... > > > > Jacques > > > > > > > > Le 13/06/2018 à 08:14, Jacopo Cappellato a écrit : > > > > On Tue, Jun 12, 2018 at 11:47 PM, Jacques Le Roux < > >> jacques.le.r...@les7arts.com> wrote: > >> > >> [...] > >> > >>> Of course we need to ask the legal team before taking a formal > decision > >>> about it. > >>> I think we have now enough material to ask, and without opposition > I'll > >>> create a LEGAL Jira in a week. > >>> > >>> I think it would be useful if you will post the draft of the text > for > >> the > >> Jira ticket to this list for community's review before submitting > it to > >> Legal. > >> > >> Thank you, > >> > >> Jacopo > >> > >> > >> > > > >
Re: svn commit: r1834662 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
I refactored many parts of the framework. I might have done more refactoring than anyone recently. However, I never just pushed a commit. I always ask for feedback, I make a patch and I consistently ask for people's feedback, some of that feedback came directly from you Jacques. So for you to call it just refactoring as if this makes it a benign this is surprising to me. I would join Michael in recommending that you revert and start a proper discussion. On Jun 29, 2018 1:29 PM, "Jacques Le Roux" wrote: Michael It's not a change just a refactorization. I thought it was simple enough to be committed. If we go this way for simple and small changes like here things will be quite slow I also answered in the Jira since you also asked the same there Jacques Le 29/06/2018 à 12:21, Michael Brohl a écrit : > Jacques, > > didn't we just agreed upon a slower process and review from more committers when changing these core aspects of the framework? > > Especially when you change the patch there is no chance for anyone to review before it gets committed {#emotions_dlg.sad} > > Michael > > Am 29.06.18 um 12:03 schrieb jler...@apache.org: >> Author: jleroux >> Date: Fri Jun 29 10:03:22 2018 >> New Revision: 1834662 >> >> URL: http://svn.apache.org/viewvc?rev=1834662&view=rev >> Log: >> Improved: Factorize code logic from ‘ConfigXMLReader’ >> (OFBIZ-10453) >> >> There is a lot of repetitive code in ConfigXMLReader. >> Using a functional interface as a parameter of a generic algorithm avoids those >> repetitions. >> >> Thanks: Mathieu Lirzin >> >> Modified: >> ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java >> >> Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1834662&r1=1834661&r2=1834662&view=diff >> == >> --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original) >> +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Fri Jun 29 10:03:22 2018 >> @@ -32,6 +32,7 @@ import java.util.List; >> import java.util.Map; >> import java.util.Objects; >> import java.util.Set; >> +import java.util.function.Function; >> import java.util.stream.Collectors; >> import javax.servlet.ServletContext; >> @@ -218,120 +219,67 @@ public class ConfigXMLReader { >> } >> } >> -public Map getAfterLoginEventList() throws WebAppConfigurationException { >> -MapContext result = MapContext.getMapContext(); >> -for (URL includeLocation : includes) { >> -ControllerConfig controllerConfig = getControllerConfig(includeLocation); >> - result.push(controllerConfig.getAfterLoginEventList()); >> +private Map pushIncludes(Function> f) throws WebAppConfigurationException { >> +MapContext res = MapContext.getMapContext(); >> +for (URL include : includes) { >> + res.push(getControllerConfig(include).pushIncludes(f)); >> +} >> +res.push(f.apply(this)); >> +return res; >> +} >> + >> +private String getIncludes(Function f) throws WebAppConfigurationException { >> +String val = f.apply(this); >> +if (val != null) { >> +return val; >> +} >> +for (URL include : includes) { >> +String inc = getControllerConfig(include).getIncludes(f); >> +if (inc != null) { >> +return inc; >> +} >> } >> -result.push(afterLoginEventList); >> -return result; >> +return null; >> +} >> + >> +public Map getAfterLoginEventList() throws WebAppConfigurationException { >> +return pushIncludes(ccfg -> ccfg.afterLoginEventList); >> } >> public Map getBeforeLogoutEventList() throws WebAppConfigurationException { >> -MapContext result = MapContext.getMapContext(); >> -for (URL includeLocation : includes) { >> -ControllerConfig controllerConfig = getControllerConfig(includeLocation); >> - result.push(controllerConfig.getBeforeLogoutEventList()); >> -} >> -result.push(beforeLogoutEventList); >> -return result; >> +return pushIncludes(ccfg -> ccfg.beforeLogoutEventList); >> } >> public String getDefaultRequest() throws WebAppConfigurationException { >> -if (defaultRequest != null) { >> -return defaultRequest; >> -} >> -for (URL includeLocation : i
Re: License issue with iText 4.2.0
Hi All, Do we need a vote here to decide if we should ask infra or not? Else I'll tomorrow consider the last exchange with Scott 2 weeks ago a lazy consensus and will simply replace using - compile 'com.lowagie:itext:4.2.0' + compile 'com.lowagie:itext:2.1.7' // don't update because of license issue. The BIRT runtime package still uses the same for the same reason Thanks Jacques Le 15/06/2018 à 09:07, Jacques Le Roux a écrit : Le 14/06/2018 à 21:43, Scott Gray a écrit : Are there any genuine doubts about 2.1.7? Or just a warning from the company trying to sell the AGL licensed versions? If we revert back to 2.1.7 then I don't think we need to ask legal anything. Yes that's also my opinion after deeply checking. BIRT runtime is the proof, IMO. Jacques Regards Scott On 14 June 2018 at 18:56, Jacques Le Roux wrote: Le 14/06/2018 à 07:22, Scott Gray a écrit : My first inclination is that taking legal advice from a company that is trying to sell you a license, probably isn't a good idea. They have a vested interest in trying to convince you not to use the MIT version. Regardless, I think Taher's solution works in the short term For that I think we need to ask Legal. Anyway better to ask them for both versions (2.1.7 or 4.2.0) and the other alternative is to revert back to a 2.x version until a suitable replacement is found. Why a replacement would be needed? Looking at the commit logs it hasn't been very long since we switched from 2.x to 4.x for no other reason than "let's update everything!". Right, I believe using 2.1.7 is the way. We were using it until Oct 13 2017, r1812161. It's the same than in BIRT distributed runtime packages and I expect Eclipse Legal team is aware. Certainly a reason why they never updated. So the question for our Legal could as simple as: 1. Eclipse BIRT distributes itext 2.1.7 in their runtime packages under the EPL license. 2. We want to use the same directly as a declared dependency 3. But we wonder what to think about https://developers.itextpdf.co m/question/versions-older-than-5 @team: what do you think? I'd not even ask for 4.2.0 because I expect a negative answer. But if you prefer we can add it. Should we say that we use the 2.1.7 version for years? Jacques Regards Scott On 14 June 2018 at 05:47, Jacques Le Roux wrote: Hi Jacopo, Yes good idea. I'll try to write next week... Jacques Le 13/06/2018 à 08:14, Jacopo Cappellato a écrit : On Tue, Jun 12, 2018 at 11:47 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: [...] Of course we need to ask the legal team before taking a formal decision about it. I think we have now enough material to ask, and without opposition I'll create a LEGAL Jira in a week. I think it would be useful if you will post the draft of the text for the Jira ticket to this list for community's review before submitting it to Legal. Thank you, Jacopo
Re: svn commit: r1834662 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
Michael It's not a change just a refactorization. I thought it was simple enough to be committed. If we go this way for simple and small changes like here things will be quite slow I also answered in the Jira since you also asked the same there Jacques Le 29/06/2018 à 12:21, Michael Brohl a écrit : Jacques, didn't we just agreed upon a slower process and review from more committers when changing these core aspects of the framework? Especially when you change the patch there is no chance for anyone to review before it gets committed {#emotions_dlg.sad} Michael Am 29.06.18 um 12:03 schrieb jler...@apache.org: Author: jleroux Date: Fri Jun 29 10:03:22 2018 New Revision: 1834662 URL: http://svn.apache.org/viewvc?rev=1834662&view=rev Log: Improved: Factorize code logic from ‘ConfigXMLReader’ (OFBIZ-10453) There is a lot of repetitive code in ConfigXMLReader. Using a functional interface as a parameter of a generic algorithm avoids those repetitions. Thanks: Mathieu Lirzin Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1834662&r1=1834661&r2=1834662&view=diff == --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Fri Jun 29 10:03:22 2018 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import javax.servlet.ServletContext; @@ -218,120 +219,67 @@ public class ConfigXMLReader { } } - public Map getAfterLoginEventList() throws WebAppConfigurationException { - MapContext result = MapContext.getMapContext(); - for (URL includeLocation : includes) { - ControllerConfig controllerConfig = getControllerConfig(includeLocation); - result.push(controllerConfig.getAfterLoginEventList()); + private Map pushIncludes(Function> f) throws WebAppConfigurationException { + MapContext res = MapContext.getMapContext(); + for (URL include : includes) { + res.push(getControllerConfig(include).pushIncludes(f)); + } + res.push(f.apply(this)); + return res; + } + + private String getIncludes(Function f) throws WebAppConfigurationException { + String val = f.apply(this); + if (val != null) { + return val; + } + for (URL include : includes) { + String inc = getControllerConfig(include).getIncludes(f); + if (inc != null) { + return inc; + } } - result.push(afterLoginEventList); - return result; + return null; + } + + public Map getAfterLoginEventList() throws WebAppConfigurationException { + return pushIncludes(ccfg -> ccfg.afterLoginEventList); } public Map getBeforeLogoutEventList() throws WebAppConfigurationException { - MapContext result = MapContext.getMapContext(); - for (URL includeLocation : includes) { - ControllerConfig controllerConfig = getControllerConfig(includeLocation); - result.push(controllerConfig.getBeforeLogoutEventList()); - } - result.push(beforeLogoutEventList); - return result; + return pushIncludes(ccfg -> ccfg.beforeLogoutEventList); } public String getDefaultRequest() throws WebAppConfigurationException { - if (defaultRequest != null) { - return defaultRequest; - } - for (URL includeLocation : includes) { - ControllerConfig controllerConfig = getControllerConfig(includeLocation); - String defaultRequest = controllerConfig.getDefaultRequest(); - if (defaultRequest != null) { - return defaultRequest; - } - } - return null; + return getIncludes(ccfg -> ccfg.defaultRequest); } public String getErrorpage() throws WebAppConfigurationException { - if (errorpage != null) { - return errorpage; - } - for (URL includeLocation : includes) { - ControllerConfig controllerConfig = getControllerConfig(includeLocation); - String errorpag
Re: svn commit: r1834662 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
Jacques, didn't we just agreed upon a slower process and review from more committers when changing these core aspects of the framework? Especially when you change the patch there is no chance for anyone to review before it gets committed {#emotions_dlg.sad} Michael Am 29.06.18 um 12:03 schrieb jler...@apache.org: Author: jleroux Date: Fri Jun 29 10:03:22 2018 New Revision: 1834662 URL: http://svn.apache.org/viewvc?rev=1834662&view=rev Log: Improved: Factorize code logic from ‘ConfigXMLReader’ (OFBIZ-10453) There is a lot of repetitive code in ConfigXMLReader. Using a functional interface as a parameter of a generic algorithm avoids those repetitions. Thanks: Mathieu Lirzin Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1834662&r1=1834661&r2=1834662&view=diff == --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Fri Jun 29 10:03:22 2018 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import javax.servlet.ServletContext; @@ -218,120 +219,67 @@ public class ConfigXMLReader { } } -public Map getAfterLoginEventList() throws WebAppConfigurationException { -MapContext result = MapContext.getMapContext(); -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); -result.push(controllerConfig.getAfterLoginEventList()); +private Map pushIncludes(Function> f) throws WebAppConfigurationException { +MapContext res = MapContext.getMapContext(); +for (URL include : includes) { +res.push(getControllerConfig(include).pushIncludes(f)); +} +res.push(f.apply(this)); +return res; +} + +private String getIncludes(Function f) throws WebAppConfigurationException { +String val = f.apply(this); +if (val != null) { +return val; +} +for (URL include : includes) { +String inc = getControllerConfig(include).getIncludes(f); +if (inc != null) { +return inc; +} } -result.push(afterLoginEventList); -return result; +return null; +} + +public Map getAfterLoginEventList() throws WebAppConfigurationException { +return pushIncludes(ccfg -> ccfg.afterLoginEventList); } public Map getBeforeLogoutEventList() throws WebAppConfigurationException { -MapContext result = MapContext.getMapContext(); -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); -result.push(controllerConfig.getBeforeLogoutEventList()); -} -result.push(beforeLogoutEventList); -return result; +return pushIncludes(ccfg -> ccfg.beforeLogoutEventList); } public String getDefaultRequest() throws WebAppConfigurationException { -if (defaultRequest != null) { -return defaultRequest; -} -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); -String defaultRequest = controllerConfig.getDefaultRequest(); -if (defaultRequest != null) { -return defaultRequest; -} -} -return null; +return getIncludes(ccfg -> ccfg.defaultRequest); } public String getErrorpage() throws WebAppConfigurationException { -if (errorpage != null) { -return errorpage; -} -for (URL includeLocation : includes) { -ControllerConfig controllerConfig = getControllerConfig(includeLocation); -String errorpage = controllerConfig.getErrorpage(); -if (errorpage != null) { -return errorpage; -} -} -return null; +return getIncludes(ccfg -> ccfg.errorpage); }
RE: Welcome to Swapnil M. Mane as new committer!
Many Congratulations Swapnil !! Thanks & Regards, Swapnil -Original Message- From: Jacques Le Roux Sent: Wednesday, June 27, 2018 1:31 AM To: dev@ofbiz.apache.org Subject: Welcome to Swapnil M. Mane as new committer! The OFBiz PMC has invited Swapnil to become a new committer and we arepleased to announce that he has accepted. Swapnil has a high level of commitment for Apache OFBiz and consistently works with the community. He is one of the most advanced contributors (including committers) in the functional domain. Please join me in welcoming and congratulating Swapnil. Jacques
RE: Welcome to Aditya Sharma as new committer!
Many Congratulations Aditya !! Thanks & Regards, Swapnil -Original Message- From: Jacques Le Roux Sent: Wednesday, June 27, 2018 1:30 AM To: dev@ofbiz.apache.org Subject: Welcome to Aditya Sharma as new committer! The OFBiz PMC has invited Aditya to become a new committer and we arepleased to announce that he has accepted. Aditya has proved to be committed and doing a very good work as a contributor. He notably coordinated the work around the refactoring of the data model documents, helped in a lot of Jiras and answered appropriately on MLs. Please join me in welcoming and congratulating Aditya. Jacques
RE: Welcome to Suraj Khurana as new committer!
Many Congratulations Suraj !! Thanks & Regards, Swapnil -Original Message- From: Jacques Le Roux Sent: Wednesday, June 27, 2018 1:30 AM To: dev@ofbiz.apache.org Subject: Welcome to Suraj Khurana as new committer! The OFBiz PMC has invited Suraj to become a new committer and we arepleased to announce that he has accepted. Suraj has proved to be committed for a long time now and is doing a very good work as a contributor. He helped in a lot of Jiras, answered properly on MLs and proposed a few quite interesting subjects. Please join me in welcoming and congratulating Suraj. Jacques