From cc1ce3159b30301ebaa8cd3ad10eb2c50a707bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?James=20Pether=20S=C3=B6rling?= Date: Sat, 25 Jan 2025 02:29:44 +0100 Subject: [PATCH] Add menu item ranking constants and update implementations (#7096) * feat: add menu item ranking constants and update related implementations * feat: add ranking menu item constants and implement related menu item factories --- .../api/CountryRankingMenuItemFactory.java | 9 + .../menufactory/api/MenuItemConstants.java | 23 +- ...uItemRankingPageVisitHistoryConstants.java | 7 + .../api/PageCommandBallotConstants.java | 16 + .../api/PageCommandCommitteeConstants.java | 20 ++ .../PageCommandCommitteeRankingConstants.java | 28 ++ .../PageCommandCountryRankingConstants.java | 18 + .../api/PageCommandDocumentConstants.java | 25 ++ .../PageCommandGovernmentBodyConstants.java | 24 ++ ...CommandGovernmentBodyRankingConstants.java | 44 +++ .../api/PageCommandMainViewConstants.java | 26 ++ .../api/PageCommandMinistryConstants.java | 19 ++ .../PageCommandMinistryRankingConstants.java | 40 +++ .../api/PageCommandPageModeConstants.java | 27 ++ .../api/PageCommandParliamentConstants.java | 22 ++ ...PageCommandParliamentRankingConstants.java | 34 ++ .../api/PageCommandPartyConstants.java | 24 ++ .../api/PageCommandPartyRankingConstants.java | 28 ++ ...PageCommandPoliticianRankingConstants.java | 20 ++ .../PageCommandRankingHistoryConstants.java | 25 ++ .../api/PageCommandUserConstants.java | 318 ++---------------- .../api/PageCommandUserHomeConstants.java | 9 + .../api/ParliamentRankingMenuItemFactory.java | 9 + .../api/RankingConstantsNavigationUtil.java | 9 + .../menufactory/api/RankingMenuConstants.java | 12 + .../RankingMenuItemVisitHistoryConstants.java | 6 + .../api/RankingNavigationConstants.java | 12 + .../impl/AbstractMenuItemFactoryImpl.java | 2 +- .../impl/CommitteeMenuItemFactoryImpl.java | 10 +- .../CommitteeRankingMenuItemFactoryImpl.java | 12 +- .../impl/CountryMenuItemFactoryImpl.java | 8 +- .../CountryRankingMenuItemFactoryImpl.java | 36 ++ ...ernmentBodyRankingMenuItemFactoryImpl.java | 10 +- .../impl/MinistryMenuItemFactoryImpl.java | 6 +- .../MinistryRankingMenuItemFactoryImpl.java | 16 +- .../impl/ParliamentMenuItemFactoryImpl.java | 31 +- .../ParliamentRankingMenuItemFactoryImpl.java | 31 ++ .../impl/PartyMenuItemFactoryImpl.java | 7 +- .../impl/PartyRankingMenuItemFactoryImpl.java | 31 +- 39 files changed, 688 insertions(+), 366 deletions(-) create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/CountryRankingMenuItemFactory.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemRankingPageVisitHistoryConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandBallotConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCountryRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandDocumentConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMainViewConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPageModeConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPoliticianRankingConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandRankingHistoryConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserHomeConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/ParliamentRankingMenuItemFactory.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingConstantsNavigationUtil.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuItemVisitHistoryConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingNavigationConstants.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryRankingMenuItemFactoryImpl.java create mode 100644 citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentRankingMenuItemFactoryImpl.java diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/CountryRankingMenuItemFactory.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/CountryRankingMenuItemFactory.java new file mode 100644 index 0000000000..ca04b8f326 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/CountryRankingMenuItemFactory.java @@ -0,0 +1,9 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.vaadin.ui.MenuBar.MenuItem; +import com.vaadin.ui.VerticalLayout; + +public interface CountryRankingMenuItemFactory { + void createOverviewPage(VerticalLayout panelContent); + void createCountryRankingTopics(MenuItem countryMenuItem); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemConstants.java index 20c5511ccf..ab5c44e5a5 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemConstants.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemConstants.java @@ -21,7 +21,10 @@ public interface MenuItemConstants extends MenuItemLeadershipConstants, MenuItemParliamentConstants, MenuItemRiskConstants, - MenuItemPageVisitConstants { + MenuItemPageVisitConstants, + MenuItemRankingPageVisitHistoryConstants, + PageCommandCountryRankingConstants, + RankingNavigationConstants { /** The dashboard. */ // Core navigation constants @@ -33,9 +36,6 @@ public interface MenuItemConstants extends /** The start text. */ String START_TEXT = "Start"; - /** The overview text. */ - String OVERVIEW_TEXT = "Overview"; - /** The ranking text. */ String RANKING_TEXT = "Ranking"; @@ -93,9 +93,6 @@ public interface MenuItemConstants extends /** The Constant MENU_BAR_WIDTH. */ String MENU_BAR_WIDTH = "80%"; - /** The Constant PAGE_VISIT_HISTORY_TEXT. */ - String PAGE_VISIT_HISTORY_TEXT = "Page Visit History"; - /** The Constant PORTAL. */ String PORTAL = "Portal"; @@ -225,9 +222,6 @@ public interface MenuItemConstants extends /** The Constant COUNTRY_INDICATORS_SWEDEN. */ String COUNTRY_INDICATORS_SWEDEN = "Country Indicators Sweden"; - /** The Constant COUNTRY_PAGE_VISIT_HISTORY_TEXT. */ - String COUNTRY_PAGE_VISIT_HISTORY_TEXT = "Country Page Visit History"; - /** The Constant DATA_POINTS_FOR_YEAR_ABOVE. */ int DATA_POINTS_FOR_YEAR_ABOVE = 2000; @@ -258,9 +252,6 @@ public interface MenuItemConstants extends /** The Constant DOCUMENT_ATTACHEMENTS. */ String DOCUMENT_ATTACHEMENTS = "Document Attachments"; - /** The Constant DOCUMENT_PAGE_VISIT_HISTORY_TEXT. */ - String DOCUMENT_PAGE_VISIT_HISTORY_TEXT = "Document Page Visit History"; - /** The Constant DOCUMENT_ACTIVITIES_AND_UPDATES. */ String DOCUMENT_ACTIVITIES_AND_UPDATES = "Document activities and updates"; @@ -294,9 +285,6 @@ public interface MenuItemConstants extends /** The Constant EXPENDITURE. */ String EXPENDITURE = "Expenditure"; - /** The Constant GOVERNMENT_BODY_PAGE_VISIT_HISTORY_TEXT. */ - String GOVERNMENT_BODY_PAGE_VISIT_HISTORY_TEXT = "Government Body Page Visit History"; - /** The Constant HEADCOUNT_DESCRIPTION. */ String HEADCOUNT_DESCRIPTION = "Headcount description"; @@ -306,9 +294,6 @@ public interface MenuItemConstants extends /** The Constant EXPENDITURE_DESCRIPTION. */ String EXPENDITURE_DESCRIPTION = "Expenditure description"; - /** The Constant GOVERNMENT_BODY_PAGE_VISIT_HISTORY_DESCRIPTION. */ - String GOVERNMENT_BODY_PAGE_VISIT_HISTORY_DESCRIPTION = "Government body page visit history description"; - /** The Constant GOVERNMENT_BODIES_HEADCOUNT. */ String GOVERNMENT_BODIES_HEADCOUNT = "Government Bodies Headcount"; diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemRankingPageVisitHistoryConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemRankingPageVisitHistoryConstants.java new file mode 100644 index 0000000000..623f41fd6c --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/MenuItemRankingPageVisitHistoryConstants.java @@ -0,0 +1,7 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + + +public interface MenuItemRankingPageVisitHistoryConstants { + String PAGE_VISIT_HISTORY_TEXT = "Page Visit History"; + String PAGE_VISIT_HISTORY_DESCRIPTION = "View visit history and statistics"; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandBallotConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandBallotConstants.java new file mode 100644 index 0000000000..c941fd0bb7 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandBallotConstants.java @@ -0,0 +1,16 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandBallotConstants { + PageModeMenuCommand COMMAND_BALLOT_OVERVIEW = new PageModeMenuCommand( + UserViews.BALLOT_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_BALLOT_DECISION_SUMMARY = new PageModeMenuCommand( + UserViews.BALLOT_VIEW_NAME, "decisionsummary"); + + PageModeMenuCommand COMMAND_BALLOT_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.BALLOT_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeConstants.java new file mode 100644 index 0000000000..9ad58a0ee9 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeConstants.java @@ -0,0 +1,20 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandCommitteeConstants { + PageModeMenuCommand COMMAND_COMMITTEES_BY_PARTY = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.COMMITTEESBYPARTY.toString()); + + PageModeMenuCommand COMMAND_CURRENT_COMMITTEES_BY_PARTY_DAYS_SERVED = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTCOMMITTEESBYPARTYDAYSSERVED.toString()); + + PageModeMenuCommand COMMAND_CHARTS_CURRENT_COMMITTEES = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, + ChartIndicators.CURRENTCOMMITTEES.toString()); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeRankingConstants.java new file mode 100644 index 0000000000..d78287d848 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCommitteeRankingConstants.java @@ -0,0 +1,28 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandCommitteeRankingConstants { + PageModeMenuCommand COMMAND_COMMITTEE_RANKING_DATAGRID = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.DATAGRID); + + PageModeMenuCommand COMMAND_COMMITTEE_RANKING_OVERVIEW = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_ALL_COMMITTEES_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.ALLCOMMITTEESBYHEADCOUNT.toString()); + + PageModeMenuCommand COMMAND_CURRENT_COMMITTEES_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTCOMMITTEESBYHEADCOUNT.toString()); + + PageModeMenuCommand COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + // Remove this line to avoid ambiguity + // PageModeMenuCommand COMMAND_PAGEVISIT_HISTORY = COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCountryRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCountryRankingConstants.java new file mode 100644 index 0000000000..4261f2b090 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandCountryRankingConstants.java @@ -0,0 +1,18 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandCountryRankingConstants { + // Standardize to: COMMAND_[VIEW]_[ACTION] + PageModeMenuCommand COMMAND_COUNTRY_RANKING_OVERVIEW = new PageModeMenuCommand( + UserViews.COUNTRY_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + // Should be: COMMAND_COUNTRY_RANKING_PAGEVISIT_HISTORY for consistency + PageModeMenuCommand COMMAND_COUNTRY_RANKING_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.COUNTRY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + // Generic command reference + PageModeMenuCommand COMMAND_OVERVIEW = COMMAND_COUNTRY_RANKING_OVERVIEW; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandDocumentConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandDocumentConstants.java new file mode 100644 index 0000000000..4c975bf294 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandDocumentConstants.java @@ -0,0 +1,25 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandDocumentConstants { + PageModeMenuCommand COMMAND_DOCUMENT_ACTIVITY = new PageModeMenuCommand( + UserViews.DOCUMENT_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_DOCUMENT_DETAILS = new PageModeMenuCommand( + UserViews.DOCUMENT_VIEW_NAME, "details"); + + PageModeMenuCommand COMMAND_DOCUMENT_REFERENCES = new PageModeMenuCommand( + UserViews.DOCUMENT_VIEW_NAME, "references"); + + PageModeMenuCommand COMMAND_DOCUMENTS = new PageModeMenuCommand( + UserViews.DOCUMENTS_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_SEARCH_DOCUMENT = new PageModeMenuCommand( + UserViews.SEARCH_DOCUMENT_VIEW_NAME, ""); + + PageModeMenuCommand COMMAND_DOCUMENT_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.DOCUMENT_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyConstants.java new file mode 100644 index 0000000000..97ff3fb4d7 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyConstants.java @@ -0,0 +1,24 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.GovernmentBodyPageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandGovernmentBodyConstants { + PageModeMenuCommand GOVERNMENT_BODY_COMMAND_EXPENDITURE = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_VIEW_NAME, + GovernmentBodyPageMode.EXPENDITURE.toString()); + + PageModeMenuCommand GOVERNMENT_BODY_COMMAND_HEADCOUNT = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_VIEW_NAME, + GovernmentBodyPageMode.HEADCOUNT.toString()); + + PageModeMenuCommand GOVERNMENT_BODY_COMMAND_INCOME = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_VIEW_NAME, + GovernmentBodyPageMode.INCOME.toString()); + + PageModeMenuCommand GOVERNMENT_BODY_COMMAND_OVERVIEW = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_VIEW_NAME, + PageMode.OVERVIEW); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyRankingConstants.java new file mode 100644 index 0000000000..637bb19b0f --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandGovernmentBodyRankingConstants.java @@ -0,0 +1,44 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandGovernmentBodyRankingConstants { + PageModeMenuCommand GOVERNMENT_BODY_COMMAN_OVERVIEW = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_GOVERNMENT_BODY_RANKING_DATAGRID = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.DATAGRID); + + PageModeMenuCommand COMMAND_GOVERNMENT_BODY_RANKING_OVERVIEW = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_HEADCOUNT = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESHEADCOUNT.toString()); + + PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_INCOME = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESINCOME.toString()); + + PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_EXPENDITURE = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESEXPENDITURE.toString()); + + PageModeMenuCommand COMMAND_GOVERNMENT_OUTCOME = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.GOVERNMENTOUTCOME.toString()); + + PageModeMenuCommand COMMAND_CHARTS_ALL_GOVERNMENT_ROLE_GANTT = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.ALLGOVERNMENTROLEGANTT.toString()); + + PageModeMenuCommand GOVERNMENT_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + // Remove this line to avoid ambiguity + // PageModeMenuCommand COMMAND_PAGEVISITHISTORY = GOVERNMENT_RANKING_COMMAND_PAGEVISIT_HISTORY; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMainViewConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMainViewConstants.java new file mode 100644 index 0000000000..e8aad44941 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMainViewConstants.java @@ -0,0 +1,26 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ApplicationPageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.CommonsViews; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; + +public interface PageCommandMainViewConstants { + PageModeMenuCommand COMMAND_MAINVIEW_OVERVIEW = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, + PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_DASHBOARDVIEW_OVERVIEW = new PageModeMenuCommand(CommonsViews.DASHBOARD_VIEW_NAME, + PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_MAINVIEW_PAGEVISITHISTORY = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, + PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand COMMAND_LOGIN = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, + ApplicationPageMode.LOGIN.toString()); + + PageModeMenuCommand COMMAND_LOGOUT = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, + ApplicationPageMode.LOGOUT.toString()); + + PageModeMenuCommand COMMAND_REGISTER = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, + ApplicationPageMode.REGISTER.toString()); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryConstants.java new file mode 100644 index 0000000000..0d03439178 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryConstants.java @@ -0,0 +1,19 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandMinistryConstants { + PageModeMenuCommand MINISTRY_COMMAND_CHARTS_CURRENT_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.MINISTRY_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTMINISTRIESBYHEADCOUNT.toString()); + + PageModeMenuCommand MINISTRY_COMMAND_CHARTS_ALL_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.MINISTRY_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.ALLMINISTRIESBYHEADCOUNT.toString()); + + PageModeMenuCommand MINISTRY_COMMAND_PAGEVISITHISTORY = new PageModeMenuCommand( + UserViews.MINISTRY_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryRankingConstants.java new file mode 100644 index 0000000000..d7a0d2ab1a --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandMinistryRankingConstants.java @@ -0,0 +1,40 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandMinistryRankingConstants { + PageModeMenuCommand COMMAND_MINISTRY_RANKING_DATAGRID = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.DATAGRID); + + PageModeMenuCommand COMMAND_MINISTRY_RANKING_OVERVIEW = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_CHARTS_CURRENT_MINISTRIES_LEADER_SCOREBOARD = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTMINISTRIESLEADERSCORECARD.toString()); + + PageModeMenuCommand COMMAND_CHARTS_CURRENT_MINISTRIES_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTMINISTRIESBYHEADCOUNT.toString()); + + PageModeMenuCommand COMMAND_CHARTS_ALL_MINISTRIES_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.ALLMINISTRIESBYHEADCOUNT.toString()); + + PageModeMenuCommand COMMAND_CHARTS_ALLMINISTRIES_BY_TOTAL_DAYS = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.ALLMINISTRIESBYTOTALDAYS.toString()); + + PageModeMenuCommand COMMAND_CHARTS_CURRENT_PARTIES_BY_HEADCOUNT = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.CURRENTPARTIESBYHEADCOUNT.toString()); + + PageModeMenuCommand MINISTRY_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + // Remove ambiguous constant + // PageModeMenuCommand COMMAND_PAGEVISITHISTORY +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPageModeConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPageModeConstants.java new file mode 100644 index 0000000000..78a6971b8c --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPageModeConstants.java @@ -0,0 +1,27 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandPageModeConstants extends RankingNavigationConstants { + // Generic base commands without view context - define these first + PageModeMenuCommand COMMAND_GENERIC_OVERVIEW = new PageModeMenuCommand("", PageMode.OVERVIEW); + PageModeMenuCommand COMMAND_GENERIC_PAGEVISIT = new PageModeMenuCommand("", PageMode.PAGEVISITHISTORY); + PageModeMenuCommand COMMAND_GENERIC_DATAGRID = new PageModeMenuCommand("", PageMode.DATAGRID); + PageModeMenuCommand COMMAND_GENERIC_CHARTS = new PageModeMenuCommand("", PageMode.CHARTS); + + // Base commands that reference the generic ones - these must come after + PageModeMenuCommand COMMAND_OVERVIEW = COMMAND_GENERIC_OVERVIEW; + PageModeMenuCommand COMMAND_PAGEVISIT = COMMAND_GENERIC_PAGEVISIT; + PageModeMenuCommand COMMAND_DATAGRID = COMMAND_GENERIC_DATAGRID; + PageModeMenuCommand COMMAND_CHARTS = COMMAND_GENERIC_CHARTS; + + // Party ranking commands + PageModeMenuCommand COMMAND_CHARTS_CURRENT_PARTIES_LEADER_SCOREBOARD = + new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS); + PageModeMenuCommand COMMAND_PARTY_RANKING_OVERVIEW = + new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, PageMode.OVERVIEW); + PageModeMenuCommand COMMAND_PARTY_RANKING_DATAGRID = + new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, PageMode.DATAGRID); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentConstants.java new file mode 100644 index 0000000000..a51137338b --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentConstants.java @@ -0,0 +1,22 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandParliamentConstants { + PageModeMenuCommand COMMAND_PARLIAMENT_OVERVIEW = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_RISK_SUMMARY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.RISKSUMMARY.toString()); + + PageModeMenuCommand COMMAND_CHARTS_DECISION_FLOW = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.DECISIONFLOW.toString()); + + PageModeMenuCommand PARLIAMENT_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentRankingConstants.java new file mode 100644 index 0000000000..9b53533256 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandParliamentRankingConstants.java @@ -0,0 +1,34 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandParliamentRankingConstants { + PageModeMenuCommand COMMAND_PARLIAMENT_RANKING_OVERVIEW = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand COMMAND_RISK_SUMMARY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.RISKSUMMARY.toString()); + + PageModeMenuCommand COMMAND_RULE_VIOLATION = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.RULEVIOLATION.toString()); + + PageModeMenuCommand COMMAND_DOCUMENT_ACTIVITY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.DOCUMENTACTIVITY.toString()); + + PageModeMenuCommand COMMAND_DECISION_ACTIVITY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.DECISIONACTIVITY.toString()); + + PageModeMenuCommand COMMAND_CHARTS_DECISION_FLOW = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.DECISIONFLOW.toString()); + + PageModeMenuCommand PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyConstants.java new file mode 100644 index 0000000000..6f8763c6d4 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyConstants.java @@ -0,0 +1,24 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandPartyConstants { + PageModeMenuCommand COMMAND_CHARTS_CURRENT_GOVERNMENT_PARTIES = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, + ChartIndicators.CURRENTGOVERMENTPARTIES.toString()); + + PageModeMenuCommand COMMAND_CHARTS_PARTY_WINNER = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.PARTYWINNER.toString()); + + PageModeMenuCommand COMMAND_CHARTS_PARTY_GENDER = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.PARTYGENDER.toString()); + + PageModeMenuCommand COMMAND_CHARTS_PARTY_AGE = new PageModeMenuCommand( + UserViews.PARLIAMENT_RANKING_VIEW_NAME, + PageMode.CHARTS, ChartIndicators.PARTYAGE.toString()); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyRankingConstants.java new file mode 100644 index 0000000000..0ebcf0ee23 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPartyRankingConstants.java @@ -0,0 +1,28 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandPartyRankingConstants { + // All commands should follow PARTY_RANKING_COMMAND_* pattern + PageModeMenuCommand PARTY_RANKING_COMMAND_DATAGRID = new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, + PageMode.DATAGRID); + + PageModeMenuCommand PARTY_RANKING_COMMAND_OVERVIEW = new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, + PageMode.OVERVIEW); + + PageModeMenuCommand PARTY_RANKING_COMMAND_CHARTS_ALL_PARTIES = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.ALLPARTIES.toString()); + + PageModeMenuCommand PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.CURRENTPARTIES.toString()); + + PageModeMenuCommand PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES_LEADER_SCOREBOARD = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, + ChartIndicators.CURRENTPARTYLEADERSCORECARD.toString()); + + PageModeMenuCommand PARTY_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.PARTY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPoliticianRankingConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPoliticianRankingConstants.java new file mode 100644 index 0000000000..33a4931e03 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandPoliticianRankingConstants.java @@ -0,0 +1,20 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandPoliticianRankingConstants { + PageModeMenuCommand POLITICIAN_RANKING_COMMAND_DATAGRID = new PageModeMenuCommand( + UserViews.POLITICIAN_RANKING_VIEW_NAME, PageMode.DATAGRID); + + PageModeMenuCommand POLITICIAN_RANKING_COMMAND_OVERVIEW = new PageModeMenuCommand( + UserViews.POLITICIAN_RANKING_VIEW_NAME, PageMode.OVERVIEW); + + PageModeMenuCommand POLITICIAN_RANKING_COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand( + UserViews.POLITICIAN_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + // Keep old names for backward compatibility + PageModeMenuCommand COMMAND_POLITICIAN_RANKING_OVERVIEW = POLITICIAN_RANKING_COMMAND_OVERVIEW; + PageModeMenuCommand COMMAND_POLITICIAN_RANKING_DATAGRID = POLITICIAN_RANKING_COMMAND_DATAGRID; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandRankingHistoryConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandRankingHistoryConstants.java new file mode 100644 index 0000000000..4ca293d383 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandRankingHistoryConstants.java @@ -0,0 +1,25 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandRankingHistoryConstants { + PageModeMenuCommand COUNTRY_RANKING_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.COUNTRY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand GOVERNMENT_BODY_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand MINISTRY_RANKING_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand PARTY_RANKING_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); + + PageModeMenuCommand COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY = + new PageModeMenuCommand(UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserConstants.java index 9441a9ec66..5de591d249 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserConstants.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserConstants.java @@ -1,301 +1,23 @@ package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; -import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ApplicationPageMode; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.CommonsViews; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.GovernmentBodyPageMode; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.MinistryPageMode; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; -import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; - -/** - * The Interface MenuItemConstants. - */ -public interface PageCommandUserConstants extends PageCommandAdminConstants { - - /** The command charts all parties. */ - // Page mode commands - PageModeMenuCommand COMMAND_CHARTS_ALL_PARTIES = new PageModeMenuCommand( - UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.ALLPARTIES.toString()); - - /** The command charts current committees. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_COMMITTEES = new PageModeMenuCommand( - UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, - ChartIndicators.CURRENTCOMMITTEES.toString()); - - /** The command charts current government parties. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_GOVERNMENT_PARTIES = new PageModeMenuCommand( - UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, - ChartIndicators.CURRENTGOVERMENTPARTIES.toString()); - - /** The command charts current parties. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_PARTIES = new PageModeMenuCommand( - UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.CURRENTPARTIES.toString()); - - /** - * Commands for different page modes within the Government Body Ranking view. - */ - PageModeMenuCommand GOVERNMENT_BODY_COMMAN_OVERVIEW = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.OVERVIEW); - - /** The government body command datagrid. */ - PageModeMenuCommand GOVERNMENT_BODY_COMMAND_DATAGRID = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.DATAGRID); - - /** The government body command expenditure. */ - PageModeMenuCommand GOVERNMENT_BODY_COMMAND_EXPENDITURE = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - GovernmentBodyPageMode.EXPENDITURE.toString()); - - /** The government body command headcount. */ - PageModeMenuCommand GOVERNMENT_BODY_COMMAND_HEADCOUNT = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - GovernmentBodyPageMode.HEADCOUNT.toString()); - - /** The government body command income. */ - PageModeMenuCommand GOVERNMENT_BODY_COMMAND_INCOME = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - GovernmentBodyPageMode.INCOME.toString()); - - /** The government body min command pagevisithistory. */ - PageModeMenuCommand GOVERNMENT_BODY_MIN_COMMAND_PAGEVISITHISTORY = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.PAGEVISITHISTORY); - - /** The Constant COMMAND_GOVERNMENT_BODIES_EXPENDITURE. */ - PageModeMenuCommand GOVERNMENT_BODY_MIN_COMMAND_GOVERNMENT_BODIES_EXPENDITURE = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - MinistryPageMode.GOVERNMENT_BODIES_EXPENDITURE.toString()); - - /** The Constant COMMAND_GOVERNMENT_BODIES_HEADCOUNT. */ - PageModeMenuCommand GOVERNMENT_BODY_MIN_COMMAND_GOVERNMENT_BODIES_HEADCOUNT = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - MinistryPageMode.GOVERNMENT_BODIES_HEADCOUNT.toString()); - - /** The Constant COMMAND_GOVERNMENT_BODIES_INCOME. */ - PageModeMenuCommand GOVERNMENT_BODY__COMMAND_GOVERNMENT_BODIES_INCOME = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - MinistryPageMode.GOVERNMENT_BODIES_INCOME.toString()); - - - /** The Constant COMMAND_LOGIN. */ - PageModeMenuCommand COMMAND_LOGIN = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, - ApplicationPageMode.LOGIN.toString()); - - /** The Constant COMMAND_LOGOUT. */ - PageModeMenuCommand COMMAND_LOGOUT = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, - ApplicationPageMode.LOGOUT.toString()); - - /** The Constant COMMAND_MAINVIEW_OVERVIEW. */ - PageModeMenuCommand COMMAND_MAINVIEW_OVERVIEW = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COMMAND_DASHBOARDVIEW_OVERVIEW. */ - PageModeMenuCommand COMMAND_DASHBOARDVIEW_OVERVIEW = new PageModeMenuCommand(CommonsViews.DASHBOARD_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COMMAND_MAINVIEW_PAGEVISITHISTORY. */ - PageModeMenuCommand COMMAND_MAINVIEW_PAGEVISITHISTORY = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, - PageMode.PAGEVISITHISTORY); - - - /** The Constant COMMAND_REGISTER. */ - PageModeMenuCommand COMMAND_REGISTER = new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, - ApplicationPageMode.REGISTER.toString()); - - - /** The Constant COMMAND_USERHOME. */ - PageModeMenuCommand COMMAND_USERHOME = new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, ""); - - /** The Constant COMMAND_ALL_COMMITTEES_BY_HEADCOUNT. */ - PageModeMenuCommand COMMAND_ALL_COMMITTEES_BY_HEADCOUNT = new PageModeMenuCommand( - UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.ALLCOMMITTEESBYHEADCOUNT.toString()); - - /** The Constant COMMAND_COMMITTEES_BY_PARTY. */ - PageModeMenuCommand COMMAND_COMMITTEES_BY_PARTY = new PageModeMenuCommand(UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.COMMITTEESBYPARTY.toString()); - - /** The Constant COMMAND_CURRENT_COMMITTEES_BY_HEADCOUNT. */ - PageModeMenuCommand COMMAND_CURRENT_COMMITTEES_BY_HEADCOUNT = new PageModeMenuCommand( - UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.CURRENTCOMMITTEESBYHEADCOUNT.toString()); - - /** The Constant COMMAND_CURRENT_COMMITTEES_BY_PARTY_DAYS_SERVED. */ - PageModeMenuCommand COMMAND_CURRENT_COMMITTEES_BY_PARTY_DAYS_SERVED = new PageModeMenuCommand( - UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.CURRENTCOMMITTEESBYPARTYDAYSSERVED.toString()); - - /** The Constant COMMAND_DATAGRID. */ - PageModeMenuCommand COMMAND_DATAGRID = new PageModeMenuCommand(UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.DATAGRID); - - /** The Constant COMMAND_OVERVIEW. */ - PageModeMenuCommand COMMAND_OVERVIEW = new PageModeMenuCommand(UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COMMAND_PAGEVISIT_HISTORY. */ - PageModeMenuCommand COMMAND_PAGEVISIT_HISTORY = new PageModeMenuCommand(UserViews.COMMITTEE_RANKING_VIEW_NAME, - PageMode.PAGEVISITHISTORY); - - /** The Constant COUNTRY_COMMAND_OVERVIEW. */ - PageModeMenuCommand COUNTRY_COMMAND_OVERVIEW = new PageModeMenuCommand(UserViews.COUNTRY_RANKING_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COUNTRY_COMMAND_PAGEVISITHISTORY. */ - PageModeMenuCommand COUNTRY_COMMAND_PAGEVISITHISTORY = new PageModeMenuCommand( - UserViews.COUNTRY_RANKING_VIEW_NAME, PageMode.PAGEVISITHISTORY); - - /** The Constant COMMAND_COMMITTEE_RANKING_DATAGRID. */ - PageModeMenuCommand COMMAND_COMMITTEE_RANKING_DATAGRID = new PageModeMenuCommand( - UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.DATAGRID); - - /** The Constant COMMAND_COMMITTEE_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_COMMITTEE_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.COMMITTEE_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_COUNTRY_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_COUNTRY_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.COUNTRY_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_DOCUMENTS. */ - PageModeMenuCommand COMMAND_DOCUMENTS = new PageModeMenuCommand(UserViews.DOCUMENTS_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COMMAND_GOVERNMENT_BODY_RANKING_DATAGRID. */ - PageModeMenuCommand COMMAND_GOVERNMENT_BODY_RANKING_DATAGRID = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.DATAGRID); - - /** The Constant COMMAND_GOVERNMENT_BODY_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_GOVERNMENT_BODY_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_MINISTRY_RANKING_DATAGRID. */ - PageModeMenuCommand COMMAND_MINISTRY_RANKING_DATAGRID = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.DATAGRID); - - /** The Constant COMMAND_MINISTRY_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_MINISTRY_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_PARLIAMENT_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_PARLIAMENT_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_PARTY_RANKING_DATAGRID. */ - PageModeMenuCommand COMMAND_PARTY_RANKING_DATAGRID = new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, - PageMode.DATAGRID); - - /** The Constant COMMAND_PARTY_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_PARTY_RANKING_OVERVIEW = new PageModeMenuCommand(UserViews.PARTY_RANKING_VIEW_NAME, - PageMode.OVERVIEW); - - /** The Constant COMMAND_POLITICIAN_RANKING_DATAGRID. */ - PageModeMenuCommand COMMAND_POLITICIAN_RANKING_DATAGRID = new PageModeMenuCommand( - UserViews.POLITICIAN_RANKING_VIEW_NAME, PageMode.DATAGRID); - - /** The Constant COMMAND_POLITICIAN_RANKING_OVERVIEW. */ - PageModeMenuCommand COMMAND_POLITICIAN_RANKING_OVERVIEW = new PageModeMenuCommand( - UserViews.POLITICIAN_RANKING_VIEW_NAME, PageMode.OVERVIEW); - - /** The Constant COMMAND_SEARCH_DOCUMENT. */ - PageModeMenuCommand COMMAND_SEARCH_DOCUMENT = new PageModeMenuCommand(UserViews.SEARCH_DOCUMENT_VIEW_NAME, ""); - - /** The Constant COMMAND_CHARTS_CURRENT_MINISTRIES_LEADER_SCOREBOARD. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_MINISTRIES_LEADER_SCOREBOARD = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.CURRENTMINISTRIESLEADERSCORECARD.toString()); - - /** The Constant COMMAND_CHARTS_CURRENT_PARTIES_LEADER_SCOREBOARD. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_PARTIES_LEADER_SCOREBOARD = new PageModeMenuCommand( - UserViews.PARTY_RANKING_VIEW_NAME, PageMode.CHARTS, - ChartIndicators.CURRENTPARTYLEADERSCORECARD.toString()); - - /** The Constant COMMAND_GOVERNMENT_BODIES_HEADCOUNT. */ - PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_HEADCOUNT = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESHEADCOUNT.toString()); - - /** The Constant COMMAND_GOVERNMENT_BODIES_INCOME. */ - PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_INCOME = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESINCOME.toString()); - - /** The Constant COMMAND_GOVERNMENT_BODIES_EXPENDITURE. */ - PageModeMenuCommand COMMAND_GOVERNMENT_BODIES_EXPENDITURE = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.GOVERNMENTBODIESEXPENDITURE.toString()); - - /** The Constant COMMAND_GOVERNMENT_OUTCOME. */ - PageModeMenuCommand COMMAND_GOVERNMENT_OUTCOME = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.GOVERNMENTOUTCOME.toString()); - - /** The Constant COMMAND_CHARTS_ALL_GOVERNMENT_ROLE_GANTT. */ - PageModeMenuCommand COMMAND_CHARTS_ALL_GOVERNMENT_ROLE_GANTT = new PageModeMenuCommand( - UserViews.GOVERNMENT_BODY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.ALLGOVERNMENTROLEGANTT.toString()); - - /** The Constant COMMAND_CHARTS_CURRENT_MINISTRIES_BY_HEADCOUNT. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_MINISTRIES_BY_HEADCOUNT = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.CURRENTMINISTRIESBYHEADCOUNT.toString()); - - /** The Constant COMMAND_CHARTS_CURRENT_PARTIES_BY_HEADCOUNT. */ - PageModeMenuCommand COMMAND_CHARTS_CURRENT_PARTIES_BY_HEADCOUNT = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.CURRENTPARTIESBYHEADCOUNT.toString()); - - /** The Constant COMMAND_CHARTS_ALLMINISTRIES_BY_TOTAL_DAYS. */ - PageModeMenuCommand COMMAND_CHARTS_ALLMINISTRIES_BY_TOTAL_DAYS = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.ALLMINISTRIESBYTOTALDAYS.toString()); - - /** The Constant COMMAND_CHARTS_ALL_MINISTRIES_BY_HEADCOUNT. */ - PageModeMenuCommand COMMAND_CHARTS_ALL_MINISTRIES_BY_HEADCOUNT = new PageModeMenuCommand( - UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.ALLMINISTRIESBYHEADCOUNT.toString()); - - /** The Constant COMMAND_PAGEVISITHISTORY. */ - PageModeMenuCommand COMMAND_PAGEVISITHISTORY = new PageModeMenuCommand(UserViews.MINISTRY_RANKING_VIEW_NAME, - PageMode.PAGEVISITHISTORY); - - /** The Constant COMMAND_CHARTS_PARTY_WINNER. */ - PageModeMenuCommand COMMAND_CHARTS_PARTY_WINNER = new PageModeMenuCommand( - UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.PARTYWINNER.toString()); - - /** The Constant COMMAND_CHARTS_PARTY_GENDER. */ - PageModeMenuCommand COMMAND_CHARTS_PARTY_GENDER = new PageModeMenuCommand( - UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.PARTYGENDER.toString()); - - /** The Constant COMMAND_CHARTS_PARTY_AGE. */ - PageModeMenuCommand COMMAND_CHARTS_PARTY_AGE = new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.PARTYAGE.toString()); - - /** The Constant COMMAND_RISK_SUMMARY. */ - PageModeMenuCommand COMMAND_RISK_SUMMARY = new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.RISKSUMMARY.toString()); - - /** The Constant COMMAND_RULE_VIOLATION. */ - PageModeMenuCommand COMMAND_RULE_VIOLATION = new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.RULEVIOLATION.toString()); - - /** The Constant COMMAND_DOCUMENT_ACTIVITY. */ - PageModeMenuCommand COMMAND_DOCUMENT_ACTIVITY = new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.DOCUMENTACTIVITY.toString()); - - /** The Constant COMMAND_DECISION_ACTIVITY. */ - PageModeMenuCommand COMMAND_DECISION_ACTIVITY = new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.DECISIONACTIVITY.toString()); - - /** The Constant COMMAND_CHARTS_DECISION_FLOW. */ - PageModeMenuCommand COMMAND_CHARTS_DECISION_FLOW = new PageModeMenuCommand( - UserViews.PARLIAMENT_RANKING_VIEW_NAME, - PageMode.CHARTS, ChartIndicators.DECISIONFLOW.toString()); - +public interface PageCommandUserConstants extends + PageCommandAdminConstants, + PageCommandPartyConstants, + PageCommandPartyRankingConstants, + PageCommandCommitteeConstants, + PageCommandCommitteeRankingConstants, + PageCommandCountryRankingConstants, + PageCommandMinistryRankingConstants, + PageCommandGovernmentBodyRankingConstants, + PageCommandParliamentRankingConstants, + PageCommandPoliticianRankingConstants, + PageCommandDocumentConstants, + PageCommandMinistryConstants, + PageCommandGovernmentBodyConstants, + PageCommandBallotConstants, + PageCommandUserHomeConstants, + PageCommandMainViewConstants, + PageCommandPageModeConstants, + PageCommandParliamentConstants { + } \ No newline at end of file diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserHomeConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserHomeConstants.java new file mode 100644 index 0000000000..34a99a866b --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/PageCommandUserHomeConstants.java @@ -0,0 +1,9 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; +import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; + +public interface PageCommandUserHomeConstants { + // From UserViews: USERHOME_VIEW_NAME + PageModeMenuCommand COMMAND_USERHOME = new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, ""); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/ParliamentRankingMenuItemFactory.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/ParliamentRankingMenuItemFactory.java new file mode 100644 index 0000000000..ed8f496ab3 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/ParliamentRankingMenuItemFactory.java @@ -0,0 +1,9 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +import com.vaadin.ui.MenuBar.MenuItem; +import com.vaadin.ui.VerticalLayout; + +public interface ParliamentRankingMenuItemFactory { + void createOverviewPage(VerticalLayout panelContent); + void createParliamentRankingTopics(MenuItem parliamentMenuItem); +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingConstantsNavigationUtil.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingConstantsNavigationUtil.java new file mode 100644 index 0000000000..2ac8c80105 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingConstantsNavigationUtil.java @@ -0,0 +1,9 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +public interface RankingConstantsNavigationUtil { + String RANKING_PAGE_VISIT_TEXT = "View Page History"; + String RANKING_PAGE_VISIT_DESC = "View history and statistics for this page"; + + String RANKING_OVERVIEW_TEXT = "Overview"; + String RANKING_OVERVIEW_DESC = "View main overview for this section"; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuConstants.java new file mode 100644 index 0000000000..131f2a14c0 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuConstants.java @@ -0,0 +1,12 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +public interface RankingMenuConstants { + String RANKING_OVERVIEW_TEXT = "Overview"; + String RANKING_OVERVIEW_DESC = "View ranking overview"; + + String RANKING_PAGE_VISIT_TEXT = "Page Visit History"; + String RANKING_PAGE_VISIT_DESC = "View page visit statistics"; + + String RANKING_DATAGRID_TEXT = "Data Grid"; + String RANKING_DATAGRID_DESC = "View detailed data grid"; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuItemVisitHistoryConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuItemVisitHistoryConstants.java new file mode 100644 index 0000000000..5781be6747 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingMenuItemVisitHistoryConstants.java @@ -0,0 +1,6 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +public interface RankingMenuItemVisitHistoryConstants { + String RANKING_PAGE_VISIT_HISTORY_TEXT = "Ranking Page Visit History"; + String RANKING_PAGE_VISIT_HISTORY_DESCRIPTION = "View ranking page visit history"; +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingNavigationConstants.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingNavigationConstants.java new file mode 100644 index 0000000000..910e8abbde --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/api/RankingNavigationConstants.java @@ -0,0 +1,12 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.api; + +public interface RankingNavigationConstants { + // Generic ranking related text constants + String RANKING_PAGE_VISIT_TEXT = "View History"; + String RANKING_PAGE_VISIT_DESC = "View page visit history"; + String RANKING_OVERVIEW_TEXT = "Overview"; + String RANKING_OVERVIEW_DESC = "View ranking overview"; + String RANKING_CHART_TEXT = "Charts"; + String RANKING_CHART_DESC = "View charts"; + String PAGE_VISIT_HISTORY_TEXT = RANKING_PAGE_VISIT_TEXT; // Backward compatibility +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/AbstractMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/AbstractMenuItemFactoryImpl.java index d31b158070..ea9bb8d340 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/AbstractMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/AbstractMenuItemFactoryImpl.java @@ -153,7 +153,7 @@ protected static final void initApplicationMenuBar(final MenuBar menuBar) { final MenuItem mainItem = mainViewItem.addItem(MAIN, VaadinIcons.STAR, null); - mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_MAINVIEW_PAGEVISITHISTORY); + mainItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, COMMAND_MAINVIEW_PAGEVISITHISTORY); if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN) || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) { diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeMenuItemFactoryImpl.java index 33ed27f05a..f3cd8ac625 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeMenuItemFactoryImpl.java @@ -24,6 +24,7 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CommitteeMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CommitteeRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators; @@ -115,8 +116,8 @@ public void createCommitteeeMenuBar(final MenuBar menuBar, final String pageId) ballotItem.addItem("Decision flow", VaadinIcons.LINE_CHART, new PageModeMenuCommand( UserViews.COMMITTEE_VIEW_NAME, PageMode.CHARTS + "/" + ChartIndicators.DECISION_FLOW_CHART, pageId)); - committeeItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CLOCK, - new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); + committeeItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CLOCK, + PageCommandRankingHistoryConstants.COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY); } @@ -166,9 +167,8 @@ public void createOverviewPage(final VerticalLayout panelContent, final String p UserViews.COMMITTEE_VIEW_NAME, PageMode.CHARTS + "/" + ChartIndicators.DECISION_FLOW_CHART, pageId), DECISION_FLOW_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CLOCK, - new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId), - PAGE_VISIT_HISTORY_DESCRIPTION); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY, RANKING_PAGE_VISIT_DESC); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeRankingMenuItemFactoryImpl.java index 27a39940be..3b7333c7b6 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeRankingMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CommitteeRankingMenuItemFactoryImpl.java @@ -23,6 +23,8 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CommitteeRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.MenuItemRankingPageVisitHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.jarektoro.responsivelayout.ResponsiveRow; import com.vaadin.icons.VaadinIcons; @@ -71,7 +73,7 @@ public void createCommitteeeRankingMenuBar(final MenuBar menuBar) { */ @Override public void createCommitteeRankingTopics(final MenuItem committeeMenuItem) { - committeeMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, COMMAND_OVERVIEW); + committeeMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.GROUP, COMMAND_GENERIC_OVERVIEW); final MenuItem listItem = committeeMenuItem.addItem(POLITICAL_WORK_SUMMARY_TEXT, VaadinIcons.GROUP, COMMAND_DATAGRID); @@ -88,7 +90,8 @@ public void createCommitteeRankingTopics(final MenuItem committeeMenuItem) { chartByTopic.addItem(ALL_COMMITTEES_TOTAL_MEMBERS, VaadinIcons.GROUP, COMMAND_ALL_COMMITTEES_BY_HEADCOUNT); - committeeMenuItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, COMMAND_PAGEVISIT_HISTORY); + committeeMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY); } @@ -115,8 +118,9 @@ public void createOverviewPage(final VerticalLayout panelContent) { createButtonLink(grid, ALL_COMMITTEES_TOTAL_MEMBERS, VaadinIcons.GROUP, COMMAND_ALL_COMMITTEES_BY_HEADCOUNT, ALL_COMMITTEES_TOTAL_MEMBERS_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, COMMAND_PAGEVISIT_HISTORY, - PAGE_VISIT_HISTORY_DESCRIPTION); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.COMMITTEE_RANKING_COMMAND_PAGEVISIT_HISTORY, + MenuItemRankingPageVisitHistoryConstants.PAGE_VISIT_HISTORY_DESCRIPTION); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryMenuItemFactoryImpl.java index 871ac162c9..4dade1374e 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryMenuItemFactoryImpl.java @@ -27,6 +27,8 @@ import java.util.Map.Entry; import java.util.stream.Collectors; +import javax.persistence.metamodel.SingularAttribute; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,6 +40,7 @@ import com.hack23.cia.service.api.DataContainer; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CountryMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio; import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; @@ -116,13 +119,14 @@ public void createCountryTopicMenu(final MenuBar menuBar) { @Override public void createCountryTopicMenu(final MenuItem charts) { charts.addItem(COUNTRY_OVERVIEW_TEXT, VaadinIcons.LINE_CHART, - COUNTRY_COMMAND_OVERVIEW); + COMMAND_COUNTRY_RANKING_OVERVIEW); final MenuItem countryIndicators = charts.addItem(COUNTRY_INDICATORS_SWEDEN, VaadinIcons.LINE_CHART, null); addSourcesAndIndicatorsToMenu(countryIndicators, getTopicIndicatorMap()); - charts.addItem(COUNTRY_PAGE_VISIT_HISTORY_TEXT, VaadinIcons.LINE_CHART, COUNTRY_COMMAND_PAGEVISITHISTORY); + countryIndicators.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.LINE_CHART, + PageCommandRankingHistoryConstants.COUNTRY_RANKING_COMMAND_PAGEVISIT_HISTORY); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryRankingMenuItemFactoryImpl.java new file mode 100644 index 0000000000..7f7229fa8e --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryRankingMenuItemFactoryImpl.java @@ -0,0 +1,36 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl; + +import org.springframework.stereotype.Service; + +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CountryRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; +import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; +import com.jarektoro.responsivelayout.ResponsiveRow; +import com.vaadin.icons.VaadinIcons; +import com.vaadin.ui.MenuBar.MenuItem; +import com.vaadin.ui.VerticalLayout; + +@Service +public final class CountryRankingMenuItemFactoryImpl extends AbstractMenuItemFactoryImpl + implements CountryRankingMenuItemFactory { + + @Override + public void createOverviewPage(final VerticalLayout panelContent) { + final ResponsiveRow grid = RowUtil.createGridLayout(panelContent); + + createButtonLink(grid, OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + COMMAND_COUNTRY_RANKING_OVERVIEW, COUNTRY_RANKING_DESCRIPTION); + + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.COUNTRY_RANKING_COMMAND_PAGEVISIT_HISTORY, + RANKING_PAGE_VISIT_DESC); + } + + @Override + public void createCountryRankingTopics(final MenuItem countryMenuItem) { + countryMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + COMMAND_COUNTRY_RANKING_OVERVIEW); + countryMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.COUNTRY_RANKING_COMMAND_PAGEVISIT_HISTORY); + } +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/GovernmentBodyRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/GovernmentBodyRankingMenuItemFactoryImpl.java index 0019b96970..c6295ddc98 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/GovernmentBodyRankingMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/GovernmentBodyRankingMenuItemFactoryImpl.java @@ -2,7 +2,7 @@ * Copyright 2010-2025 James Pether Sörling * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. + * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 @@ -23,6 +23,7 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.GovernmentBodyRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.jarektoro.responsivelayout.ResponsiveRow; import com.vaadin.icons.VaadinIcons; @@ -98,7 +99,8 @@ public void createGovernmentBodyRankingTopics(final MenuBar.MenuItem menuItem) { menuItem.addItem(HEADCOUNT, VaadinIcons.USERS, GOVERNMENT_BODY_COMMAND_HEADCOUNT); menuItem.addItem(INCOME, VaadinIcons.MONEY_DEPOSIT, GOVERNMENT_BODY_COMMAND_INCOME); menuItem.addItem(EXPENDITURE, VaadinIcons.MONEY_WITHDRAW, GOVERNMENT_BODY_COMMAND_EXPENDITURE); - menuItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_PAGEVISITHISTORY); + menuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.GOVERNMENT_BODY_COMMAND_PAGEVISIT_HISTORY); } /** @@ -136,7 +138,7 @@ public void createOverviewPage(final VerticalLayout panelContent) { INCOME_DESCRIPTION); createButtonLink(grid, EXPENDITURE, VaadinIcons.MONEY_WITHDRAW, GOVERNMENT_BODY_COMMAND_EXPENDITURE, EXPENDITURE_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_PAGEVISITHISTORY, - PAGE_VISIT_HISTORY_DESCRIPTION); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.GOVERNMENT_BODY_COMMAND_PAGEVISIT_HISTORY, RANKING_PAGE_VISIT_DESC); } } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryMenuItemFactoryImpl.java index 15d04665d6..adf698de77 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryMenuItemFactoryImpl.java @@ -102,7 +102,7 @@ public void createMinistryMenuBar(final MenuBar menuBar, final String pageId) { new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, MinistryPageMode.DOCUMENTHISTORY.toString(), pageId)); - ministryItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, + ministryItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); } @@ -150,9 +150,9 @@ public void createOverviewPage(final VerticalLayout panelContent, final String p MinistryPageMode.DOCUMENTHISTORY.toString(), pageId), DOCUMENT_HISTORY_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.MINISTRY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId), - PAGE_VISIT_HISTORY_DESCRIPTION); + RANKING_PAGE_VISIT_DESC); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryRankingMenuItemFactoryImpl.java index f6711aa4b2..adef2026c6 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryRankingMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/MinistryRankingMenuItemFactoryImpl.java @@ -23,6 +23,9 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.MinistryRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandPageModeConstants; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.MenuItemRankingPageVisitHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.jarektoro.responsivelayout.ResponsiveRow; import com.vaadin.icons.VaadinIcons; @@ -60,8 +63,11 @@ public void createMinistryRankingMenuBar(final MenuBar menuBar) { @Override public void createMinistryRankingTopics(final MenuItem ministryMenuItem) { + ministryMenuItem.addItem(RANKING_OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + PageCommandPageModeConstants.COMMAND_OVERVIEW); - ministryMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.DASHBOARD, COMMAND_MINISTRY_RANKING_OVERVIEW); + ministryMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + PageCommandPageModeConstants.COMMAND_OVERVIEW); final MenuItem listItem = ministryMenuItem.addItem(POLITICAL_WORK_SUMMARY_TEXT, VaadinIcons.BAR_CHART, COMMAND_MINISTRY_RANKING_DATAGRID); @@ -94,7 +100,8 @@ public void createMinistryRankingTopics(final MenuItem ministryMenuItem) { chartByTopic.addItem(GOVERNMENT_ROLES_CHART, VaadinIcons.BAR_CHART, COMMAND_CHARTS_ALL_GOVERNMENT_ROLE_GANTT); - ministryMenuItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_PAGEVISITHISTORY); + ministryMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.MINISTRY_RANKING_COMMAND_PAGEVISIT_HISTORY); } @@ -135,8 +142,9 @@ public void createOverviewPage(final VerticalLayout panelContent) { createButtonLink(grid, ALL_MINISTRIES_TOTAL_MEMBERS, VaadinIcons.USER, COMMAND_CHARTS_ALL_MINISTRIES_BY_HEADCOUNT, ALL_COMMITTEES_TOTAL_MEMBERS_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_PAGEVISITHISTORY, - PAGE_VISIT_HISTORY_DESCRIPTION); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PageCommandRankingHistoryConstants.MINISTRY_RANKING_COMMAND_PAGEVISIT_HISTORY, + MenuItemRankingPageVisitHistoryConstants.PAGE_VISIT_HISTORY_DESCRIPTION); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentMenuItemFactoryImpl.java index 6d5a82ec36..b6f5263ae2 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentMenuItemFactoryImpl.java @@ -23,6 +23,9 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ParliamentMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandParliamentRankingConstants; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandDocumentConstants; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandRankingHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.jarektoro.responsivelayout.ResponsiveRow; import com.vaadin.icons.VaadinIcons; @@ -60,21 +63,22 @@ public void createOverviewPage(final VerticalLayout panelContent) { createButtonLink(grid, PARTY_AGE, VaadinIcons.INSTITUTION, COMMAND_CHARTS_PARTY_AGE, PARTY_AGE_DESCRIPTION); - createButtonLink(grid, RISK_SUMMARY, VaadinIcons.INSTITUTION, COMMAND_RISK_SUMMARY, RISK_SUMMARY_DESCRIPTION); + createButtonLink(grid, RISK_SUMMARY, VaadinIcons.INSTITUTION, + PageCommandParliamentRankingConstants.COMMAND_RISK_SUMMARY, RISK_SUMMARY_DESCRIPTION); createButtonLink(grid, RULE_VIOLATIONS, VaadinIcons.INSTITUTION, COMMAND_RULE_VIOLATION, RULE_VIOLATIONS_DESCRIPTION); - createButtonLink(grid, DOCUMENT_ACTIVITY_BY_TYPE, VaadinIcons.INSTITUTION, COMMAND_DOCUMENT_ACTIVITY, - DOCUMENT_ACTIVITY_DESCRIPTION); + createButtonLink(grid, DOCUMENT_ACTIVITY_BY_TYPE, VaadinIcons.INSTITUTION, + PageCommandDocumentConstants.COMMAND_DOCUMENT_ACTIVITY, DOCUMENT_ACTIVITY_DESCRIPTION); createButtonLink(grid, DECISION_ACTIVITY_BY_TYPE, VaadinIcons.INSTITUTION, COMMAND_DECISION_ACTIVITY, DECISION_ACTIVITY_DESCRIPTION); - createButtonLink(grid, DECISION_FLOW, VaadinIcons.INSTITUTION, COMMAND_CHARTS_DECISION_FLOW, - DECISION_FLOW_DESCRIPTION); + createButtonLink(grid, DECISION_FLOW, VaadinIcons.INSTITUTION, + PageCommandParliamentRankingConstants.COMMAND_CHARTS_DECISION_FLOW, DECISION_FLOW_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.INSTITUTION, - COMMAND_PAGEVISITHISTORY, PAGE_VISIT_HISTORY_DESCRIPTION); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.INSTITUTION, + PageCommandRankingHistoryConstants.PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY, RANKING_PAGE_VISIT_DESC); } @@ -91,7 +95,7 @@ public void createParliamentTopicMenu(final MenuBar menuBar) { @Override public void createParliamentTopicMenu(final MenuItem charts) { charts.addItem(OVERVIEW_TEXT, VaadinIcons.INSTITUTION, - COMMAND_OVERVIEW); + COMMAND_PARLIAMENT_OVERVIEW); final MenuItem chartIndicators = charts.addItem(SWEDISH_PARLIAMENT_INDICATORS, VaadinIcons.INSTITUTION, null); @@ -106,7 +110,8 @@ public void createParliamentTopicMenu(final MenuItem charts) { final MenuItem addItem3 = chartIndicators.addItem(PARTY_AGE, VaadinIcons.INSTITUTION, COMMAND_CHARTS_PARTY_AGE); addItem3.setDescription(PARTY_AGE_DESCRIPTION); - final MenuItem addItem7 = chartIndicators.addItem(RISK_SUMMARY, VaadinIcons.INSTITUTION, COMMAND_RISK_SUMMARY); + final MenuItem addItem7 = chartIndicators.addItem(RISK_SUMMARY, VaadinIcons.INSTITUTION, + PageCommandParliamentRankingConstants.COMMAND_RISK_SUMMARY); addItem7.setDescription(RISK_SUMMARY_DESCRIPTION); final MenuItem addItem8 = chartIndicators.addItem(RULE_VIOLATIONS, VaadinIcons.INSTITUTION, @@ -114,7 +119,7 @@ public void createParliamentTopicMenu(final MenuItem charts) { addItem8.setDescription(RULE_VIOLATIONS_DESCRIPTION); final MenuItem addItem4 = chartIndicators.addItem(DOCUMENT_ACTIVITY_BY_TYPE, VaadinIcons.INSTITUTION, - COMMAND_DOCUMENT_ACTIVITY); + PageCommandDocumentConstants.COMMAND_DOCUMENT_ACTIVITY); addItem4.setDescription(DOCUMENT_ACTIVITY_DESCRIPTION); final MenuItem addItem5 = chartIndicators.addItem(DECISION_ACTIVITY_BY_TYPE, VaadinIcons.INSTITUTION, @@ -122,11 +127,11 @@ public void createParliamentTopicMenu(final MenuItem charts) { addItem5.setDescription(DECISION_ACTIVITY_DESCRIPTION); final MenuItem addItem6 = chartIndicators.addItem(DECISION_FLOW, VaadinIcons.INSTITUTION, - COMMAND_CHARTS_DECISION_FLOW); + PageCommandParliamentRankingConstants.COMMAND_CHARTS_DECISION_FLOW); addItem6.setDescription(DECISION_FLOW_DESCRIPTION); - charts.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.INSTITUTION, - COMMAND_PAGEVISITHISTORY); + charts.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.INSTITUTION, + PageCommandRankingHistoryConstants.PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY); } } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentRankingMenuItemFactoryImpl.java new file mode 100644 index 0000000000..2da87dde24 --- /dev/null +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/ParliamentRankingMenuItemFactoryImpl.java @@ -0,0 +1,31 @@ +package com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl; + +import org.springframework.stereotype.Service; + +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ParliamentRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; +import com.jarektoro.responsivelayout.ResponsiveRow; +import com.vaadin.icons.VaadinIcons; +import com.vaadin.ui.MenuBar.MenuItem; +import com.vaadin.ui.VerticalLayout; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PageCommandPageModeConstants; + +@Service +public final class ParliamentRankingMenuItemFactoryImpl extends AbstractMenuItemFactoryImpl + implements ParliamentRankingMenuItemFactory { + + @Override + public void createOverviewPage(final VerticalLayout panelContent) { + final ResponsiveRow grid = RowUtil.createGridLayout(panelContent); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY, RANKING_PAGE_VISIT_DESC); + } + + @Override + public void createParliamentRankingTopics(final MenuItem parliamentMenuItem) { + parliamentMenuItem.addItem(RANKING_OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + PageCommandPageModeConstants.COMMAND_OVERVIEW); + parliamentMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PARLIAMENT_RANKING_COMMAND_PAGEVISIT_HISTORY); + } +} diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyMenuItemFactoryImpl.java index ac33fb3cae..78eaf31042 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyMenuItemFactoryImpl.java @@ -24,6 +24,7 @@ import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PartyMenuItemFactory; import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.PartyRankingMenuItemFactory; +import com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.MenuItemRankingPageVisitHistoryConstants; import com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand; import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil; import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode; @@ -121,9 +122,9 @@ public void createOverviewPage(final VerticalLayout panelContent, final String p PartyPageMode.PARTYSUPPORTSUMMARY.toString(), pageId), PARTY_SUPPORT_SUMMARY_DESCRIPTION); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId), - PAGE_VISIT_HISTORY_DESCRIPTION); + MenuItemRankingPageVisitHistoryConstants.PAGE_VISIT_HISTORY_DESCRIPTION); } @@ -192,7 +193,7 @@ public void createPartyMenuBar(final MenuBar menuBar, final String pageId) { new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.PARTYSUPPORTSUMMARY.toString(), pageId)); - partyItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, + partyItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); } diff --git a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyRankingMenuItemFactoryImpl.java b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyRankingMenuItemFactoryImpl.java index 0e3930f7ee..b3dfcc1040 100644 --- a/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyRankingMenuItemFactoryImpl.java +++ b/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/PartyRankingMenuItemFactoryImpl.java @@ -74,19 +74,19 @@ public void createOverviewPage(final VerticalLayout panelContent) { COMMAND_DATAGRID, DESC_ALL_PARTIES_ROLES); createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_MINISTRIES_HEAD_COUNT_TEXT, VaadinIcons.INSTITUTION, - COMMAND_CHARTS_CURRENT_GOVERNMENT_PARTIES, DESC_GOVERNMENT_HEADCOUNT); + PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES, DESC_GOVERNMENT_HEADCOUNT); createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_COMMITTEES_HEAD_COUNT, VaadinIcons.GROUP, COMMAND_CHARTS_CURRENT_COMMITTEES, DESC_COMMITTEES_HEADCOUNT); createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_PARLIAMENT_HEAD_COUNT, VaadinIcons.INSTITUTION, - COMMAND_CHARTS_CURRENT_PARTIES, DESC_PARLIAMENT_HEADCOUNT); + PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES, DESC_PARLIAMENT_HEADCOUNT); createButtonLink(grid, ALL_PARTIES_TOTAL_DAYS_SERVED_IN_PARLIAMENT, VaadinIcons.CLOCK, - COMMAND_CHARTS_ALL_PARTIES, DESC_DAYS_SERVED_PARLIAMENT); + PARTY_RANKING_COMMAND_CHARTS_ALL_PARTIES, DESC_DAYS_SERVED_PARLIAMENT); - createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, - COMMAND_PAGEVISITHISTORY, DESC_PAGE_VISIT_HISTORY); + createButtonLink(grid, RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PARTY_RANKING_COMMAND_PAGEVISIT_HISTORY, RANKING_PAGE_VISIT_DESC); } /** @@ -117,7 +117,11 @@ public void createPartyRankingMenuBar(final MenuBar menuBar) { */ @Override public void createPartyRankingTopics(final MenuItem partynMenuItem) { - partynMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.DASHBOARD, COMMAND_OVERVIEW); + // Use specific ranking commands instead of generic ones + partynMenuItem.addItem(RANKING_OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + PARTY_RANKING_COMMAND_OVERVIEW); + + partynMenuItem.addItem(OVERVIEW_TEXT, VaadinIcons.DASHBOARD, PARTY_RANKING_COMMAND_OVERVIEW); partynMenuItem.addItem(PART_LEADERS_SCOREBOARD, VaadinIcons.TROPHY, COMMAND_CHARTS_CURRENT_PARTIES_LEADER_SCOREBOARD); @@ -129,17 +133,24 @@ public void createPartyRankingTopics(final MenuItem partynMenuItem) { final MenuItem chartByTopic = partynMenuItem.addItem(CHART_BY_TOPIC_TEXT, VaadinIcons.CHART, null); chartByTopic.addItem(CURRENT_PARTIES_ACTIVE_IN_MINISTRIES_HEAD_COUNT_TEXT, VaadinIcons.INSTITUTION, - COMMAND_CHARTS_CURRENT_GOVERNMENT_PARTIES); + PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES); chartByTopic.addItem(CURRENT_PARTIES_ACTIVE_IN_COMMITTEES_HEAD_COUNT, VaadinIcons.GROUP, COMMAND_CHARTS_CURRENT_COMMITTEES); chartByTopic.addItem(CURRENT_PARTIES_ACTIVE_IN_PARLIAMENT_HEAD_COUNT, VaadinIcons.INSTITUTION, - COMMAND_CHARTS_CURRENT_PARTIES); + PARTY_RANKING_COMMAND_CHARTS_CURRENT_PARTIES); chartByTopic.addItem(ALL_PARTIES_TOTAL_DAYS_SERVED_IN_PARLIAMENT, VaadinIcons.CLOCK, - COMMAND_CHARTS_ALL_PARTIES); + PARTY_RANKING_COMMAND_CHARTS_ALL_PARTIES); + + partynMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PARTY_RANKING_COMMAND_PAGEVISIT_HISTORY); + + partynMenuItem.addItem(RANKING_OVERVIEW_TEXT, VaadinIcons.DASHBOARD, + PARTY_RANKING_COMMAND_OVERVIEW); - partynMenuItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.CHART, COMMAND_PAGEVISITHISTORY); + partynMenuItem.addItem(RANKING_PAGE_VISIT_TEXT, VaadinIcons.CHART, + PARTY_RANKING_COMMAND_PAGEVISIT_HISTORY); } }