`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
- 主要语言
- Java
- 星标
- 7
- 派生
- 22
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 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
贡献指南
调研方向
从 AdobeIoEventHandler.java 大约第 118 行开始,这是 issue 中指出的入口点,并跟踪当前如何使用 startsWith 检查 OSGi JCR Path Filter。定义正则表达式匹配应如何与当前的前缀行为共存,然后验证只有在配置的表达式匹配时,匹配的路径才会发送事件,包括 PDF 示例。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100