getApplicationCatalog method

  1. @override
Future<List<PortalApplicationCategoryDto>> getApplicationCatalog()
override

Fetches every application category and browser-openable application available to the current portal account in Chinese and English.

The portal stores language in the server session, so implementations switch and fetch the two languages sequentially, merge by stable portal identifiers, and restore the user's original portal language before returning. SSO operations are serialized with these temporary switches so browser handoff keeps its established language behavior. English is optional: when that fetch is unavailable, Chinese data is still returned. Portal folders are traversed recursively. The portal's own bookmark state is intentionally not read or changed; favorites in Tattoo are app-local data managed by the repository.

Requires an active portal session (call login first).

Implementation

@override
Future<List<PortalApplicationCategoryDto>> getApplicationCatalog() async {
  return applicationCatalogResult ??
      [
        (
          distinguishedName: 'OU=aa,OU=aproot',
          nameZh: '教務系統',
          nameEn: 'System of Academic Affairs',
          applications: [
            (
              code: PortalServiceCode.courseService.code,
              nameZh: '課程系統',
              nameEn: 'Curriculum System',
              iconUrl: null,
            ),
            (
              code: PortalServiceCode.iSchoolPlusService.code,
              nameZh: '北科i學園PLUS(校外連線請用VPN)',
              nameEn: 'ischool_plus(Please use VPN for off-campus)',
              iconUrl: null,
            ),
          ],
        ),
        (
          distinguishedName: 'OU=sa,OU=aproot',
          nameZh: '學務系統',
          nameEn: 'Student Affairs System',
          applications: [
            (
              code: PortalServiceCode.studentQueryService.code,
              nameZh: '學生查詢專區',
              nameEn: 'Student Inquiry System',
              iconUrl: null,
            ),
            (
              code: 'sa_010_oauth',
              nameZh: '學生請假系統',
              nameEn: 'Student Leave System',
              iconUrl: null,
            ),
          ],
        ),
      ];
}