Commit Graph
34 Commits
Author SHA1 Message Date
Benjamin Jugl f5788b2a81 Improved: Converts DataServices.xml to Groovy. (OFBIZ-11469) 2021-02-01 17:08:46 +01:00
Suraj Khurana e3124a6856 Improved: Converted remaining ElectronicText related CRUD services from simple to entity-auto (#120)
(OFBIZ-11664)
2020-05-13 10:46:55 +05:30
Jacques Le Roux 2dadaacac8 Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

This was reopened after discussion at 
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with OFBIZ-6669 and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859877 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:47:08 +00:00
Ashish Vijaywargiya 1ce72c550d Improved: OFBIZ-7471: Improve all the service level error messages for missing required field for content component.(OFBIZ-8713)
Thanks Jagpreet and Shikha for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802667 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:59:31 +00:00
Jacques Le Roux 371ebe2913 Fixed: Create new blog article entry error.
(OFBIZ-9373)

After using plain text for the field [articleData], when I post the form, 
I get the following error message:
 The following required parameter is missing: [IN] 
 [createElectronicText.dataResourceId]]
 
jleroux: it was a bug introduced with r1765319 while refactoring to use 
entity-auto

Thanks: Daniel Coric who find the reason and Yao who initially reported and 
helped to find a solution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799088 13f79535-47bb-0310-9956-ffa450edef68
2017-06-18 14:32:36 +00:00
Jacques Le Roux 25e965cb2e Implemented: New implementation of Birt. Easier user possibility of
report creation
(OFBIZ-6919)

This are a non functional changes not yet used OOTB. 
They are only intended to ease the sync between the svn trunk repo and 
the github branch (using a fork)

So still a WIP...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777586 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 10:54:20 +00:00
Deepak Dixit 982d1be463 Improved: Convert ElectronicText entity related CRUD services from simple to entity-auto.
(OFBIZ-8371)(OFBIZ-8372)

Thanks Pawan Verma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765319 13f79535-47bb-0310-9956-ffa450edef68
2016-10-17 15:56:27 +00:00
Arun Patidar d8562e4821 Implemented: Added CRUD services for Deduction, DataTemplateType and CustomMethodType entity.
(OFBIZ-8035) (OFBIZ-8045)(OFBIZ-8046)

Thanks: Amit Gadaley for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761136 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 07:17:36 +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
Pranay Pandey e314e8a5ee [OFBIZ-7519] Updated optionality to required for attributes in entity auto services where pk fields were mentioned optional. It helps service engine to validate IN attributes and return error for missing ones.
Cases considered for this update are:
 1. One PK: Takes new sequence if PK not passed.
 2. Two PK: Both PK should be mandatory except the case of secondary primary key (like agreementItemSeqId) where next subsequence is generated.
 3. More than two PK's, all PK's should be mandatory except the fromDate.
 Thanks Amardeep Singh Jhajj for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749532 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 14:37:30 +00:00
Jacques Le Roux ec66e361e1 A big but straightforward commit for "Move minilang scripts from component://componentname/script/org/ofbiz to component://componentname/minilang" - https://issues.apache.org/jira/browse/OFBIZ-7267
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)

I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix 

I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to 
  "The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 14:04:30 +00:00
Deepak Dixit 9f279ed58b (OFBIZ-7043) Remove commented code labeled as "TO BE REMOVED" since 2008.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1742503 13f79535-47bb-0310-9956-ffa450edef68
2016-05-06 06:48:38 +00:00
Jacques Le Roux 5d9f3898c6 A slightly modified patch from Supachai Chaima-ngua for <<Upload product image does not work.>> https://issues.apache.org/jira/browse/OFBIZ-6769
Upload product image dose not working because "updateDataResource" require out parameter name 'dataResourceId' but the service doesn't return by using entity-auto engine and upload image function need delegator but do not sent to upload image function.

jleroux: this was due to recent r1716271 so no needs to backport. The changes in ImageManagementServices were not operationally needed (it worked as is) but indeed better for a method like scaleImageMangementInAllSize to rely on DispatchContext rather than service context when called from a service. Since it's not a service I changed the scaleImageMangementInAllSize method to private. I also removed the useless "ImageManagementServices." prefix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1721066 13f79535-47bb-0310-9956-ffa450edef68
2015-12-20 21:07:27 +00:00
Nicolas Malin e48fc92759 convert entities crud service from simple to entity-auto for :
* WebSiteRole
* WebSitePathAlias
* WebSiteContentType
* WebSiteContent
* WebSite
* DataResourcePurpose
* DataResourceMetaData
* OtherDataResource
* AudioDataResource
* VideoDataResource
* ImageDataResource
* DataResource (update/delete)
* ContentApproval
* ContentRevisionItem
* ContentRevision
I also move some service definition from file services.xml to services_content.xml for ContentApproval, ContentRevisionItem and ContentRevision
relate issue OFBIZ-6745

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716271 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 22:21:53 +00:00
Jacques Le Roux 7adfe90d71 Fixes <<Services allow arbitrary HTML for parameters with allow-html set to "safe">> https://issues.apache.org/jira/browse/OFBIZ-5254
After r751990, <<allow-html="any">> and <<allow-html="safe">> are the same: they do nothing! The only difference is the warning message from the OWASP Antisamy IntrusionDetector, which is both, as Christoph noted "giving you a false sense of security" or as I wrote "disturbing, wrong and useless". So there are no longer any reasons for differencing "safe" and "any".

