def toIndex(obj): plugin = PluginsHolder().getPluginType('search').getPlugin("repozer") if type(obj).__name__ == 'Conference': return plugin.getOptions()["indexConference"].getValue() if type(obj).__name__ == 'Contribution': return plugin.getOptions()["indexContribution"].getValue() if type(obj).__name__ == 'LocalFile': return plugin.getOptions()["indexMaterial"].getValue() return False
def toIndex(obj): plugin = PluginsHolder().getPluginType('search').getPlugin("repozer") if type(obj).__name__ == 'Conference': return plugin.getOptions()["indexConference"].getValue() if type(obj).__name__ == 'Contribution': return plugin.getOptions()["indexContribution"].getValue() if type(obj).__name__ == 'LocalFile': return plugin.getOptions()["indexMaterial"].getValue() return False
def getUpdateInterval(self): """ Returns the interval for which cached values should live before new data is requested from the server. """ statsPlugin = PluginsHolder().getPluginType('statistics') return statsPlugin.getOptions()['cacheTTL'].getValue()
def getUpdateInterval(self): """ Returns the interval for which cached values should live before new data is requested from the server. """ statsPlugin = PluginsHolder().getPluginType('statistics') return statsPlugin.getOptions()['cacheTTL'].getValue()
def __init__(self, catalogName=confCatalog): self.catalog = {} self.db = db.DBMgr.getInstance().getDBConnection() self.ch = ConferenceHolder() plugin = PluginsHolder().getPluginType('search').getPlugin("repozer") self.iConf = plugin.getOptions()["indexConference"].getValue() self.iContrib = plugin.getOptions()["indexContribution"].getValue() self.iMat = plugin.getOptions()["indexMaterial"].getValue() # init all standard catalogs for cat in [confCatalog,contribCatalog,matCatalog]: if cat not in self.db.root(): self.catalogName = cat self.init_catalog() self.catalogName = catalogName # init customized catalog if self.catalogName not in [confCatalog,contribCatalog,matCatalog] and self.catalogName not in self.db.root(): self.init_catalog() self.catalog = self.db.root()[self.catalogName]
def getPluginImplementation(self, obj): plugin = PluginsHolder().getPluginType('search').getPlugin("invenio") typeSearch = plugin.getOptions()["type"].getValue() return ("invenio", InvenioRedirectSEA if typeSearch == "redirect" else InvenioSEA)
def getDefaultSearchEngineAgent(self): """ Returns the default Search Engine Agent of the plugin """ searchPlugin = PluginsHolder().getPluginType('search') return searchPlugin.getOptions()['defaultSearch'].getValue()
def setDefaultSearchEngineAgent(self, value): """ Sets the default Search Engine Agent of the plugin """ searchPlugin = PluginsHolder().getPluginType('search') searchPlugin.getOptions()['defaultSearch'].setValue(value)
def getVarFromPluginStorage(self, varName): """ Retrieves varName from the options of the plugin. """ plugin = PluginsHolder().getPluginType('search').getPlugin(self._id) return plugin.getOptions()[varName].getValue()
def getPluginImplementation(self, obj): plugin = PluginsHolder().getPluginType('search').getPlugin("invenio") typeSearch = plugin.getOptions()["type"].getValue() return ("invenio", InvenioRedirectSEA if typeSearch == "redirect" else InvenioSEA)
def getVarFromPluginStorage(self, varName): """ Retrieves varName from the options of the plugin. """ plugin = PluginsHolder().getPluginType('search').getPlugin(self._id) return plugin.getOptions()[varName].getValue()
def hasCacheEnabled(self): """ True if the plugin is configured for cached reporting. """ statsPlugin = PluginsHolder().getPluginType('statistics') return statsPlugin.getOptions()['cacheEnabled'].getValue()
def hasCacheEnabled(self): """ True if the plugin is configured for cached reporting. """ statsPlugin = PluginsHolder().getPluginType('statistics') return statsPlugin.getOptions()['cacheEnabled'].getValue()
def toIndex(obj): plugin = PluginsHolder().getPluginType('search').getPlugin("repozer") liveUpdate = plugin.getOptions()["liveUpdate"].getValue() return liveUpdate and type(obj).__name__ in typesToIndex and not(obj.hasAnyProtection())