public class GadgetRegistryServiceImpl extends Object implements GadgetRegistryService
| Constructor and Description |
|---|
GadgetRegistryServiceImpl(org.exoplatform.commons.chromattic.ChromatticManager chromatticManager,
org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
deploy(Iterable<GadgetImporter> gadgets)
Deploy a set of gadgets.
|
List<Gadget> |
getAllGadgets()
Gets all of available gadgets from the database.
|
List<Gadget> |
getAllGadgets(Comparator<Gadget> sortComparator)
Gets all of available gadgets from the database.
The list of gadgets are sorted. |
String |
getCountry()
Return Country name, it's set in xml config of GadgetRegistryService
|
Gadget |
getGadget(String name)
Return Gadget object retrieved from database by its name.
|
String |
getGadgetURL(String gadgetName)
Get the URL of gadget from gadget definition.
|
String |
getHostName() |
String |
getLanguage() |
String |
getModuleId() |
GadgetRegistry |
getRegistry() |
boolean |
isGadgetDeveloper(String username)
Always return true
|
void |
removeGadget(String name)
Removes the gadget from the database.
|
void |
saveGadget(Gadget gadget)
Adds the gadget to the database.
|
public GadgetRegistryServiceImpl(org.exoplatform.commons.chromattic.ChromatticManager chromatticManager,
org.exoplatform.container.xml.InitParams params)
public GadgetRegistry getRegistry()
public void deploy(Iterable<GadgetImporter> gadgets)
GadgetRegistryServicedeploy in interface GadgetRegistryServicegadgets - the gadgets to deploypublic Gadget getGadget(String name)
GadgetRegistryServicegetGadget in interface GadgetRegistryServicename - the name of gadgetpublic List<Gadget> getAllGadgets() throws Exception
GadgetRegistryServicegetAllGadgets in interface GadgetRegistryServiceExceptionpublic List<Gadget> getAllGadgets(Comparator<Gadget> sortComparator)
GadgetRegistryServicegetAllGadgets in interface GadgetRegistryServicesortComparator - The comparator is used to control the order of gadgetspublic void saveGadget(Gadget gadget) throws Exception
GadgetRegistryServicesaveGadget in interface GadgetRegistryServicegadget - - Gadget that is saved to database, must not be nullExceptionpublic void removeGadget(String name)
GadgetRegistryServiceremoveGadget in interface GadgetRegistryServicename - the name of gadgetpublic String getGadgetURL(String gadgetName)
GadgetRegistryService
getGadgetURL in interface GadgetRegistryServicepublic boolean isGadgetDeveloper(String username)
GadgetRegistryServiceisGadgetDeveloper in interface GadgetRegistryServicepublic String getCountry()
GadgetRegistryServicegetCountry in interface GadgetRegistryServicepublic String getLanguage()
getLanguage in interface GadgetRegistryServicepublic String getModuleId()
getModuleId in interface GadgetRegistryServicepublic String getHostName()
getHostName in interface GadgetRegistryServiceCopyright © 2018 JBoss by Red Hat. All Rights Reserved.