Add all features declared in configuration.

@param featurable The featurable to handle.
@param services The services reference.
@param setup The setup reference.
516688
private static void addFeatures(Featurable featurable, Services services, Setup setup)
    {
        final List<Feature> rawFeatures = FeaturableConfig.getFeatures(services, setup);
        final int length = rawFeatures.size();
        for (int i = 0; i < length; i++)
        {
            final Feature feature = rawFeatures.get(i);
            featurable.addFeature(feature);
        }
        featurable.addAfter(services, setup);
    }
956519
@VisibleForTesting
  void addConfiguration(CombinedConfiguration combinedConfiguration,
      final Configuration configuration) {
    if (configuration instanceof AbstractConfiguration) {
      combinedConfiguration.addConfiguration((AbstractConfiguration) configuration);
    } else {
      combinedConfiguration.addConfiguration(setupConfiguration(new AbstractConfiguration() {

        @Override
        public boolean isEmpty() {
          return configuration.isEmpty();
        }

        @Override
        public Object getProperty(String key) {
          return configuration.getProperty(key);
        }

        @Override
        @SuppressWarnings("rawtypes") // No rawtype in class.
        public Iterator getKeys() {
          return configuration.getKeys();
        }

        @Override
        public boolean containsKey(String key) {
          return configuration.containsKey(key);
        }

        @Override
        protected void addPropertyDirect(String key, Object value) {
          configuration.addProperty(key, value);
        }
      }));
    }
  }
739989
public void install(Map<String, Pair<Service, Persistence>> services) {
        for (Spec spec: _specifications) {
            if (spec.service.equals(GLOBAL_ALL_SERVICES)) {
                for (Map.Entry<String, Pair<Service, Persistence>> service: services.entrySet()) {
                    try {
                        if (spec.milestone == null) {
                            if (service.getValue().first instanceof Service.Extendable) {
                                ((Service.Extendable)service.getValue().first).setFilter((Service.Filter)spec.augment);
                            }
                        } else {
                            ServiceMilestone.attach(service.getValue().first, spec.milestone, (ServiceMilestone.Evaluation)spec.augment);
                        }
                    } catch (Exception x) {
                        _logger.log(Level.WARNING, service.getKey(), x);
                    }
                }
            } else if (spec.service.equals(MODULE_ALL_SERVICES)) {
                for (Map.Entry<String, Pair<Service, Persistence>> service: services.entrySet()) {
                    try {
                        if (spec.milestone == null) {
                            if (service.getKey().startsWith(_module + '/') && service.getValue().first instanceof Service.Extendable) {
                                ((Service.Extendable)service.getValue().first).setFilter((Service.Filter)spec.augment);
                            }
                        } else {
                            ServiceMilestone.attach(service.getValue().first, spec.milestone, (ServiceMilestone.Evaluation)spec.augment);
                        }
                    } catch (Exception x) {
                        _logger.log(Level.WARNING, service.getKey(), x);
                    }
                }
            } else if (spec.service.indexOf('/') > -1) {
                try {
                    if (spec.milestone == null) {
                        ((Service.Extendable)services.get(spec.service).first).setFilter((Service.Filter)spec.augment);
                    } else {
                        ServiceMilestone.attach(services.get(spec.service).first, spec.milestone, (ServiceMilestone.Evaluation)spec.augment);
                    }
                } catch (Exception x) {
                    _logger.log(Level.WARNING, spec.service, x);
                }
            } else {
                try {
                    if (spec.milestone == null) {
                        ((Service.Extendable)services.get(_module + '/' + spec.service).first).setFilter((Service.Filter)spec.augment);
                    } else {
                        ServiceMilestone.attach(services.get(_module + '/' + spec.service).first, spec.milestone, (ServiceMilestone.Evaluation)spec.augment);
                    }
                } catch (Exception x) {
                    _logger.log(Level.WARNING, spec.service, x);
                }
            }
        }

        _specifications.clear();
        _module = null;
    }
