`aem` `aio-aem-events-osgi-mapping` Need fine grain control on AEM events that which path to send event to Adobe IO and support regex expression
- Lenguaje dominante
- Java
- Estrellas
- 7
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Expected Behaviour
The OSGI configuration present in AEM should support regex filter path and thus in my case use case is to send events to adobe IO only when asset uploaded in AEM is of type PDF.
For this Adobe I/O Events' OSGI Event Mapping should support regex expression in OSGI JCR Path Filter Field

### Actual Behaviour
In this specific use cases only event should only be passed from AEM when the path matches the regex expression
### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
#### Platform and Version
#### Sample Code that illustrates the problem
https://github.com/adobe/aio-lib-java/blob/main/aem/events_osgi_mapping/src/main/java/com/adobe/aio/aem/event/osgimapping/eventhandler/AdobeIoEventHandler.java#L118
Above code needs to be changed to support regex rather than just checking startsWith
To support current use case of startsWith
String pdfPath = "/content/dam/daiuyijava.pdf";
String regex = "/content/dam/([^/]+)";
Pattern pt = Pattern.compile(regex) ;
Matcher mt = pt.matcher(pdfPath);
System.out.println(mt.matches());
To support more fine grain cases for example only send event when it is a PDF asset
String pdfPath = "/content/dam/daiuyijava.pdf";
String regex = "/content/dam/([^/]+)+\\.(pdf|PDF)";
Pattern pt = Pattern.compile(regex) ;
Matcher mt = pt.matcher(pdfPath);
System.out.println(mt.matches());
#### Logs taken while reproducing problem
Guía de contribución
Línea de trabajo
Comienza en AdobeIoEventHandler.java, alrededor de la línea 118, el punto de entrada indicado en el issue, y sigue cómo se comprueba actualmente el OSGi JCR Path Filter con startsWith. Define cómo debe coexistir la coincidencia de expresiones regulares con el comportamiento actual de prefijo y, después, verifica que las rutas coincidentes solo envíen eventos cuando la expresión configurada coincida, incluido el ejemplo de PDF.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100