This
* Deprecates "safe" (making it clear in the XSD documentation), keeping only "none" and "any". This is for backward compatibility, else we could completely remove the misleading "safe". Note that "none" is the default.
* Replaces in services definition all allow-html="safe" by allow-html="any"
* Remove from ModelService.java (near line 587) the code which throws the OWASP Antisamy IntrusionDetector message in log

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536324 13f79535-47bb-0310-9956-ffa450edef68
2013-10-28 12:12:43 +00:00
Hans Bakker 432a4f2d18 allow html=safe in comments and descriptions
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1198615 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 03:34:52 +00:00
Jacques Le Roux 63b2a85c6d allow-html="safe" in DataResource.textData like for ELECTRONIC_TEXT
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1087904 13f79535-47bb-0310-9956-ffa450edef68
2011-04-01 21:27:49 +00:00
Erwan de Ferrieres f077d22e2d mime-type is now auto detected with Apache Tika when uploading a new file to a profile. I also had to change the mimeTypeId field to vlong, as there are now mimetypes with a length > 60 characters
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081848 13f79535-47bb-0310-9956-ffa450edef68
2011-03-15 16:43:09 +00:00
Erwan de Ferrieres cd78a16fba OFBIZ-3647 Create dataResource from content -- A patch from Nicolas Malin -- https://issues.apache.org/jira/browse/OFBIZ-3647
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@993395 13f79535-47bb-0310-9956-ffa450edef68
2010-09-07 15:30:21 +00:00
Adam Heath ac2299c50e Fix a bunch of no final newline issues.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@965918 13f79535-47bb-0310-9956-ffa450edef68
2010-07-20 17:15:21 +00:00
Jacques Le Roux e57c2599a9 A patch from Sumit Pandit "Issue in rendering Freemarker Template from String." (https://issues.apache.org/jira/browse/OFBIZ-3782) - OFBIZ-3782
With the help of Bob Morley (it was more a cache issue than what Sumit thought)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950866 13f79535-47bb-0310-9956-ffa450edef68
2010-06-03 04:11:32 +00:00
Adrian Crum 9a753b9865 Fixed a problem where service definitions were using "GenericValue" as attribute types, but that threw exceptions because the service definitions needed the full class name - "org.ofbiz.entity.GenericValue". The problem was reported in https://issues.apache.org/jira/browse/OFBIZ-2268 and https://issues.apache.org/jira/browse/OFBIZ-2311.
I checked the commit logs and I don't see what changed to cause these services to stop working, so I took the shotgun approach and changed all occurrences of GenericValue service attributes.

If anyone has a better solution, please feel free to revert this commit and change it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@765864 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 06:33:43 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Jacques Le Roux a5042291f7 1st part of an effort to remove trailing spaces
" +/> => "/>
Should be easier when dealing with Eclipse S/R regexp

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@762648 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 08:27:15 +00:00
Jacques Le Roux 836f765212 Content component
Following best practice.
Changed location="org/ofbiz/......... to location="component:// in the service location attribute.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@755928 13f79535-47bb-0310-9956-ffa450edef68
2009-03-19 11:20:52 +00:00
David E. Jones 1859744a3f Updated a few service defs that need to support html coming in, all using safe html for now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@742394 13f79535-47bb-0310-9956-ffa450edef68
2009-02-09 11:05:34 +00:00
Marco Risaliti cfeb2a6745 Some cleanup on content component (Part of issue OFBIZ-1982)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@701855 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 19:14:33 +00:00
Vikas Mayur 1915592f76 Applied patch from Jira Issue OFBiz-1665 (https://issues.apache.org/jira/browse/OFBIZ-1665)
This patch reported a bug that was related to invoking wrong method in a service in services_data.xml
While applying the patch I come across similar bug in other services as well.
Fixed them as well.

Thanks to Pranay Pandey for the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@629523 13f79535-47bb-0310-9956-ffa450edef68
2008-02-20 16:25:25 +00:00
David E. Jones 75c26763e5 Fairly significant update to correct a long-standing problem; reverted ByteWrapper back for backward compatibility, and then replaced all use of ByteWrapper with java.nio.ByteBuffer; the main point is to both store only the byte[] data in the database and not a serialized object containing the byte[], and at the same time be able to read the old ByteWrapper objects, and there is a service to read and update all old data to be plan bytes instead of wrapped in a serialized object; this includes changing the java-type for blob fields to be java.sql.Blob to greater compatibility and flexibility, ie you can either set a plain byte[] or you can pass in a Blob object to be persisted, you can also get both as get returns java.sql.Blob, but getBytes always returns the byte[], converting as needed; this is tested a fair amount, but obviously needs to be watched as it is new code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@587433 13f79535-47bb-0310-9956-ffa450edef68
2007-10-23 09:52:49 +00:00
David E. Jones 7d70c41c12 Did a big search/replace to change all xsd file refs from www.ofbiz.org to ofbiz.apache.org
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@539504 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 15:47:14 +00:00
Alfred Maxwell Byers 50e13a2497 Fixed my last commit with Andrew's fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@516207 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 22:42:37 +00:00
Alfred Maxwell Byers f71060fa8d Added "dataResourceTypeId" as unnneeded parameter to "updateElectronicText" so that "updateDataText" seca will work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@516200 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 22:36:39 +00:00
Andrew Zeneski 6ee64698ff implemented new data resource types for AUDIO/VIDEO content
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@512471 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 22:53:42 +00:00
Andrew Zeneski 05fa91599e more content refactoring; refactored upload content service; now supports other data resource types; now also can determine which type to use based on mimeType (if none is specified); moved some service defs around, this is a work in progress. Moved data resource services from contentservices.xml to dataservices.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@512356 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 18:35:04 +00:00