496221
public void configureWelcomeFiles(List<String> welcomePages) {
		this.welcomePages = welcomePages;
		((ResourceHandler) handler).setWelcomeFiles();
		((ResourceHandler) handler).addWelcomeFiles(welcomePages.toArray(new String[welcomePages.size()]));
	}
244448
public void addFeature(com.ibm.websphere.servlet.container.WebContainer.Feature feature) {
        this.features.add(feature);
    }
571445
public void addFeatures(Collection<String> featuresToAdd) {
        if (featuresToAdd == null) return;
        for (String feature : featuresToAdd) {
            addFeature(feature);
        }
    }
234669
public void setConfigurations(java.util.Collection<java.util.Map<String, String>> configurations) {
        if (configurations == null) {
            this.configurations = null;
            return;
        }

        this.configurations = new java.util.ArrayList<java.util.Map<String, String>>(configurations);
    }
849154
private void initEmbeddedServices(String[] requestedServices) {
        Set<String> serviceSet = new LinkedHashSet<>();
        if (requestedServices != null) {
            serviceSet.addAll(Arrays.asList(requestedServices));
        }
        addRequiredServices(serviceSet);
        initServices(serviceSet);
    }
1107132
public static void putConfigurationIntoProperties(Configuration configuration, Properties properties) {
    for (Iterator<Entry<String, String>> it = configuration.iterator(); it.hasNext();) {
      Entry<String, String> entry = it.next();
      properties.put(entry.getKey(), entry.getValue());
    }
  }
841332
public void addConfiguredFileset(FileSet fs) {
        File dir = fs.getDir();
        DirectoryScanner ds = fs.getDirectoryScanner();
        String[] fileNames = ds.getIncludedFiles();
        for (String fileName : fileNames) {
            featureFiles.add(new File(dir, fileName));
        }
    }
987243
@Override
    public void installProvider(boolean clientSide, List<Object> providers, Set<String> features) {
        if (!clientSide) {
            providers.add(new LibertySseEventSinkContextProvider());
            providers.add(new SseContextProvider());
        }
    }
267630
public void setConfigurations(Collection<? extends Configuration> configurations) {
		Assert.notNull(configurations, "Configurations must not be null");
		this.configurations = new ArrayList<>(configurations);
	}
1079051
def add_service(self, service):
        
        if (self.service is None):
            self.service = service
        elif (isinstance(self.service, dict)):
            self.service = [self.service, service]
        else:
            self.service.append(service)
126339
@Override
  protected void configure() {

    bind(DiscoveryService.class).to(BaseDiscoveryService.class);

    bind(OperatingSystemDetectionStrategy.class)
        .to(NameSubstringBasedOperatingSystemDetectionStrategy.class);
  }
347496
@Override
    protected ServiceRegistration<D> addService(S service, ServiceProperties props) {
        D decorator = createDecorator(service, props);
        if (decorator == null) {
            return null;
        }
        Dictionary<String, ?> decoratorServiceProps = decoratorServiceProps(props);
        getLogger().info("Registering decorator service {} with properties {}", decoratorType.getSimpleName(), decoratorServiceProps);
        return getBundleContext().registerService(decoratorType, decorator, decoratorServiceProps);
    }
31373
private void addVetoedClasses(String serviceName, String serviceImpls, ClassLoader classLoader,
        Map<Class<?>, Set<Class<?>>> vetoed) {
        try {
            final Class<?> serviceClass = classLoader.loadClass(serviceName);
            final Set<Class<?>> classes = loadVetoedServiceImpl(serviceImpls, classLoader);

            final Set<Class<?>> registeredVetoedClasses = vetoed.get(serviceClass);
            if (registeredVetoedClasses == null) {
                vetoed.put(serviceClass, classes);
            } else {
                registeredVetoedClasses.addAll(classes);
            }
        } catch (ClassNotFoundException e) {
            // ignores since this is a veto that it is not applicable
        }
    }
496235
public ViewTransitionBuilder addSetup(@NonNull ViewTransition.Setup setup) {
        checkModifiability();
        mSetupList.add(setup);
        return self();
    }