|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.gadgets.spec.GadgetSpec
public class GadgetSpec
Represents a gadget specification root element (Module).
| Field Summary | |
|---|---|
static Locale |
DEFAULT_LOCALE
|
static String |
DEFAULT_VIEW
|
| Constructor Summary | |
|---|---|
GadgetSpec(Uri url,
Element doc,
String original)
Creates a new Module from the given xml input. |
|
GadgetSpec(Uri url,
String xml)
Use for testing. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_VIEW
public static final Locale DEFAULT_LOCALE
| Constructor Detail |
|---|
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
SpecParserException| Method Detail |
|---|
public Uri getUrl()
public String getChecksum()
public ModulePrefs getModulePrefs()
public Map<String,UserPref> getUserPrefs()
public Map<String,View> getViews()
public View getView(String name)
name - The name of the view you want to see
public Object getAttribute(String key)
public void setAttribute(String key,
Object o)
key - The attribute name.o - The value of the attribute.public GadgetSpec substitute(Substitutions substituter)
substituter -
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||