This commit upgrades the framework to Java JDK 8 and prevents compiling
on earlier versions. Hence the build system should be updated to compile on
Java 8. After this point users can commit code holding Java 8 features such
as streams and lambdas
REFS OFBIZ-6458
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709262 13f79535-47bb-0310-9956-ffa450edef68
I changed ViewEntityCondition.getWhereCondition(), ViewConditionExpr.createCondition() and ViewConditionList.createCondition() which will add additional condition of filtering by date to where clause.
Please test by following steps.
1. Change the code below in GenericDAO
if (queryTotalTime > 150) {
Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module);
}
to
{code:title=GenericDAO.java|borderStyle=solid}
if (queryTotalTime > 0) {
Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module);
}
It will always log the sql to the log file.
2. Open https://localhost:8443/partymgr/control/ImportExport
2. Enter a valid partyId for export and click SUBMIT
3. Check ofbiz.log file under runtime folder. You should able to see the query below which contains filter data condition
SELECT
PRT.PARTY_ID,
PRT.STATUS_ID,
PRT.PREFERRED_CURRENCY_UOM_ID,
GRP.GROUP_NAME,
PER.FIRST_NAME,
PER.MIDDLE_NAME,
PER.LAST_NAME,
PR.PARTY_ID_FROM,
CGRP.GROUP_NAME,
PRL.ROLE_TYPE_ID,
CM.CONTACT_MECH_TYPE_ID,
PCP.CONTACT_MECH_PURPOSE_TYPE_ID,
CM.INFO_STRING,
TN.COUNTRY_CODE,
TN.AREA_CODE,
TN.CONTACT_NUMBER,
PA.ADDRESS1,
PA.ADDRESS2,
PA.CITY,
PA.STATE_PROVINCE_GEO_ID,
PA.POSTAL_CODE,
PA.COUNTRY_GEO_ID,
PCM.FROM_DATE,
PCM.THRU_DATE
FROM (((((((((public.PARTY PRT
LEFT OUTER JOIN public.PARTY_GROUP GRP
ON PRT.PARTY_ID = GRP.PARTY_ID)
LEFT OUTER JOIN public.PERSON PER
ON PRT.PARTY_ID = PER.PARTY_ID)
LEFT OUTER JOIN public.PARTY_RELATIONSHIP PR
ON PRT.PARTY_ID = PR.PARTY_ID_TO
AND ((PR.ROLE_TYPE_ID_FROM = 'ACCOUNT'
AND PR.PARTY_RELATIONSHIP_TYPE_ID = 'EMPLOYMENT')))
LEFT OUTER JOIN public.PARTY_GROUP CGRP
ON PR.PARTY_ID_FROM = CGRP.PARTY_ID)
LEFT OUTER JOIN public.PARTY_ROLE PRL
ON PRT.PARTY_ID = PRL.PARTY_ID)
LEFT OUTER JOIN public.PARTY_CONTACT_MECH PCM
ON PRT.PARTY_ID = PCM.PARTY_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157'))))
LEFT OUTER JOIN public.POSTAL_ADDRESS PA
ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID)
LEFT OUTER JOIN public.CONTACT_MECH CM
ON PCM.CONTACT_MECH_ID = CM.CONTACT_MECH_ID)
LEFT OUTER JOIN public.TELECOM_NUMBER TN
ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID)
LEFT OUTER JOIN public.PARTY_CONTACT_MECH_PURPOSE PCP
ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MECH_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157')))
AND PCM.PARTY_ID = PCP.PARTY_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.236')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.236')))
WHERE (((PRL.ROLE_TYPE_ID = ?
OR PRL.ROLE_TYPE_ID = ?
OR PRL.ROLE_TYPE_ID = ?)
AND (PRT.STATUS_ID <> ?
OR PRT.STATUS_ID IS NULL)
AND PRT.PARTY_ID = ?))
ORDER BY PRT.PARTY_ID ASC
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1708341 13f79535-47bb-0310-9956-ffa450edef68
Fix a possible endless loop in TemporalExpression Evaluation. Daybump flag must be turned off when used.
Thanks Adrian Crum for Report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1707782 13f79535-47bb-0310-9956-ffa450edef68
1. Upgrade the solr/lucene component to the latest 5.3.1.
2. Angular related js and html files are removed.
3. The jquery-1.7.2.min.js is removed as it's not used in solr.
4. Change specialpurpose/solr/conf to specialpurpose/solr/home.
5. Move specialpurpose/solr/solrdefault to specialpurpose/solr/home/solrdefault.
6. The files under specialpurpose/solr/home/solrdefault are all from solr-5.3.1 package/server/solr/configsets/sample_techproducts_configs/, the solrconfig.xml is configured: <dataDir>${solr.data.dir:runtime/indexes}</dataDir>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1707042 13f79535-47bb-0310-9956-ffa450edef68
In my opinion it would be straight forward, if the entity import would treat fields that are mentioned in entity XML files as fields that should be updated always, as the GenericDAO does. The current logic ignores fields, if there is only an empty string as value.
The enhancement brought by the solution of OFBIZ-4949 makes it possible to generally configure an entity-engine-xml file to be interpreted as replacement, so that all NOT mentioned fields are set to NULL instead of leaving the old value while updating the entity.
Nevertheless I think, that the default (update) behavior, the one with fine grained control over which fields are touched, should also give the possibility to set field values to NULL by including them in the XML.
The solution with the lowest impact on existing XML files and the most natural meaning should be to interpret empty string values in the XML as NULL, as it is today. The only difference would be, that they are not longer ignored but set as NULL values in the database. The only drawback I see is, that you're still not able to set "empty string" values as concrete values to the database (no loss of function, because you can't do it today, too).
As far as I can see, there should be no conflict with current existing data files. There are some where for example a parentTypeId is contained with empty string as value. Interpreting it as NULL and setting in database is exactly what is meant by such a definition.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706316 13f79535-47bb-0310-9956-ffa450edef68
Removes unused methods (not in Java code, FTL templates and Groovy scripts) in GenericValue and EntityUtil classes + misc related comments or logs
Adds log warning to spot possible use cases in templates and scripts of getRelated() and getRelatedOne() methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704769 13f79535-47bb-0310-9956-ffa450edef68
Instead of former YUGOSLAVIA there should be SERBIA.
Also CountryTeleCode and CountryCapital is missing for MONTENEGRO.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704140 13f79535-47bb-0310-9956-ffa450edef68
NotoSans is the defaultFontFamily for FOP and the extra stylings and the font-weight="bold" are not rendered correctly unless changed to another font family
jleroux: this needs clarification, I will ask Christian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704130 13f79535-47bb-0310-9956-ffa450edef68
As reported Adam:
It appears that the storeAll() variants are being refactor; basically, the useCache parameter is being removed. However, this has caused the entity engine to have deprecation with itself.
Gareth suggested:
What about new method that allows passing in an options object
storeAll(List<GenericValue> values, StoreOptions options) ?
You can deprecate the old methods without changes
Moving forward, you would just need to add new values to the StoreOptions class rather than adding new parameters to the existing one
I am not sure about the name StoreOptions though, EntityOptions ?
Martin contributed the implementation and suggested EntityStoreOptions for the new class name.
Ha created a patch which removes the use of deprecated API and the deprecated API itself from Delegator and GenericDelegator.
Introduced the EntityStoreOptions class as mentioned in a comment before to substitute the createDummyFks parameter of storeAll method to avoid ambiguous API after removing the deprecated doCacheClear parameter.
The decryptFieldValue method, just defined deprecated by Jacopo is left there as deprecated. Only the "old" deprecated methods where removed.
Gil Portenseigne supplied a pure svn patch, actually I had conflicting pending changes locally which prevented me to apply Martin's original patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704108 13f79535-47bb-0310-9956-ffa450edef68
For some users, having the week shown in dropdown calendars is an important thing.
There is an option to show week numbers in the dropdown date picker used by OFBiz. (datetimepicker)
It can be done by adding "showWeek: true," in the datetimepicker calls in framework/widget/templates/htmlFormMacroLibrary.ftl.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704086 13f79535-47bb-0310-9956-ffa450edef68
If a userLoginId of an existing user is updated by LoginServices.updateUserLoginId, a new UserLogin value is created with the data of the old one and the old one is disabled afterwards. In addition to switch the enabled flag to "N" the disabledDateTime is set to current date. This is wrong because this makes it possible to reenable the old UserLogin by just do a login with the old userLoginId (standard mechanism to lock the login for a while after subsequent failed login requests).
Thanks Martin Becker for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704052 13f79535-47bb-0310-9956-ffa450edef68
This patch introduces some constants for the expression types and corrects the wrong comparison.
Thanks Vyom Jain for spotting this issue and Martin Becker for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704043 13f79535-47bb-0310-9956-ffa450edef68
The integer value representing the HOUR was wrong in the documentation.
Thanks Mirco Vogelsmeier for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703965 13f79535-47bb-0310-9956-ffa450edef68
Introduces a private inner class ListSet representing a Set backed by a List instead of the HashSet implementation.
Thanks Gareth Carter for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703954 13f79535-47bb-0310-9956-ffa450edef68
There is an error in isValidEan util. It should be 12 and not 13 in the methods charAt and calcChecksum because they start at 0.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703586 13f79535-47bb-0310-9956-ffa450edef68
jleroux: The EntityListIterator at line 453 is now closed (dynamicViewEntity complete list retrieved once, eg: agreementServices.getCommissionForProduct())
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1702548 13f79535-47bb-0310-9956-ffa450edef68
I suggest using application/json instead of application/x-json as it is official content type. It seems x-json does not cause any problem for the time being but browsers will load json responses correctly without asking for download. It's handy in development time. It also matches JQuery Accept header.
jleroux: I also used it in Solr
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1701915 13f79535-47bb-0310-9956-ffa450edef68
1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696921 13f79535-47bb-0310-9956-ffa450edef68
Thanks Pierre Smits for reporting the issue and thanks Neeraj Kumawat for providing the patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696234 13f79535-47bb-0310-9956-ffa450edef68
This reverts svn:eol-style=native on Java files which were forced by r1044202n, 89 Java files are concerned. This commit hopefully makes things more consistent.
It's indeed hard to see the impact of this change before it's committed. I'll check once done, I already found 116 Java files w/o svn:eol-style=native but there are 1231 Java files at all, so not sure how most are set...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695126 13f79535-47bb-0310-9956-ffa450edef68
This was reported by Gareth Carter;
If for instance you use this SQL expression
select * from Party_Role where role_Type_Id LIKE '%CA%'
It will be interpreted (and returned to UI) as
select * from Party_Role where role_Type_Id LIKE 'Ê%'
And no result will be returned when OOTB there is 6 <PartyRole partyId="***" roleTypeId="CARRIER"/> entities
The solution is to keep the SQL expression string from the context at the top of the EntitySQLProcessor.groovy script and put it back in context after the request call (at bottom)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693579 13f79535-47bb-0310-9956-ffa450edef68
There was still an issue in normal (not PDF) mode, I thought I had just to replace \' by void, but I got fooled, because \' already transformed in Unicode characters (\') at this stage. So I replaced "\'" by "'"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693258 13f79535-47bb-0310-9956-ffa450edef68
In ScreenFopViewHandler.java, removed a line:
pdfEncryptionParams.setEncryptionLengthInBits(256);
it's redundant to the line
pdfEncryptionParams.setEncryptionLengthInBits(encryptionLength);
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693243 13f79535-47bb-0310-9956-ffa450edef68