Constructor and Description |
---|
FeatureManager() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
Feature |
getFeature(String name)
Returns the feature with the given name.
|
Feature[] |
getFeatures()
Get the list of all (known) features.
|
javax.servlet.ServletConfig |
getServletConfig() |
String |
getServletInfo() |
void |
init(javax.servlet.FilterConfig filterConfig) |
void |
init(javax.servlet.ServletConfig config) |
boolean |
isEnabled(String featureName)
Returns
true if a feature with the given name is known and
enabled under the current ExecutionContext . |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res) |
public Feature[] getFeatures()
Features
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
getFeatures
in interface Features
public Feature getFeature(String name)
Features
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
getFeature
in interface Features
name
- The name of the feature.null
if not known or the name is an
empty string or null
.public boolean isEnabled(String featureName)
Features
true
if a feature with the given name is known and
enabled under the current ExecutionContext
.
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
public void init(javax.servlet.FilterConfig filterConfig)
init
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
destroy
in interface javax.servlet.Servlet
public void init(javax.servlet.ServletConfig config)
init
in interface javax.servlet.Servlet
public javax.servlet.ServletConfig getServletConfig()
getServletConfig
in interface javax.servlet.Servlet
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws IOException
service
in interface javax.servlet.Servlet
IOException
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.