@studyportals/fawkes 8.7.1-1 → 8.7.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/organisations/SearchIndexabilityManager.js +1 -2
- package/dist/src/organisations/policies/index.d.ts +0 -1
- package/dist/src/organisations/policies/index.js +0 -1
- package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceTuitionFee.js +51 -0
- package/dist/src/programmes/policies/ContinentTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentTuitionFee.js +46 -0
- package/dist/src/programmes/policies/CountryTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/CountryTuitionFee.js +46 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.js +54 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +14 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +61 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.d.ts +14 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.js +54 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.d.ts +14 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +58 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +46 -0
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.d.ts +17 -0
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +54 -0
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +1 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
|
-
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea,
|
|
2
|
+
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, CountryCity, CountryAreaCity } from '../organisations/policies';
|
|
3
3
|
export class SearchIndexabilityManager {
|
|
4
4
|
policies;
|
|
5
5
|
constructor(portalType, seoInfoBase, filterState, sortingState, applicationState) {
|
|
@@ -22,7 +22,6 @@ export class SearchIndexabilityManager {
|
|
|
22
22
|
new CountryAttendance(dependencies),
|
|
23
23
|
new Unfiltered(dependencies),
|
|
24
24
|
new RankedArea(dependencies),
|
|
25
|
-
new RankedAreaDiscipline(dependencies),
|
|
26
25
|
new RankedAttendance(dependencies),
|
|
27
26
|
new RankedAttendanceDiscipline(dependencies),
|
|
28
27
|
new RankedContinent(dependencies),
|
|
@@ -8,7 +8,6 @@ export * from './our-picks/CountryAreaCity';
|
|
|
8
8
|
export * from './our-picks/CountryAttendance';
|
|
9
9
|
export * from './our-picks/Unfiltered';
|
|
10
10
|
export * from './ranked/RankedArea';
|
|
11
|
-
export * from './ranked/RankedAreaDiscipline';
|
|
12
11
|
export * from './ranked/RankedAttendance';
|
|
13
12
|
export * from './ranked/RankedAttendanceDiscipline';
|
|
14
13
|
export * from './ranked/RankedContinent';
|
|
@@ -8,7 +8,6 @@ export * from './our-picks/CountryAreaCity';
|
|
|
8
8
|
export * from './our-picks/CountryAttendance';
|
|
9
9
|
export * from './our-picks/Unfiltered';
|
|
10
10
|
export * from './ranked/RankedArea';
|
|
11
|
-
export * from './ranked/RankedAreaDiscipline';
|
|
12
11
|
export * from './ranked/RankedAttendance';
|
|
13
12
|
export * from './ranked/RankedAttendanceDiscipline';
|
|
14
13
|
export * from './ranked/RankedContinent';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
8
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
9
|
+
export declare class AttendanceTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filterKeys: FilterKey[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule | AffordableTuitionFeeRule)[];
|
|
14
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
|
+
protected generateUrls(): Promise<string[]>;
|
|
16
|
+
get filterCombination(): FilterCombinations;
|
|
17
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { TuitionFeeFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
5
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
8
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
9
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
10
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
11
|
+
export class AttendanceTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
12
|
+
name = 'Tuition Fee Attendance Policy';
|
|
13
|
+
description = 'Determines indexing rules for pages filtered by tuition fee and attendance.';
|
|
14
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
18
|
+
new OnlyFiltersSelectedRule([FilterKey.DELIVERY_METHOD, FilterKey.TUITION_FEE]),
|
|
19
|
+
new OnlineAttendanceRule(),
|
|
20
|
+
new AffordableTuitionFeeRule()
|
|
21
|
+
];
|
|
22
|
+
constructor(dependencies) {
|
|
23
|
+
super(dependencies);
|
|
24
|
+
this.initateBaseRules();
|
|
25
|
+
}
|
|
26
|
+
async generateUrls() {
|
|
27
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
28
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
29
|
+
const paths = [];
|
|
30
|
+
const affordableTuition = tuitionFeeFragments.find(t => t.id === TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED);
|
|
31
|
+
if (!affordableTuition) {
|
|
32
|
+
return paths;
|
|
33
|
+
}
|
|
34
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
35
|
+
for (const attendance of attendanceFragments) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
38
|
+
[FilterKey.TUITION_FEE, [affordableTuition.id]]
|
|
39
|
+
]);
|
|
40
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
+
if (result) {
|
|
42
|
+
paths.push(this.getPathWithPageNumber(`${affordableTuition.path}/${attendance.path}`, pageNumber));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return paths;
|
|
47
|
+
}
|
|
48
|
+
get filterCombination() {
|
|
49
|
+
return FilterCombinations.ATTENDANCE_TUITION_FEE;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class ContinentTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class ContinentTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Continent Tuition Fee Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both continent, and tuition fee, priotizing combinations with affordable tuition fees.';
|
|
12
|
+
filterKeys = [FilterKey.CONTINENT, FilterKey.TUITION_FEE];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.CONTINENT, FilterKey.TUITION_FEE]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const continent of continentFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
32
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${continent.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.CONTINENT_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class CountryTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class CountryTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Country Tuition Fee Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both country, and tuition fee.';
|
|
12
|
+
filterKeys = [FilterKey.COUNTRY, FilterKey.TUITION_FEE];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.COUNTRY, FilterKey.TUITION_FEE]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.COUNTRY_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
8
|
+
export declare class DegreeAreaTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { AreaPresenter } from '../../presenters/AreaPresenter';
|
|
7
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
10
|
+
export class DegreeAreaTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Degree Area Tuition fee Policy';
|
|
12
|
+
description = 'Controls indexing of pages filtered by geographic areas and tuition fees.';
|
|
13
|
+
filterKeys = [FilterKey.AREA, FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.COUNTRY];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.AREA),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
19
|
+
new OnlyFiltersSelectedRule([FilterKey.AREA, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE]),
|
|
20
|
+
new AffordableTuitionFeeRule()
|
|
21
|
+
];
|
|
22
|
+
constructor(dependencies) {
|
|
23
|
+
super(dependencies);
|
|
24
|
+
this.initateBaseRules();
|
|
25
|
+
}
|
|
26
|
+
async generateUrls() {
|
|
27
|
+
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
28
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
29
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
30
|
+
const paths = [];
|
|
31
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
32
|
+
for (const degree of degreeFragments) {
|
|
33
|
+
for (const area of areaFragments) {
|
|
34
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
35
|
+
const filterKeyValues = new Map([
|
|
36
|
+
[FilterKey.AREA, [area.id]],
|
|
37
|
+
[FilterKey.COUNTRY, [area.countryId]],
|
|
38
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
39
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${tuitionFee.path}/${area.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DEGREE_AREA_TUITION_FEE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
3
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
4
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
5
|
+
import { IRule } from '../../common/IRule';
|
|
6
|
+
export declare class DegreeTuitionFeeAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly filterKeys: FilterKey[];
|
|
10
|
+
protected readonly rules: IRule[];
|
|
11
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
12
|
+
protected generateUrls(): Promise<string[]>;
|
|
13
|
+
get filterCombination(): FilterCombinations;
|
|
14
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { TuitionFeeFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
5
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
10
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
11
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
12
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
13
|
+
export class DegreeTuitionFeeAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
14
|
+
name = 'Tuition Fee Attendance Degree Policy';
|
|
15
|
+
description = 'Determines indexing rules for pages filtered by tuition fee, attendance, and degree type.';
|
|
16
|
+
filterKeys = [FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD];
|
|
17
|
+
rules;
|
|
18
|
+
constructor(dependencies) {
|
|
19
|
+
super(dependencies);
|
|
20
|
+
const portalType = dependencies.portalType;
|
|
21
|
+
this.rules = [
|
|
22
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
23
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
24
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
25
|
+
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD]),
|
|
26
|
+
new IndexableDegreeRule(portalType),
|
|
27
|
+
new OnlineAttendanceRule(),
|
|
28
|
+
new AffordableTuitionFeeRule()
|
|
29
|
+
];
|
|
30
|
+
this.initateBaseRules();
|
|
31
|
+
}
|
|
32
|
+
async generateUrls() {
|
|
33
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
34
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
35
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
36
|
+
const paths = [];
|
|
37
|
+
const affordableTuition = tuitionFeeFragments.find(t => t.id === TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED);
|
|
38
|
+
if (!affordableTuition) {
|
|
39
|
+
return paths;
|
|
40
|
+
}
|
|
41
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
42
|
+
for (const degree of degreeFragments) {
|
|
43
|
+
for (const attendance of attendanceFragments) {
|
|
44
|
+
const filterKeyValues = new Map([
|
|
45
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
46
|
+
[FilterKey.TUITION_FEE, [affordableTuition.id]],
|
|
47
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
48
|
+
]);
|
|
49
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
50
|
+
if (result) {
|
|
51
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${affordableTuition.path}/${attendance.path}`, pageNumber));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return paths;
|
|
57
|
+
}
|
|
58
|
+
get filterCombination() {
|
|
59
|
+
return FilterCombinations.DEGREE_ATTENDANCE_TUITION_FEE;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
3
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
4
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
5
|
+
import { IRule } from '../../common/IRule';
|
|
6
|
+
export declare class DegreeTuitionFeeContinent extends ProgrammesBaseIndexabilityPolicy {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly filterKeys: FilterKey[];
|
|
10
|
+
protected readonly rules: IRule[];
|
|
11
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
12
|
+
protected generateUrls(): Promise<string[]>;
|
|
13
|
+
get filterCombination(): FilterCombinations;
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
9
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
10
|
+
export class DegreeTuitionFeeContinent extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Degree Tuition Fee Continent Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by degree type, tuition fee, and continent.';
|
|
13
|
+
filterKeys = [FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.CONTINENT];
|
|
14
|
+
rules;
|
|
15
|
+
constructor(dependencies) {
|
|
16
|
+
super(dependencies);
|
|
17
|
+
const portalType = dependencies.portalType;
|
|
18
|
+
this.rules = [
|
|
19
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
20
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
21
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
22
|
+
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.CONTINENT]),
|
|
23
|
+
new IndexableDegreeRule(portalType)
|
|
24
|
+
];
|
|
25
|
+
this.initateBaseRules();
|
|
26
|
+
}
|
|
27
|
+
async generateUrls() {
|
|
28
|
+
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
29
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
30
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
31
|
+
const paths = [];
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const continent of continentFragments) {
|
|
34
|
+
for (const degree of degreeFragments) {
|
|
35
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
38
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
39
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${tuitionFee.path}/${continent.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DEGREE_CONTINENT_TUITION_FEE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
3
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
4
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
5
|
+
import { IRule } from '../../common/IRule';
|
|
6
|
+
export declare class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly filterKeys: FilterKey[];
|
|
10
|
+
protected readonly rules: IRule[];
|
|
11
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
12
|
+
protected generateUrls(): Promise<string[]>;
|
|
13
|
+
get filterCombination(): FilterCombinations;
|
|
14
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
10
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
11
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
12
|
+
export class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
13
|
+
name = 'Degree Format Tuition Fee Policy';
|
|
14
|
+
description = 'Determines indexing rules for pages filtered by degree type, format and tuition fee.';
|
|
15
|
+
filterKeys = [FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.ATTENDANCE];
|
|
16
|
+
rules;
|
|
17
|
+
constructor(dependencies) {
|
|
18
|
+
super(dependencies);
|
|
19
|
+
const portalType = dependencies.portalType;
|
|
20
|
+
this.rules = [
|
|
21
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
22
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
23
|
+
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
24
|
+
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE, FilterKey.ATTENDANCE]),
|
|
25
|
+
new IndexableDegreeRule(portalType),
|
|
26
|
+
new AffordableTuitionFeeRule(),
|
|
27
|
+
new PartTimeFormatRule()
|
|
28
|
+
];
|
|
29
|
+
this.initateBaseRules();
|
|
30
|
+
}
|
|
31
|
+
async generateUrls() {
|
|
32
|
+
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
33
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
34
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
35
|
+
const paths = [];
|
|
36
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
37
|
+
for (const format of formatFragments) {
|
|
38
|
+
for (const degree of degreeFragments) {
|
|
39
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
40
|
+
const filterKeyValues = new Map([
|
|
41
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
42
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
43
|
+
[FilterKey.ATTENDANCE, [format.id]],
|
|
44
|
+
]);
|
|
45
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
46
|
+
if (result) {
|
|
47
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${tuitionFee.path}/${format.path}`, pageNumber));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return paths;
|
|
54
|
+
}
|
|
55
|
+
get filterCombination() {
|
|
56
|
+
return FilterCombinations.DEGREE_FORMAT_TUITION_FEE;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class DisciplineTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class DisciplineTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Discipline Tuition Fee Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both discipline, and tuition fee.';
|
|
12
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.TUITION_FEE];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.TUITION_FEE]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const discipline of disciplineFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
32
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${discipline.path}/${tuitionFee.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.DISCIPLINE_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
7
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
9
|
+
export declare class DisciplineTuitionFeeAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filterKeys: FilterKey[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule | AffordableTuitionFeeRule)[];
|
|
14
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
|
+
protected generateUrls(): Promise<string[]>;
|
|
16
|
+
get filterCombination(): FilterCombinations;
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
7
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
9
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
10
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
11
|
+
export class DisciplineTuitionFeeAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
12
|
+
name = 'Discipline Tuition Fee Attendance Policy';
|
|
13
|
+
description = 'Determines indexing rules for pages filtered by discipline, tuition fee and study format (online, on-campus, etc.).';
|
|
14
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
19
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD]),
|
|
20
|
+
new AffordableTuitionFeeRule(),
|
|
21
|
+
new OnlineAttendanceRule()
|
|
22
|
+
];
|
|
23
|
+
constructor(dependencies) {
|
|
24
|
+
super(dependencies);
|
|
25
|
+
this.initateBaseRules();
|
|
26
|
+
}
|
|
27
|
+
async generateUrls() {
|
|
28
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
29
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
30
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
31
|
+
const paths = [];
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const discipline of disciplineFragments) {
|
|
34
|
+
for (const attendance of attendanceFragments) {
|
|
35
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
38
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
39
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${attendance.path}/${discipline.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DISCIPLINE_TUITION_FEE_ATTENDANCE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
2
|
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
3
|
-
import { Area, AreaAttendance, Attendance, Continent, Country, CountryCity, CountryAttendance, RankedArea,
|
|
3
|
+
import { Area, AreaAttendance, Attendance, Continent, Country, CountryCity, CountryAttendance, RankedArea, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, Unfiltered } from '../organisations/policies';
|
|
4
4
|
import { AreaPresenter } from '../presenters/AreaPresenter';
|
|
5
5
|
import { AttendancePresenter } from '../presenters/AttendancePresenter';
|
|
6
6
|
import { ContinentPresenter } from '../presenters/ContinentPresenter';
|
|
@@ -33,7 +33,6 @@ export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGener
|
|
|
33
33
|
new CountryAttendance(dependencies),
|
|
34
34
|
new Unfiltered(dependencies),
|
|
35
35
|
new RankedArea(dependencies),
|
|
36
|
-
new RankedAreaDiscipline(dependencies),
|
|
37
36
|
new RankedAttendance(dependencies),
|
|
38
37
|
new RankedAttendanceDiscipline(dependencies),
|
|
39
38
|
new RankedContinent(dependencies),
|