Nuxeo Enterprise Platform 5.4

org.nuxeo.opensocial.gadgets.service
Class GadgetServiceImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.opensocial.gadgets.service.GadgetServiceImpl
All Implemented Interfaces:
GadgetService, Adaptable, Component, Extensible

public class GadgetServiceImpl
extends DefaultComponent
implements GadgetService


Constructor Summary
GadgetServiceImpl()
           
 
Method Summary
 GadgetDeclaration getGadget(java.lang.String name)
          Return a gadget declaration
 java.util.List<java.lang.String> getGadgetCategory()
          Returns the list of gadget categories
 java.net.URL getGadgetDefinition(java.lang.String gadgetName)
          Returns a URL to the gadget definition
 java.util.List<GadgetDeclaration> getGadgetList()
          Returns the list of all registered gadgets declarations
 java.util.List<GadgetDeclaration> getGadgetList(java.lang.String category)
          Returns the list of the registered gadgets for a given category
 java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.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)
 java.io.InputStream getGadgetResource(java.lang.String gadgetName, java.lang.String resourcePath)
          Returns a stream on a resource of a gadget
 java.lang.String getIconUrl(java.lang.String gadgetName)
          Returns a relative URL to the gadget icon
 void registerContribution(java.lang.Object contribution, java.lang.String extensionPoint, ComponentInstance contributor)
           
 void registerNewGadget(GadgetDeclaration gadget)
           
 void unregisterContribution(java.lang.Object contribution, java.lang.String extensionPoint, ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, deactivate, getAdapter, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetServiceImpl

public GadgetServiceImpl()
Method Detail

registerContribution

public void registerContribution(java.lang.Object contribution,
                                 java.lang.String extensionPoint,
                                 ComponentInstance contributor)
                          throws java.lang.Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
java.lang.Exception

unregisterContribution

public void unregisterContribution(java.lang.Object contribution,
                                   java.lang.String extensionPoint,
                                   ComponentInstance contributor)
                            throws java.lang.Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
java.lang.Exception

registerNewGadget

public void registerNewGadget(GadgetDeclaration gadget)

getGadget

public GadgetDeclaration getGadget(java.lang.String name)
Description copied from interface: GadgetService
Return a gadget declaration

Specified by:
getGadget in interface GadgetService
Parameters:
name - the symbolic name of the gadget

getGadgetResource

public java.io.InputStream getGadgetResource(java.lang.String gadgetName,
                                             java.lang.String resourcePath)
                                      throws java.io.IOException
Description copied from interface: GadgetService
Returns a stream on a resource of a gadget

Specified by:
getGadgetResource in interface GadgetService
Parameters:
gadgetName - the symbolic name of the gadget
resourcePath - the relative path to the resources
Throws:
java.io.IOException

getGadgetList

public java.util.List<GadgetDeclaration> getGadgetList()
Description copied from interface: GadgetService
Returns the list of all registered gadgets declarations

Specified by:
getGadgetList in interface GadgetService

getGadgetList

public java.util.List<GadgetDeclaration> getGadgetList(java.lang.String category)
Description copied from interface: GadgetService
Returns the list of the registered gadgets for a given category

Specified by:
getGadgetList in interface GadgetService
Parameters:
category - the category

getGadgetNameByCategory

public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getGadgetNameByCategory()
Description copied from interface: GadgetService
Return a hashed map of all registered gadgets by category TODO: check if this is necessary in the API (perhaps a GWT tweak)

Specified by:
getGadgetNameByCategory in interface GadgetService

getGadgetDefinition

public java.net.URL getGadgetDefinition(java.lang.String gadgetName)
Description copied from interface: GadgetService
Returns a URL to the gadget definition

Specified by:
getGadgetDefinition in interface GadgetService
Parameters:
gadgetName - the gadget symbolic name

getGadgetCategory

public java.util.List<java.lang.String> getGadgetCategory()
Description copied from interface: GadgetService
Returns the list of gadget categories

Specified by:
getGadgetCategory in interface GadgetService

getIconUrl

public java.lang.String getIconUrl(java.lang.String gadgetName)
Description copied from interface: GadgetService
Returns a relative URL to the gadget icon

Specified by:
getIconUrl in interface GadgetService
Parameters:
gadgetName - the gadget symbolic name

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.