Пример #1
0
 protected void bindExtensionService(ExtensionService<?> extensionService) {
   String extensionClassName = extensionService.getExtensionClass().getName();
   if (extensions.containsKey(extensionClassName)) {
     throw new RuntimeException(
         MessageFormat.format(
             "Extension {0} already has a registered extension service", extensionClassName));
   }
   extensions.put(extensionClassName, extensionService);
 }
Пример #2
0
 protected void unbindExtensionService(ExtensionService<?> extensionService) {
   extensions.remove(extensionService.getExtensionClass().getName());
 }