use of org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory in project sling by apache.
the class SlingContextImpl method registerDefaultServices.
/**
* Default services that should be available for every unit test
*/
protected void registerDefaultServices() {
// scripting services (required by sling models impl since 1.3.6)
registerInjectActivateService(new ScriptEngineManagerFactory());
registerInjectActivateService(new BindingsValuesProvidersByContextImpl());
// sling models
registerInjectActivateService(new ModelAdapterFactory());
registerInjectActivateServiceByClassName("org.apache.sling.models.impl.FirstImplementationPicker", "org.apache.sling.models.impl.ResourceTypeBasedResourcePicker", "org.apache.sling.models.impl.injectors.BindingsInjector", "org.apache.sling.models.impl.injectors.ChildResourceInjector", "org.apache.sling.models.impl.injectors.OSGiServiceInjector", "org.apache.sling.models.impl.injectors.RequestAttributeInjector", "org.apache.sling.models.impl.injectors.ResourcePathInjector", "org.apache.sling.models.impl.injectors.SelfInjector", "org.apache.sling.models.impl.injectors.SlingObjectInjector", "org.apache.sling.models.impl.injectors.ValueMapInjector", "org.apache.sling.models.impl.via.BeanPropertyViaProvider", "org.apache.sling.models.impl.via.ChildResourceViaProvider", "org.apache.sling.models.impl.via.ForcedResourceTypeViaProvider", "org.apache.sling.models.impl.via.ResourceSuperTypeViaProvider");
// other services
registerService(SlingSettingsService.class, new MockSlingSettingService(DEFAULT_RUN_MODES));
registerService(MimeTypeService.class, new MockMimeTypeService());
registerInjectActivateService(new ResourceBuilderFactoryService());
// scan for models defined via bundle headers in classpath
ModelAdapterFactoryUtil.addModelsForManifestEntries(this.bundleContext());
}
Aggregations