public static <T> ComponentAdaptor<T> create(ComponentId globalComponentId, T model) { return new ComponentAdaptor<>(globalComponentId, model); }
public void register(ChainSpecification chainSpecification) { chainSpecifications.register(chainSpecification.componentId, ComponentAdaptor.create(chainSpecification.componentId, chainSpecification)); }
private SourceGroup getGroup(ComponentId sourceId) { ComponentAdaptor<SourceGroup> group = sourceGroups.getComponent(sourceId); if (group == null) { group = new ComponentAdaptor<>(sourceId, new SourceGroup(sourceId)); sourceGroups.register(group.getId(), group); } return group.model; }
private SortedSet<String> allProviderIdsStringValue() { SortedSet<String> result = new TreeSet<>(); for (ComponentAdaptor<SearchChainInvocationSpec> providerSource : providerSources.allComponents()) { result.add(providerSource.getId().stringValue()); } return result; }
public void addSource(ComponentId providerId, SearchChainInvocationSpec searchChainInvocationSpec, boolean isDefaultProviderForSource) { providerSources.register(providerId, new ComponentAdaptor<>(providerId, searchChainInvocationSpec)); if (isDefaultProviderForSource) { setDefaultProviderSource(searchChainInvocationSpec); } }
public void register(ComponentId globalComponentId, ChainedComponentModel componentModel) { assert (componentModel.getComponentId().withoutNamespace().equals( globalComponentId.withoutNamespace())); componentModels.register(globalComponentId, ComponentAdaptor.create(globalComponentId, componentModel)); }