org.apache.shindig.gadgets
Class Gadget
java.lang.Object
org.apache.shindig.gadgets.Gadget
public class Gadget
- extends Object
Intermediary representation of all state associated with processing
of a single gadget request.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gadget
public Gadget()
setContext
public Gadget setContext(GadgetContext context)
- Parameters:
context - The request that the gadget is being processed for.
getContext
public GadgetContext getContext()
setGadgetFeatureRegistry
public Gadget setGadgetFeatureRegistry(FeatureRegistry registry)
- Parameters:
registry - The gadget feature registry to use to find dependent
features.
setSpec
public Gadget setSpec(GadgetSpec spec)
- Parameters:
spec - The spec for the gadget that is being processed.
getSpec
public GadgetSpec getSpec()
setPreloads
public Gadget setPreloads(Collection<PreloadedData> preloads)
- Parameters:
preloads - The preloads for the gadget that is being processed.
getPreloads
public Collection<PreloadedData> getPreloads()
getAllFeatures
public List<String> getAllFeatures()
setCurrentView
public Gadget setCurrentView(View currentView)
getCurrentView
public View getCurrentView()
- Returns:
- The View applicable for the current request.
getLocale
public LocaleSpec getLocale()
- Convenience function for getting the locale spec for the current context.
Identical to:
Locale locale = gadget.getContext().getLocale();
gadget.getSpec().getModulePrefs().getLocale(locale);
addFeature
public void addFeature(String name)
removeFeature
public void removeFeature(String name)
getDirectFeatureDeps
public Set<String> getDirectFeatureDeps()
sanitizeOutput
public boolean sanitizeOutput()
- Should the gadget content be sanitized on output
- Returns:
Copyright © 2007-2012. All Rights Reserved.