Commit Graph

48 Commits

Author SHA1 Message Date
hengsin 0db580a7a0
IDEMPIERE-5163 2022-01 Platform update (#1142) 2022-01-25 15:58:06 +01:00
Saulo José Gil 2b4a2be5a2
IDEMPIERE-4842 Easier model registration (#893)
* IDEMPIERE-4842 Easier model registration

- Change from https://github.com/atteo/classindex to
https://github.com/classgraph/classgraph, remove annotation processor
config.

- Change service.ranking of DefaultModelFactory to -1 and
service.ranking of AnnotationBasedModelFactory to 0. This give
AnnotationBasedModelFactory higher priority over DefaultModelFactory and
allow plugins to have higher priority over AnnotationBasedModelFactory
with server.ranking of 1 (the common practise before the introduction of
AnnotationBasedModelFactory).

- Added resultset constructor to MTree. This is to allow the use of
MTree with model factory.

- Remove classindex annotation from org.adempiere.base.Model and X_*
model classes.

- Added unit test for table to model class mapping

- AnnotationBasedModelFactory: Change from using annotation processor to
runtime annotation scanning using the classgraph library. The default
setting scans all the X_* model class and travels the inheritance
hierarchy to discover the M* model class. Plugin needs to create a
subclass of AnnotationBasedModelFactory and register it as an OSGi
component to scan the plugin's annotated model classes (the plugin's
custom AnnotationBasedModelFactory component should have service.ranking
> 0).

* IDEMPIERE-4842 Easier model registration

minor refinement

* Minor changes

Co-authored-by: hengsin <hengsin@gmail.com>
2021-09-22 22:42:51 +08:00
hengsin 2f8adb48c9
IDEMPIERE-4842 Easier model registration (#887)
- Temporary disable AnnotationBasedModelFactory until getSubclasses()
doesn't work for subclass from different package is resolve.
2021-09-18 15:36:50 +08:00
Saulo José Gil 602e450a93
IDEMPIERE-4842 Easier model registration (#877)
* Preliminary support for automatic model class registration

Model classes can be tagged with a new @Model annotation that allows for
easy/fast class scanning/registration, based on the ClassIndex library.
The list of annotated model classes is generated at compile time, thus
reducing reflection reliance to a bare minimum.

NOTE: Eclipse uses its own Java compiler which is not strictly standard
compliant and requires extra configuration. In Java Compiler ->
Annotation Processing -> Factory Path you need to add ClassIndex jar
file

* Annotation based model factory

* Improve classloader determination for annotation scanning

ClassIndex default annotation scanning method determines the classloader
to be used by calling Thread.currentThread().getContextClassLoader(),
which should not be used in an OSGi environment.

* Enable ClassIndex's annotation processor under Eclipse

Make sure annotation processing is enabled at Module Properties -> Java
Compiler -> Annotation Processing

* Refactoring annotation-based model class detection

Eliminated the need of annotating M* classes, by using ClassIndex's
@IndexSubclasses annotation.

* Minor change

* Minor changes

* Creation of AbstractModelFactory

* Documentation

* Make AnnotationBasedModelFactory extend AbstractModelFactory

* IDEMPIERE-4842 Easier model registration

- add annotation processor jdt settings
- fix @Component annotation for AnnotationBasedModelFactory
- fix generated x_* class missing "org.atteo.classindex.IndexSubclasses"
import

* Expose ClassIndex lib to other bundles

* Updated model classes

Co-authored-by: hengsin <hengsin@gmail.com>
2021-09-18 13:35:57 +08:00
Carlos Ruiz a4f67eb852
IDEMPIERE-4782 Multi-factor authentication (FHCA-2034) (#705)
* IDEMPIERE-4782 Multi-factor authentication (FHCA-2034)

Implement suggestions from Heng Sin

* IDEMPIERE-4782 Multi-factor authentication (FHCA-2034)

Fix security warning advised by github/CodeQL

* IDEMPIERE-4782 Multi-factor authentication (FHCA-2034)

Implement an incremental delay in zk when the validation code is wrong (to avoid brute-force attacks)
As suggested by Ricardo Santana:
* ensures one-time only use of an OTP
* Log failures in AuthFailure.log

* IDEMPIERE-4782 Multi-factor authentication (FHCA-2034)

* Log failures in AuthFailure.log - add case for login with email
* Implement incremental delay also for login panel
2021-06-08 19:49:46 +08:00
hengsin a79be8aad8
IDEMPIERE-4749 Allow to use OAuth2 libraries on plugins (#668)
* IDEMPIERE-4749 Allow to use OAuth2 libraries on plugins

- move oauth libraries and dependency to target platform
- require Tycho 2.3.0+ and Eclipse 2021-03+

* IDEMPIERE-4749 Allow to use OAuth2 libraries on plugins

Fix launch configuration.
2021-04-28 14:59:50 +02:00
Carlos Ruiz 5f2d71347d
IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system) (#593)
* IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system)

WIP - initial version working on zk with google apps mail using OAuth2 Authorization Code Flow and Client Type = web application

* Enable imap reading with OAuth2 in RequestEMailProcessor
* Simplify the code - tested plain and OAuth2 can use the same methods
* Add +SCOPE parameter to AddAuthorizationForm according to IDEMPIERE-4713
* Rename the form AddAuthorizationMailForm to AddAuthorizationForm as is now more generic

* IDEMPIERE-4713
* Rename migration scripts to make it newer than IDEMPIERE-4713
* Add list of scopes attended by a credential
* Change form to accept other scopes, if no scope parameter is passed, then a list is shown, change the menu to fix the EMail scope
* Add MAuthorizationAccount.refreshAndGetAccessToken
* Add translation for messages

* make call generic oauth, avoid using specific google API

* Tests with microsoft as OAuth2 provider
* Add record for microsoft as provider
* Increase size of tokens
* Define mandatory and secure columns
* Update refresh token when it comes on the refresh call
* Revoke endpoint is optional

* Change the approach to a process instead of a form (WIP)
* Implement servlet to process the OAuth2 code

* Solve context suggestion from hengsin

* Implement the form in an automatic popup approach for running on zkwebui

* i18n - add translations for all messages that are shown to user
* on the form opted for click to avoid the problem with browsers forbidding popups
* clean spaces and tabs on line endings

* avoid logging and copy of the secure columns

* Fix problem reported by @d-ruiz about hidden NPE when SMTP Authentication is disabled

* Add writing to AD_PInstance_Para and AD_PInstance_Log the results of processing the servlet
* Control to avoid using the same authorization URL twice
2021-03-06 11:49:39 +01:00
hengsin b80ed34d9c
IDEMPIERE-4599 Remove obsolete org.compiere.interfaces.* interface (#473)
* IDEMPIERE-4599 Remove obsolete org.compiere.interfaces.* interface

* IDEMPIERE-4599 Remove obsolete org.compiere.interfaces.* interface

remove warning.
2020-12-18 14:52:11 +01:00
hengsin d79c6de5e5 IDEMPIERE-4202 Remove java web start code and libraries 2020-03-10 18:20:04 +08:00
Carlos Ruiz f5e6beb8b7 hg merge release-6.2 (merge release6.2 into default) 2019-04-11 15:51:04 +02:00
Heng Sin Low bf2b531267 IDEMPIERE-3946 Upgrade to Tycho 1.4.0 2019-04-11 20:22:24 +08:00
Carlos Ruiz d28c1e682d Integrate contribution from TrekGlobal - developed by Heng Sin Low and Elaine Tan
1007781 Fix barcode text bug
1009003 add QR Code as Barcode Type for Print Formats
1006829 Add "Print Barcode Text" flag to print format item. Fix wrong scaling for barcode image. Fix barcode print format item doesn't respect max height.
IDEMPIERE-3948 Implement QRCode support in report engine
IDEMPIERE-1854 Barcode issue: Code Missing from barcodes in Code 128 B
IDEMPIERE-1838 Adding UPC-A barcode support in print format and adding setting fonts from print format item
2019-04-10 17:57:08 +02:00
hieplq 9482f02dec IDEMPIERE-3531:add maven tycho configuration 2018-02-10 16:42:06 +07:00
hieplq d7808da56a IDEMPIERE-3531:setting output build, jdk follow project convert from pure plugin to maven
a mavent project convert from plugin have flow default rule
   1. maven project prefer setting JRE to Execution environment, so .classpath is updated
   2. java class compliment to target/classes/, so build.propertie is updated
   3. JDK compliance configuration setting per project (only this option), so .settings/org.eclipse.jdt.core.prefs is created

extra setting about warning done manual to resolved
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367431

   it happend on bundle use non-standard java package
      org.adempiere.base/.settings/org.eclipse.jdt.core.prefs
      org.adempiere.ui.swing/.settings/org.eclipse.jdt.core.prefs

   on org.adempiere.server, old method add accessrules to classpathentry don't work for maven build.
   so change to warning method make it consitent with other
      org.adempiere.server/.settings/org.eclipse.jdt.core.prefs
2018-02-03 01:39:47 +07:00
hieplq b6d9886732 IDEMPIERE-3531:standard lib folder
on all project, put library into lib folder, so easy apply parametrize
remove some unuse (don't see reference) library
2018-02-02 13:47:07 +07:00
hieplq 8895154d8d IDEMPIERE-3531:remove facets and main output to jar
refine IDEMPIERE-3510
2018-01-30 14:44:05 +07:00
hieplq a384c3f0ed IDEMPIERE-2825 - Pluggable product pricing 2018-01-09 21:41:50 +07:00
Diego Ruiz 43cfdd2a96 IDEMPIERE-2825 - Pluggable product pricing 2017-12-18 18:40:11 +01:00
hieplq 333458f8c1 IDEMPIERE-3136:update jasper report to use P2
pending to correct dependency of org.compiere.db.oracle.provider org.compiere.db.postgresql.provider
to org.jfree.io
it better use common from apache or create new one
2017-05-14 20:58:08 +07:00
markus_bozem 1c166a17f0 IDEMPIERE-3304
Use apache commons-validator instead of own code to validate IBANs
2017-04-14 17:42:31 +02:00
hieplq baff1951be IDEMPIERE-3136:all stuff relate library of idempiere
remove duplicate jar (bsh-engine, groovy-engine)
update, move groovy to osgi
add common bundle (now focus to support jasper report)
2016-07-08 10:20:19 +07:00
hieplq 1ca5d9835d IDEMPIERE-3136:all stuff relate library of idempiere
update and use osgi version of library (passay, itextpdf, bcprov, super-csv)
2016-07-07 19:05:05 +07:00
hieplq 3d765f262e IDEMPIERE-3077:update beanshell by security problem
refer:https://github.com/beanshell/beanshell
2016-04-19 03:19:04 +07:00
hieplq bd51dfdf4e IDEMPIERE-2558:don't allow use old password when change password
update library to passay
2015-04-06 10:27:21 +07:00
Carlos Ruiz 4803643ab2 IDEMPIERE-2245 Platform Upgrade for r3 2014-10-29 13:36:29 -05:00
Heng Sin Low 0b2fbe27ae IDEMPIERE-2245 Platform Upgrade for r3. 2014-10-13 11:05:19 +08:00
hieplq 97ecb0cdbf IDEMPIERE-1696:can't add password to report file by miss lib bouncycastle 2014-07-03 23:18:47 +07:00
Heng Sin Low bc2d581399 1003862 Barcode type UPC A is needed for print formats going to Amazon. Added UPCA support using barcode4j. Use barcode4j instead of barbecue as I can't get decent output from barbecue, barbecue have the underline bug and barbecue is a dead project. Should completely drop the use of barbecue in future. 2014-05-14 12:25:10 -05:00
hieplq 049cc9ebf0 IDEMPIERE-1696:can't add password to report file by miss lib bouncycastle. 2014-03-30 19:27:53 +07:00
Elaine Tan 8c10216759 - IDEMPIERE-1269 Improve tax configuration to support external services
- IDEMPIERE-1286 Improve address validation configuration to support external services
2013-08-27 12:48:41 +08:00
Elaine Tan 92532db6de IDEMPIERE-840 Improvement to Request model class - combine the requestservice.xml and requesteventhandler.xml into one. Use class name as the pid. 2013-07-31 15:31:58 +08:00
Elaine Tan b63c3777e1 IDEMPIERE-840 Improvement to Request model class - Using OSGi event instead of model validator 2013-07-30 22:36:05 +08:00
Elaine Tan f4556324ad IDEMPIERE-840 Improvement to Request model class - Using OSGi event instead of model validator 2013-07-30 12:08:56 +08:00
Heng Sin Low c24c0f11b6 Include extension point schema to ease plugin development. 2013-03-14 23:43:47 +08:00
Heng Sin Low 8c7ba69090 IDEMPIERE-293 Support for Kill Session. Use dynamic service for access to IMessageService to avoid startup timing issue. 2013-02-14 21:07:31 +08:00
Heng Sin Low 1c718c74a9 IDEMPIERE-359 Add OSGi Service support for existing extension point. Remove obsolete xml file. 2013-02-14 21:01:31 +08:00
Heng Sin Low f4da72ef50 IDEMPIERE-359 Add OSGi Service support for existing extension point. 1) Separate osgi service and equinox extension locator API. Service.locator() for OSGi service and EquinoxExtensionLocator.instance() for equinox extension. 2) Use OSGi service for all singleton component ( all factories and most services ) and equinox extension for others ( UI object, Process instance and PIPO handlers). 2013-02-13 16:15:43 +08:00
Heng Sin Low d4e9ae0656 IDEMPIERE-359 Add OSGi Service support for existing extension point. Move more core services to OSGi service. 2012-11-08 17:36:50 +08:00
Heng Sin Low 2dfa60b73e IDEMPIERE-359 Add OSGi Service support for existing extension point 2012-11-06 11:39:23 +08:00
Carlos Ruiz a15c08f66e IDEMPIERE-454 Easy import / First a CSV exporter with the format expected for the import 2012-10-10 22:56:16 -05:00
Carlos Ruiz 28b2b5c297 IDEMPIERE-221 Implement password policies / revert a library not needed 2012-08-09 18:30:10 -05:00
Carlos Ruiz 7fa3e80e16 IDEMPIERE-221 Implement password policies
Thanks to Juliana Corredor for the research and integration
Peer reviewed and tested by Carlos Ruiz (initial version, still pending tests)
Sponsored by Trek Global
2012-08-02 18:07:23 -05:00
Heng Sin Low f99d832907 IDEMPIERE-302 Upgrade to JasperReports 4.6.0 in 1.0 2012-07-04 16:14:09 +08:00
Heng Sin Low 7f0893c592 IDEMPIERE-310 JasperReport: Compilation of JRXML is broken
IDEMPIERE-311 JasperReport: Loading pdf font from classpath is not working
2012-06-20 15:11:42 +08:00
Heng Sin Low 869b404e3b IDEMPIERE-141 Update Platform to Eclipse 3.7.1 2012-02-17 06:28:30 +08:00
Heng Sin Low 490784dbbc 2pack refactoring - decouple from SvrProcess and DB Model. Enhance the grid tab export framework to support export of 2pack archive. 2010-12-14 07:59:58 +08:00
Heng Sin Low 0af05090d1 Implemented system event on top of osgi event admin framework and dynamic service framework. Added event.test project as example of usage. Modify ModelEventValidationEngine to invoke osgi event handler. 2010-12-06 13:04:44 +08:00
Heng Sin Low 83715fa436 Refactoring to make project and folder name the same as the bundle symbolic name. Migrate to use eclipse feature and product configuration ( build is broken, to fix later ) 2010-09-29 15:25:34 +08:00