def getProvidedAdapters(self): """Get adapters where this interface is provided.""" # Must remove security and location proxies, so that we have access to # the API methods and class representation. regs = component.getProvidedAdapters(removeAllProxies(self.context)) return [component.getAdapterInfoDictionary(reg) for reg in regs]
def getGenericRequiredAdapters(self): """Get adapters where this interface is required.""" # Must remove security and location proxies, so that we have access to # the API methods and class representation. iface = removeAllProxies(self.context) regs = component.getRequiredAdapters(iface) regs = tuple(component.filterAdapterRegistrations( regs, iface, level=component.GENERIC_INTERFACE_LEVEL)) return [component.getAdapterInfoDictionary(reg) for reg in regs]