`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
- Lingua principale
- Java
- Stelle
- 7
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da AdobeIoEventHandler.java, intorno alla riga 118, il punto di ingresso indicato nell’issue, e traccia il modo in cui OSGi JCR Path Filter viene attualmente verificato con startsWith. Definisci come la corrispondenza tramite espressioni regolari debba coesistere con l’attuale comportamento basato sul prefisso, quindi verifica che i percorsi corrispondenti inviino eventi solo quando l’espressione configurata corrisponde, incluso l’esempio PDF.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100