Expand my Community achievements bar.

SOLVED

ContentBuilder Filter

Avatar

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

Avatar

Correct answer by
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

Avatar

Correct answer by
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

Avatar

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; } }