SlingFilter annotations in aem 6.4 | Community
Skip to main content
Level 3
October 24, 2018
Solved

SlingFilter annotations in aem 6.4

  • October 24, 2018
  • 1 reply
  • 1719 views

Hi Team,

Please help me in converting the below scr annotations to osgi annotations for aem 6.4.

@SlingFilter(label="my label" , description = "my desc" , metatype = false, order = -9999)

@Properties({@Property(label = "my label" , description = "my description", name="pattern" , value = "/.*")});

public class MyClass implements Filter

{

}

Thanks,

Preetham K.R

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

@Component(service = Filter.class, property = {

  Constants.SERVICE_DESCRIPTION + "= Filter incoming requests and create cookie",

  EngineConstants.SLING_FILTER_SCOPE + "=" + EngineConstants.FILTER_SCOPE_REQUEST,

"sling.filter.pattern=/.*",

  Constants.SERVICE_RANKING + "=-700"

})

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 24, 2018

@Component(service = Filter.class, property = {

  Constants.SERVICE_DESCRIPTION + "= Filter incoming requests and create cookie",

  EngineConstants.SLING_FILTER_SCOPE + "=" + EngineConstants.FILTER_SCOPE_REQUEST,

"sling.filter.pattern=/.*",

  Constants.SERVICE_RANKING + "=-700"

})

Arun Patidar