public class GadgetServiceImpl extends DefaultComponent implements GadgetService
| Modifier and Type | Field and Description |
|---|---|
static String |
GADGET_DIRECTORY |
| Constructor and Description |
|---|
GadgetServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
GadgetDeclaration |
getGadget(String name)
Return a gadget declaration
|
List<String> |
getGadgetCategory()
Returns the list of gadget categories
|
URL |
getGadgetDefinition(String gadgetName)
Returns a URL to the gadget definition
|
List<GadgetDeclaration> |
getGadgetList()
Returns the list of all registered gadgets declarations
|
List<GadgetDeclaration> |
getGadgetList(String category)
Returns the list of the registered gadgets for a given category
|
HashMap<String,ArrayList<String>> |
getGadgetNameByCategory()
Return a hashed map of all registered gadgets by category TODO: check if this is necessary in the API (perhaps a
GWT tweak)
|
InputStream |
getGadgetResource(String gadgetName,
String resourcePath)
Returns a stream on a resource of a gadget
|
org.apache.shindig.gadgets.spec.GadgetSpec |
getGadgetSpec(GadgetDeclaration declaration)
Return the parsed Gadget Spec (may require an http fetch)
|
org.apache.shindig.gadgets.spec.GadgetSpec |
getGadgetSpec(String name)
Return the parsed Gadget Spec (may require an http fetch)
|
String |
getIconUrl(String gadgetName)
Returns a relative URL to the gadget icon
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerNewGadget(GadgetDeclaration gadget) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtensionpublic static final String GADGET_DIRECTORY
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic void registerNewGadget(GadgetDeclaration gadget)
public GadgetDeclaration getGadget(String name)
GadgetServicegetGadget in interface GadgetServicename - the symbolic name of the gadgetpublic InputStream getGadgetResource(String gadgetName, String resourcePath) throws IOException
GadgetServicegetGadgetResource in interface GadgetServicegadgetName - the symbolic name of the gadgetresourcePath - the relative path to the resourcesIOExceptionpublic org.apache.shindig.gadgets.spec.GadgetSpec getGadgetSpec(String name) throws IOException, org.apache.shindig.gadgets.GadgetException
GadgetServicegetGadgetSpec in interface GadgetServicename - the gadget symbolic nameIOExceptionorg.apache.shindig.gadgets.GadgetExceptionpublic org.apache.shindig.gadgets.spec.GadgetSpec getGadgetSpec(GadgetDeclaration declaration) throws IOException, org.apache.shindig.gadgets.GadgetException
GadgetServicegetGadgetSpec in interface GadgetServiceIOExceptionorg.apache.shindig.gadgets.GadgetExceptionpublic List<GadgetDeclaration> getGadgetList()
GadgetServicegetGadgetList in interface GadgetServicepublic List<GadgetDeclaration> getGadgetList(String category)
GadgetServicegetGadgetList in interface GadgetServicecategory - the categorypublic HashMap<String,ArrayList<String>> getGadgetNameByCategory()
GadgetServicegetGadgetNameByCategory in interface GadgetServicepublic URL getGadgetDefinition(String gadgetName)
GadgetServicegetGadgetDefinition in interface GadgetServicegadgetName - the gadget symbolic namepublic List<String> getGadgetCategory()
GadgetServicegetGadgetCategory in interface GadgetServicepublic String getIconUrl(String gadgetName)
GadgetServicegetIconUrl in interface GadgetServicegadgetName - the gadget symbolic nameCopyright © 2015 Nuxeo SA. All rights reserved.