init method

dynamic init(
  1. ComponentConstructor blockingDashboardComponentConstructorDefault,
  2. ComponentEditorConstructor blockingDashboardComponentEditorConstructor,
  3. ComponentConstructor memberDashboardComponentConstructorDefault,
  4. ComponentEditorConstructor memberDashboardComponentEditorConstructor,
)

Implementation

init(
  ComponentConstructor blockingDashboardComponentConstructorDefault,
  ComponentEditorConstructor blockingDashboardComponentEditorConstructor,
  ComponentConstructor memberDashboardComponentConstructorDefault,
  ComponentEditorConstructor memberDashboardComponentEditorConstructor,
) {
  Apis.apis().getRegistryApi().addInternalComponents('eliud_core_model', [
    "appPolicys",
    "blockings",
    "blockingDashboards",
    "memberDashboards",
  ]);

  Apis.apis().getRegistryApi().addDropDownSupporter(
      "blockingDashboards", DropdownButtonComponentFactory());
  Apis.apis().getRegistryApi().register(
      componentName: "blockingDashboards",
      componentConstructor: blockingDashboardComponentConstructorDefault);
  Apis.apis().getRegistryApi().addDropDownSupporter(
      "memberDashboards", DropdownButtonComponentFactory());
  Apis.apis().getRegistryApi().register(
      componentName: "memberDashboards",
      componentConstructor: memberDashboardComponentConstructorDefault);
  Apis.apis().getRegistryApi().addComponentSpec('eliud_core_model', 'core', [
    ComponentSpec(
        'blockingDashboards',
        blockingDashboardComponentConstructorDefault,
        BlockingDashboardComponentSelector(),
        blockingDashboardComponentEditorConstructor,
        ({String? appId}) => blockingDashboardRepository(appId: appId)!),
    ComponentSpec(
        'memberDashboards',
        memberDashboardComponentConstructorDefault,
        MemberDashboardComponentSelector(),
        memberDashboardComponentEditorConstructor,
        ({String? appId}) => memberDashboardRepository(appId: appId)!),
  ]);
  Apis.apis().getRegistryApi().registerRetrieveRepository('eliud_core_model',
      'accesss', ({String? appId}) => accessRepository(appId: appId)!);
  Apis.apis().getRegistryApi().registerRetrieveRepository('eliud_core_model',
      'appPolicys', ({String? appId}) => appPolicyRepository(appId: appId)!);
  Apis.apis().getRegistryApi().registerRetrieveRepository(
      'eliud_core_model',
      'backendRequests',
      ({String? appId}) => backendRequestRepository(appId: appId)!);
  Apis.apis().getRegistryApi().registerRetrieveRepository(
      'eliud_core_model',
      'blockingDashboards',
      ({String? appId}) => blockingDashboardRepository(appId: appId)!);
  Apis.apis().getRegistryApi().registerRetrieveRepository(
      'eliud_core_model',
      'memberDashboards',
      ({String? appId}) => memberDashboardRepository(appId: appId)!);
}