Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

ContentBuilder Filter

AEMnewbie
Level 4
Level 4

What would be the best way to add filter to  custom content builder ? I would like to process content from certain path and drop the rest . 

1 Accepted Solution
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

take help from regex pattern along with string's various methods like replace(),split(), startsWith(), endsWith() etc.

Hope this will help.

Umesh Thakur

View solution in original post

2 Replies
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

take help from regex pattern along with string's various methods like replace(),split(), startsWith(), endsWith() etc.

Hope this will help.

Umesh Thakur

View solution in original post

AEMnewbie
Level 4
Level 4

But where would that filter need to. be added ...

 

 

( immediate = true, service = ContentBuilder.class, property= { "name=solr", "service.ranking:Integer=1001" }) 
@Designate( ocd = SolrContentBuilderConfig.class ) 
@ServiceDescription("Solr Content Builder") 
public class SolrContentBuilder implements ContentBuilder { 
public static final String TITLE = "Solr Index Agent"; 
private String name; 
@activate
protected void activate(final SolrContentBuilderConfig config) { this.name = config.getSolrName(); }  public ReplicationContent create(Session session, ReplicationAction action, ReplicationContentFactory factory) { return create(session, action, factory, null); }  public ReplicationContent create(Session session, ReplicationAction action, ReplicationContentFactory factory, Map<String, Object> parameters) { return ReplicationContent.VOID; }  public String getName() { return name; }  public String getTitle() { return TITLE; } }