@Override public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if ("hibernate".equals(extensionPoint)) { registerHibernateContribution((HibernateConfiguration) contribution, contributor.getName()); } }
@Override public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception { if (EXTENSION_POINTS_SETTERS.equals(extensionPoint)) { DataInheritanceSetterDescriptor setterContribution = (DataInheritanceSetterDescriptor) contribution; Class<?> clazz = setterContribution.getClazz(); if (null != clazz && DataInheritanceSetter.class.isAssignableFrom(clazz)) { DataInheritanceSetter setter = (DataInheritanceSetter) clazz.newInstance(); setterContribution.setSetter(setter); this.settersDescriptors.put(setterContribution.getName(), setterContribution); } else { log.warn("Failed to register the contribution '" + contributor.getName() + "'. Either a null clazz is defined or it doesn't implement the interface 'DataInheritanceSetter'"); } } }
embeddedServerConfig = serverContrib; log.info("Registering embedded server configuration: " + embeddedServerConfig + ", loaded from " + contributor.getName()); } else if (embeddedServerConfig != null) { log.info("Disabling previous embedded server configuration, deactivated by " + contributor.getName()); embeddedServerConfig = null; idx.merge(previous); indexConfig.put(idx.getName(), idx); log.info("Registering index configuration: " + idx + ", loaded from " + contributor.getName()); } else if (previous != null) { log.info("Disabling index configuration: " + previous + ", deactivated by " + contributor.getName()); indexConfig.remove(idx.getName());
@Override public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if ("configuration".equals(extensionPoint)) { UserRegistrationConfiguration newConfig = (UserRegistrationConfiguration) contribution; if (configurations.containsKey(newConfig.getName())) { if (newConfig.isMerge()) { configurations.get(newConfig.getName()).mergeWith(newConfig); } else if (newConfig.isRemove()) { configurations.remove(newConfig.getName()); } else { log.warn( "Trying to register an existing userRegistration configuration without removing or merging it, in: " + contributor.getName()); } } else { configurations.put(newConfig.getName(), newConfig); } } }
@Override @SuppressWarnings("deprecation") public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if (extensionPoint.equals(EVENT_EXT_POINT)) { doRegisterEvent((EventDescriptor) contribution); } else if (extensionPoint.equals(EXTENDED_INFO_EXT_POINT)) { doRegisterExtendedInfo((ExtendedInfoDescriptor) contribution); } else if (extensionPoint.equals(ADAPTER_POINT)) { doRegisterAdapter((AdapterDescriptor) contribution); } else if (contribution instanceof AuditBackendDescriptor) { backendConfig = (AuditBackendDescriptor) contribution; } else if (contribution instanceof AuditBulkerDescriptor) { bulkerConfig = (AuditBulkerDescriptor) contribution; String message = String.format( "AuditBulker on component %s is deprecated because it is now handled with nuxeo-stream, no replacement.", contributor.getName()); DeprecationLogger.log(message, "10.10"); Framework.getRuntime().getMessageHandler().addWarning(message); } else if (contribution instanceof AuditStorageDescriptor) { AuditStorageDescriptor auditStorageDesc = (AuditStorageDescriptor) contribution; auditStorageDescriptors.put(auditStorageDesc.getId(), auditStorageDesc); } }
log.debug("New authentication chain powered by " + contributor.getName()); authChain.clear(); authChain.addAll(chainContrib.getPluginsNames());
@Override public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { if (EVENT_LISTENER_XP.equals(extensionPoint)) { EventListenerDescriptor descriptor = (EventListenerDescriptor) contribution; descriptor.setRuntimeContext(contributor.getRuntimeContext()); try { service.addEventListener(descriptor); } catch (RuntimeException e) { String msg = "Failed to register event listener in component '" + contributor.getName() + "': error initializing event listener '" + descriptor.getName() + "' (" + e.toString() + ')'; Framework.getRuntime().getMessageHandler().addError(msg); } } else if (EVENT_PIPE_XP.equals(extensionPoint)) { EventPipeDescriptor descriptor = (EventPipeDescriptor) contribution; service.addEventPipe(descriptor); } else if (EVENT_DISPATCHER_XP.equals(extensionPoint)) { EventDispatcherDescriptor descriptor = (EventDispatcherDescriptor) contribution; service.addEventDispatcher(descriptor); } }
+ "point '%s': a compatibility registration was performed but it may not be " + "accurate. Note that the 'flavor' processor should be used with this resource.", style.getName(), contributor.getName(), WR_EX); DeprecationLogger.log(message, "7.4"); Framework.getRuntime().getMessageHandler().addWarning(message); String message = String.format("Resource '%s' on component %s should now be contributed to extension " + "point '%s': a compatibility registration was performed but it may not be accurate.", resource.getName(), contributor.getName(), WR_EX); DeprecationLogger.log(message, "7.4"); Framework.getRuntime().getMessageHandler().addWarning(message);
service.putOperation(opc.type, opc.replace, contributor.getName().toString(), widgetDefinitionList); } catch (OperationException e) { throw new RuntimeException(e);
"Versioning rule for '%s' on component %s should now be contributed to extension points '%s', " + "'%s' and '%s': a compatibility registration was performed but it may not be accurate.", (rule).getTypeName(), contributor.getName(), VERSIONING_POLICY_XP, VERSIONING_FILTER_XP, VERSIONING_RESTRICTION_XP); DeprecationLogger.log(message, "9.1"); String message = String.format("Default versioning rule on component %s should now be contributed to " + "extension points '%s' and '%s': a compatibility registration was performed but it may not be " + "accurate.", contributor.getName(), VERSIONING_POLICY_XP, VERSIONING_RESTRICTION_XP); DeprecationLogger.log(message, "9.1"); Framework.getRuntime().getMessageHandler().addWarning(message);