|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.gadgets.servlet.JsHandler
public class JsHandler
Provide processing logic for the JsServlet to serve the JavsScript as features request. This class will allow separation of flow and serving logic for easy customization.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
protected Map<String,ConfigContributor> |
configContributors
|
protected ContainerConfig |
containerConfig
|
protected FeatureRegistry |
registry
|
| Constructor Summary | |
|---|---|
JsHandler(FeatureRegistry registry,
ContainerConfig containerConfig,
Map<String,ConfigContributor> configContributors)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final FeatureRegistry registry
protected final ContainerConfig containerConfig
protected final Map<String,ConfigContributor> configContributors
| Constructor Detail |
|---|
@Inject
public JsHandler(FeatureRegistry registry,
ContainerConfig containerConfig,
Map<String,ConfigContributor> configContributors)
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||