public class JsHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
JsHandler.JsGadgetContext
GadgetContext for JsHandler called by FeatureRegistry when fetching the resources.
|
static class |
JsHandler.JsHandlerResponse
Define the response data from JsHandler.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,ConfigContributor> |
configContributors |
protected ContainerConfig |
containerConfig |
protected FeatureRegistry |
registry |
| Constructor and Description |
|---|
JsHandler(FeatureRegistry registry,
ContainerConfig containerConfig,
Map<String,ConfigContributor> configContributors) |
| Modifier and Type | Method and Description |
|---|---|
protected JsHandler.JsHandlerResponse |
getFeatureResourcesContent(javax.servlet.http.HttpServletRequest req,
GadgetContext ctx,
Set<String> needed)
Get the content of the feature resources and push it to jsData.
|
protected Set<String> |
getFeaturesNeeded(javax.servlet.http.HttpServletRequest req)
Get the Set of feature names from the request.
|
protected GadgetContext |
getGadgetContext(javax.servlet.http.HttpServletRequest req)
Get the GadgetContext to be used when calling FeatureRegistry.getFeatureResources.
|
JsHandler.JsHandlerResponse |
getJsContent(javax.servlet.http.HttpServletRequest req)
Get the JavaScript content from the feature name aliases.
|
protected final FeatureRegistry registry
protected final ContainerConfig containerConfig
protected final Map<String,ConfigContributor> configContributors
@Inject public JsHandler(FeatureRegistry registry, ContainerConfig containerConfig, Map<String,ConfigContributor> configContributors)
public JsHandler.JsHandlerResponse getJsContent(javax.servlet.http.HttpServletRequest req)
req - the HttpRequest object.protected Set<String> getFeaturesNeeded(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest object.protected GadgetContext getGadgetContext(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest object.protected JsHandler.JsHandlerResponse getFeatureResourcesContent(javax.servlet.http.HttpServletRequest req, GadgetContext ctx, Set<String> needed)
req - The HttpServletRequest object.ctx - GadgetContext object.needed - Set of requested feature names.Copyright © 2007-2012. All Rights Reserved.