class AppFormerJsActivityLoader implements PlaceManagerImpl.AppFormerActivityLoader {

    Optional<String> getScriptFileName(final String componentId) {

        final Optional<String> editorScriptUrl = ofNullable(editors.get(componentId))
                .map(AppFormerComponentsRegistry.Entry::getSource);

        return editorScriptUrl.isPresent()
                ? editorScriptUrl
                : ofNullable(components.get(componentId));
    }

    @Inject public  AppFormerJsActivityLoader(final Promises promises,
                                     final ActivityManager activityManager,
                                     final ActivityBeansCache activityBeansCache,
                                     final PlaceManager placeManager,
                                     final LazyLoadingScreen lazyLoadingScreen,
                                     final Event<ActivityLazyLoaded> activityLazyLoadedEvent,
                                     final @Shadowed Instance<JsWorkbenchEditorActivity> jsWorkbenchEditorActivityInstance,
                                     final AppFormerComponentsRegistry appFormerComponentsRegistry);

}