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() |
OpenSocialVersion |
getSpecificationVersion()
Returns open social specification version for this Gadget
|
Map<String,Feature> |
getViewFeatures()
Convenience method that returns Map of features to load for gadget's current view
|
void |
removeFeature(String name) |
boolean |
requiresCaja()
True if the gadget opts into caja or the container forces caja
|
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) |
boolean |
useQuirksMode()
Returns if the doctype attribute is set to quirksmode.
|
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 OpenSocialVersion getSpecificationVersion()
public boolean useQuirksMode()
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 Map<String,Feature> getViewFeatures()
public boolean sanitizeOutput()
public boolean requiresCaja()
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.