(OFBIZ-9023) (OFBIZ-9026)(OFBIZ-9027)(OFBIZ-9032)(OFBIZ-9034)(OFBIZ-9036)(OFBIZ-9030)
Thanks: Divesh Dutta, Amit Gadaley and Shubham Agrawal for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768189 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8909)(OFBIZ-8910)(OFBIZ-8911)(OFBIZ-8912)(OFBIZ-8913)(OFBIZ-8914)(OFBIZ-8915)(OFBIZ-8917)(OFBIZ-8918)(OFBIZ-8919)(OFBIZ-8920)(OFBIZ-8921)(OFBIZ-8922)
Thanks: Divesh Dutta for reporting and Amit Gaadaley for providing patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768168 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8337)
This is a major refactoring exercise to simplify the startup sequence in
OFBiz. There are no functional changes, however, both the logic and the
API signatures of the core classes in OFBiz are changed to help simplify
the startup sequence. The changes insofar are summarized as:
- Rename ContainerConfig.Container to ContainerConfig.Configuration, the old
nameing was very confusing as it confuses it with actual containers
- Change the signature of ContainerLoader and Container to accept
List<StartupCommand> instead of String[]. And also migrate the adapter for
converting these args into a standalone class called
StartupCommandsToArgsAdapter
- Remove the LockedBy annotation as it is not used
- Substantially simplify the ContainerLoader load and unload logic and delete
the start logic (merge it with load). The interface StartupLoader was updated
accordingly
- Remove old logic to load containers in hot-deploy components
- Remove printThreadDump output from ContainerLoader which used to exist for
debugging purposes and is no longer necessary
- Cleanup the AdminServer startup logic
- Change the StartupControlPanel logic to use only one StartupLoader instead
of a list. The only implementation is ContainerLoader
- Remove the synchronized blocks in StartupControlPanel due to having only one
loader
- Update the startup .properties files to reflect the changes in the startup
logic
- Update the TestRunContainer to use List<StartupCommand> in its logic
We expect more commits (specifically to the containers) to complete this
refactoring initiative
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765127 13f79535-47bb-0310-9956-ffa450edef68
code using it, that wraps most of the OFBiz integration with FreeMarker.
This is the list of the main modifications:
* simplified and cleaned up the public methods of FreeMarkerWorker, used to
retrieve and render Freemarker templates and changed client code accordingly to
use them
* removed unused methods in FreeMarkerWorker and made some others private
* improved the integration code in FreeMarkerWorker to better use the Freemarker
API and specifically to leverage the various TemplateLoaders and the Freemarker
caching mechanism; it is now possible to switch the OFBiz legacy template
caching mechanism to use the Freemarker one instead
* improved the implementation of Freemarker template rendering from strings
(used by DataResourceWorker): it now leverages the Freemarker's
StringTemplateLoader that provides the ability to cache the strings, retrieved
from DataResources records, based on the timestamp of the last modification
* moved freemarkerImports.properties from "widget" to "base" component, and
changed its content (and the content of the associated templates
AutoImportTemplate.ftl and HtmlTemplate.ftl) to remove the dependency from base
to widget&common; some resources of "widget" and "common" are still referenced
from AutoImportTemplate.ftl (that is in "base") but even if they are soft
dependencies: if they are missing the system will load properly without any
error or warning; before this change it was impossible to use, or unit test,
FreeMarkerWorker before the "widget" and "common" components were loaded by the
system, now it is possible
* created a new class for unit tests for FreeMarkerWorker, named
FreeMarkerWorkerTests: at the moment it contains just one simple unit test but
more should be implemented
* refactored WebToolsServices.entityImport(...) to leverage the
FreeMarkerWorker.renderTemplate(...) method to run the Freemarker template,
rather than dealing with the Freemarker API directly; this is now possible
thanks to the cleanups and improvements done in the FreeMarkerWorker class; this
same approach should be implemented for a few other similar integration points
(mostly in the "content" component); this is a TODO item
* moved the encodeDoubleQuotes(...) method from FreeMarkerWorker to
MacroFormRenderer and made it private since this is the only calss using it and
its logic is not related to FreeMarker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762227 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7798)
We slightly changed the old format of the footer. The old format used only the
translated words _uiLabelMap.CommonBuiltOn_ and _uiLabelMap.CommonWith_.
On the other hand, the new format contains the words Branch, Revision,
Built On and Java Version.
We need to translate all four words in the CommonUiLabels.xml and then
incorporate them
old version:
" - Release-revision : ${releasePath}-r${info.entry.commit(revision)},
${uiLabelMap.CommonBuiltOn} ${dateTime} ${uiLabelMap.CommonWith}
Java ${java.version}
new version:
"Branch: ${info.entry.url.text()}" + System.lineSeparator()
"Revision: ${info.entry.commit.@revision}" + System.lineSeparator()
"Built on: ${timestamp}" + System.lineSeparator()
"Java Version: ${org.gradle.internal.jvm.Jvm.current()}"
Thanks: Taher Alkhateeb for the 1st patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762077 13f79535-47bb-0310-9956-ffa450edef68
new ControlFilter, from the ContextFilter; modified existing applications to use
the two filters in a chain; removed from the other specialized filters all the
logic that was duplicated or extended from ContextFilter.
A web application, in order to leverage the OFBiz framework, requires that a
series of objects are in its contexts (servlet context, session and request)
such as "delegator", "delegatorName", "dispatcher", "security" etc. etc...
This setup is performed by the logic contained in the servlet filter implemented
by the ContextFilter class.
The execution of this logic is required for the application to run properly.
However, before this commit, in the ContextFilter there was other logic, related
to access control and redirection rules (some of them performed in coordination
with the ControlServlet), making it difficult to deploy this filter in all the
web applications, especially the ones that implement special handling of paths.
In fact, this filter was deployed in most but not all the web application in the
OFBiz codebase: specifically it was not deployed in web applications that
require the execution of other filters (e.g. CatalogUrlFilter, etc...) like the
ones in the "ecommerce" and "solr" components.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761304 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7758)
I am running on trunk rev 1751489 on tomahawk theme.
In the browser, right-click and view the page source.
There is duplicate linking of jquery.jgrowl.min.css i.e.
<link rel="stylesheet" href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" type="text/css"/>
The solution is to remove a hack for JPublish in fex Java classes
and related changes (mostly "page." in ftl and xml files)
Thanks: Rohit Koushal for the path and James Yong the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761235 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8100)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761104 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8099)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761103 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8154)
It's a pity, because of the translations, but the labels starting by "HumanResServices.", which dates from pre Apache era, are not used OOTB, so I remove them here
.portalPageName. is used by demo data
ProductStoreGroup.productStoreGroupName.NA is used as data by ProductTypeData.xml
FormFieldTitle_timesheetPartyId in ProjectMgrUiLabels.xml seems an error. As it duplicates the same in AccountingUiLabels.xml, which is accurate, I remove it from ProjectMgrUiLabels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760995 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-8154
FieldDescription. is used in 2 places UtilHelpText.java (widget) WebToolsServices.java
HumanResServices. seems unused and should be removed
.portalPageName. is doubtful to be double checked
ProductShipmentUomAbbreviation_ used in PackOrder.ftl and WeightPackage.ftl
ProductStoreGroup.productStoreGroupName.NA not sure
TemporalExpression_ used in many place: ServiceDemoData.xml, ExpressionUiHelper.java, TempExprMaint.ftl and TemporalExpressions.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760668 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-8154
Completes a TODO and removes useless tests on label keys replaced by bypass on entire ExampleEntityLabels and ProductPromoUiLabels files, still a WIP
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760537 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-8154
We had 5237 "Not Used Labels". I wondered if they were all real. There is actually a huge bunch of *.description.* labels and alike which are certainly used, notably automatically by the widget dropdowns.
This commit removes them from the "Only Not Used Labels" result. Net result: from 5237 to decent 2188 "Not Used Labels", this begins to be useful...
It only begins because I removed from the "Not Used Labels" a number of other cases similar to the obvious *.description.* labels. those are
.transitionName.
.partyRelationshipName.
.geoName.
.categoryName.
.ProductPromoCondition..
.ProductPromoOperatorEquality..
.Example. // TODO check all is used here
But a number of others need to be verified, at least:
FormFieldTitle_???
FieldDescription.ProductStore.???
FieldDescription.ProdCatalog.???
HumanResServices.???
.portalPageName.???
ProductShipmentUomAbbreviation_???
ProductStoreGroup.productStoreGroupName._NA_???
TemporalExpression_???
Also to look at:
FormFieldTitle_timesheetPartyId x2
Labels after WorkEffortWorkEffortIdEmpty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760139 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8118)(OFBIZ-8122)(OFBIZ-8123)(OFBIZ-8124)(OFBIZ-8125)(OFBIZ-8126)(OFBIZ-8127)(OFBIZ-8128)(OFBIZ-8129)
Menu names should be in camel case to maintain consistency. I've slightly modified the provided patch to eliminate names with "-" or all lower case also.
Thanks: Tanmay Muley for reporting and providing the patches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760059 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-8153
There are over 60 labels used in groovy files. These don't get reflected in the counts of the label manager and in the search for labels not used.
Thanks to Pierre Smits for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759941 13f79535-47bb-0310-9956-ffa450edef68
Simply replaces the parenthesis in ServiceUtil.getResource() by 2 spaces when parsing files with getLabelsFromJavaFiles() and getLabelsFromFtlFiles().
ServiceUtil.getResource() breaks the parsing
Note: no occurrences of ServiceUtil.getResource() yet in FTL files, and only 16 in Java files.
Also replaces "script" by "minilang" in getLabelsFromSimpleMethodFiles()
This adds a getResourceRegex in a new webtools.properties files. This property
* Allow to remove this string from files when parsing with Label Manager, else it breaks
* Moreover the string can't be in the LabelReferences.java file, to avoid side effects
I have also increased the transaction-timeout of the screen "SearchLabels" to 600.
Because when using the "Only Not Used Labels" option the 1st pass can be long. 10 min should plenty enough, even on old machines. Not blocking anyway, just a bad stack trace in log
I'm sorry you will see a lot of false changes because the LabelManagerScreens.xml had no svn:properties at all, here they are now.
We have 5237 "Not Used Labels". I wondered if they were all real, I just checked some an indeed, they were not used.
But there are also a huge bunch of *.description.* labels which certainly make sense. I'll remove them from the "Only Not Used Labels" result in another Jira I'll create
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759457 13f79535-47bb-0310-9956-ffa450edef68
1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml
Reason: Since, there is no file like 'maincss.css' exist under any includes directory.
2) Removed the unused references of maincss.css from FTLs, code
<link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/>
has been removed.
Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory.
When I look the history of these files, following were my findings,
The 'maincss.css' file under the 'images' directory exist in release4.0
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
after this release, this files no longer exist there.
3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0
4) Updated some references from 'maincss.css' to style.css in comments.
5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator
Since, these files no longer exist after release-4.0.
Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758389 13f79535-47bb-0310-9956-ffa450edef68
Notes:
* Also removes empty framework/base/lib/scripting and useless applications\content\lib\uno\README (miss doc in wiki)
* When jpim-0.1.jar will be (hopefully) replaced we can drop lib ref in framework/base/ofbiz-component.xml
* I wonder if we should let the geronimo component alone with only 2 classes, could we not put that in entity or entityext?
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755306 13f79535-47bb-0310-9956-ffa450edef68
* https://localhost:8443/webtools/control/LogView
* https://localhost:8443/webtools/control/FetchLogs
Each method use the same line rendering and the difference is : LogView display only runtime/logs/ofbiz.log (or you can surcharge it vith debug.properties) and FecthLogs list all file name ofbiz* present on runtime/logs/ofbiz.log and offert the possibility to search only line that macth a string.
I review the code to use only one script (remove LogView.groovy) and improve following points :
* Optimise the FetchLog.groovy to display with same velocity a file with or without string chain filtering
* Add a property to change the root log directory. Under linux we use /var/log/ofbiz/
* Add a regExp to match the file name of file present in the directory. Helpful when you want to see error.log
* Complete debug.properties with comment for describe example for new properties
And last point, add refresh button on the end page to reload the log without lost your state on the page.
Related issue OFBIZ-7944
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755302 13f79535-47bb-0310-9956-ffa450edef68
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@1752838 13f79535-47bb-0310-9956-ffa450edef68
This is the first patch that takes OFBiz to the point of no return
in terms of switching from Ant to Gradle build system. Specifically
this patch applies the following items:
- Delete all old Ant and Maven build scripts
- Delete 169 Jar libraries and replace them with remote ones in the
gradle build script
- update the gradle build scripts for the dependencies and other minor
changes needed for the script work correctly
All tests pass with the command ./gradlew cleanAll loadDefault testIntegration
Again, thank you for everyone who contributed valueble time and effort in this
process.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752033 13f79535-47bb-0310-9956-ffa450edef68
This feature has been contributed a long time ago as an experimental feature but never really matured into a production ready artifact: since it was contributed, no users asked about how to use it, or tested it, or reported bugs or enhancement requests.
More importantly, the feature has always been disabled in the OFBiz framework (i.e. the widget code and the entity engine code were not using it).
This removal should not impact our user base; however, after the removal, an entry to the Attic will be created to keep track of it and to make it easier, to interested users, to get this code, improve it (e.g. by making it dependent on a live external jar, for example MapDB instead of JDBM) and possibly contribute it back to the project.
The most compelling reason for its removal is that the feature was based on a snapshot, unreleased version of JDBM, which is now a mostly dead project: for licensing reasons we are no more allowed to bundle jars in our releases. Additionally, having code that relies an old jar from a no more active project represents a maintenance issue for the community.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751817 13f79535-47bb-0310-9956-ffa450edef68
As per updated code now-
INFO will be shown in Green color
WARNING will be in bold Blue color
ERROR will be in Red color along with border
DEBUG will be in Grey color
Thanks Swapnil M Mane for reporting the issue and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750336 13f79535-47bb-0310-9956-ffa450edef68
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68