public class Gadget extends Object
| Constructor and Description |
|---|
Gadget() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeature(String name) |
List<String> |
getAllFeatures() |
GadgetContext |
getContext() |
View |
getCurrentView() |
Set<String> |
getDirectFeatureDeps() |
LocaleSpec |
getLocale()
Convenience function for getting the locale spec for the current context.
|
Collection<PreloadedData> |
getPreloads() |
GadgetSpec |
getSpec() |
void |
removeFeature(String name) |
boolean |
sanitizeOutput()
Should the gadget content be sanitized on output
|
Gadget |
setContext(GadgetContext context) |
Gadget |
setCurrentView(View currentView) |
Gadget |
setGadgetFeatureRegistry(FeatureRegistry registry) |
Gadget |
setPreloads(Collection<PreloadedData> preloads) |
Gadget |
setSpec(GadgetSpec spec) |
public Gadget setContext(GadgetContext context)
context - The request that the gadget is being processed for.public GadgetContext getContext()
public Gadget setGadgetFeatureRegistry(FeatureRegistry registry)
registry - The gadget feature registry to use to find dependent
features.public Gadget setSpec(GadgetSpec spec)
spec - The spec for the gadget that is being processed.public GadgetSpec getSpec()
public Gadget setPreloads(Collection<PreloadedData> preloads)
preloads - The preloads for the gadget that is being processed.public Collection<PreloadedData> getPreloads()
public View getCurrentView()
public LocaleSpec getLocale()
public void addFeature(String name)
public void removeFeature(String name)
public boolean sanitizeOutput()
Copyright © 2007-2012. All Rights Reserved.