public class GadgetSpec extends Object
| Modifier and Type | Field and Description |
|---|---|
static Locale |
DEFAULT_LOCALE |
static String |
DEFAULT_VIEW |
| Constructor and Description |
|---|
GadgetSpec(Uri url,
Element doc,
String original)
Creates a new Module from the given xml input.
|
GadgetSpec(Uri url,
String xml)
Use for testing.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String key) |
String |
getChecksum() |
ModulePrefs |
getModulePrefs() |
Uri |
getUrl() |
Map<String,UserPref> |
getUserPrefs() |
View |
getView(String name)
Retrieves a single view by name.
|
Map<String,View> |
getViews() |
void |
setAttribute(String key,
Object o)
Sets an attribute on the gadget spec.
|
GadgetSpec |
substitute(Substitutions substituter)
Performs substitutions on the spec.
|
String |
toString() |
public static final String DEFAULT_VIEW
public static final Locale DEFAULT_LOCALE
public GadgetSpec(Uri url, Element doc, String original) throws SpecParserException
url - The original url of the gadget.doc - The pre-parsed xml document.original - Unparsed input XML. Used to generate checksums.SpecParserException - If xml can not be processed as a valid gadget spec.public GadgetSpec(Uri url, String xml) throws SpecParserException
SpecParserExceptionpublic Uri getUrl()
public String getChecksum()
public ModulePrefs getModulePrefs()
public View getView(String name)
name - The name of the view you want to seepublic void setAttribute(String key, Object o)
key - The attribute name.o - The value of the attribute.public GadgetSpec substitute(Substitutions substituter)
substituter - Copyright © 2007-2012. All Rights Reserved.