org.exoplatform.application.gadget
Interface GadgetRegistryService

All Known Implementing Classes:
GadgetRegistryServiceImpl

public interface GadgetRegistryService

This service is used to register the gadget with portal. Developer uses this service to manage list of gadgets.

Created by The eXo Platform SAS
Jun 18, 2008


Method Summary
 java.util.List<Gadget> getAllGadgets()
          Gets all of available gadgets from the database.
 java.util.List<Gadget> getAllGadgets(java.util.Comparator<Gadget> sortComparator)
          Gets all of available gadgets from the database.
The list of gadgets are sorted.
 Gadget getGadget(java.lang.String name)
          Gets the gadget from database by name.
 boolean isGadgetDeveloper(java.lang.String username)
           
 void removeGadget(java.lang.String name)
          Removes the gadget from the database.
 void saveGadget(Gadget gadget)
          Adds the gadget to the database.
 

Method Detail

getGadget

Gadget getGadget(java.lang.String name)
                 throws java.lang.Exception
Gets the gadget from database by name.

Parameters:
name - the name of gadget
Returns:
the gadget or null if not found
Throws:
java.lang.Exception

getAllGadgets

java.util.List<Gadget> getAllGadgets()
                                     throws java.lang.Exception
Gets all of available gadgets from the database.

Returns:
a list of gadgets
Throws:
java.lang.Exception

getAllGadgets

java.util.List<Gadget> getAllGadgets(java.util.Comparator<Gadget> sortComparator)
                                     throws java.lang.Exception
Gets all of available gadgets from the database.
The list of gadgets are sorted.

Parameters:
sortComparator - The comparator is used to control the order of gadgets
Returns:
a list of gadgets
Throws:
java.lang.Exception

saveGadget

void saveGadget(Gadget gadget)
                throws java.lang.Exception
Adds the gadget to the database. If the gadget is existing, it will be updated.

Parameters:
app - the gadget that is saved to database
Throws:
java.lang.Exception

removeGadget

void removeGadget(java.lang.String name)
                  throws java.lang.Exception
Removes the gadget from the database.

Parameters:
id - the id of gadget
Throws:
java.lang.Exception

isGadgetDeveloper

boolean isGadgetDeveloper(java.lang.String username)


Copyright © 2011 eXo Platform SAS. All Rights Reserved.