Search in sources :

Example 6 with ViewRiksdagenCommittee

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee in project cia by Hack23.

the class CommitteeDocumentHistoryPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);
    if (viewRiksdagenCommittee != null) {
        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, DOCUMENT_HISTORY);
        final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPoliticianDocument.class);
        getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPoliticianDocument.class, politicianDocumentDataContainer.findOrderedListByProperty(ViewRiksdagenPoliticianDocument_.org, viewRiksdagenCommittee.getEmbeddedId().getOrgCode().replace(" ", "").replace("_", "").trim(), ViewRiksdagenPoliticianDocument_.madePublicDate), DOCUMENTS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
        panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    }
    return panelContent;
}
Also used : ViewRiksdagenPoliticianDocument(com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocument) VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee) Secured(org.springframework.security.access.annotation.Secured)

Example 7 with ViewRiksdagenCommittee

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee in project cia by Hack23.

the class CommitteePageVisitHistoryPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);
    if (viewRiksdagenCommittee != null) {
        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);
        createPageVisitHistory(NAME, pageId, panelContent);
        panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    }
    return panelContent;
}
Also used : VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee) Secured(org.springframework.security.access.annotation.Secured)

Example 8 with ViewRiksdagenCommittee

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee in project cia by Hack23.

the class CommitteeRankingDataGridPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);
    final String pageId = getPageId(parameters);
    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
    getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenCommittee.class, dataContainer.getAllOrderBy(ViewRiksdagenCommittee_.currentMemberSize), COMMITTEES, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
    panel.setCaption(NAME + "::" + DATAGRID);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}
Also used : VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee) Secured(org.springframework.security.access.annotation.Secured)

Example 9 with ViewRiksdagenCommittee

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee in project cia by Hack23.

the class CommitteeRoleGhantPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);
    if (viewRiksdagenCommittee != null) {
        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, ROLE_GHANT);
        final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommitteeRoleMember.class);
        final List<ViewRiksdagenCommitteeRoleMember> allMembers = committeeRoleMemberDataContainer.getAllBy(ViewRiksdagenCommitteeRoleMember_.detail, viewRiksdagenCommittee.getEmbeddedId().getDetail());
        committeeGhantChartManager.createRoleGhant(panelContent, allMembers);
        panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    }
    return panelContent;
}
Also used : ViewRiksdagenCommitteeRoleMember(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeRoleMember) VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee) Secured(org.springframework.security.access.annotation.Secured)

Example 10 with ViewRiksdagenCommittee

use of com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee in project cia by Hack23.

the class CommitteeDataSeriesFactoryImpl method createCommitteeChartTimeSeriesCurrent.

@Override
public DataSeries createCommitteeChartTimeSeriesCurrent() {
    DataSeries dataSeries = new DataSeries();
    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = applicationManager.getDataContainer(ViewRiksdagenCommittee.class);
    for (final ViewRiksdagenCommittee data : dataContainer.getAll()) {
        if (data.isActive()) {
            dataSeries = dataSeries.newSeries().add(data.getEmbeddedId().getDetail(), data.getCurrentMemberSize());
        }
    }
    return dataSeries;
}
Also used : DataSeries(org.dussan.vaadin.dcharts.data.DataSeries) ViewRiksdagenCommittee(com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee)

Aggregations

ViewRiksdagenCommittee (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee)17 VerticalLayout (com.vaadin.ui.VerticalLayout)13 Secured (org.springframework.security.access.annotation.Secured)13 SankeyChart (com.hack23.cia.web.widgets.charts.SankeyChart)4 List (java.util.List)4 ViewRiksdagenCommitteeRoleMember (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeRoleMember)3 ApplicationEventGroup (com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup)2 DataContainer (com.hack23.cia.service.api.DataContainer)2 ViewAction (com.hack23.cia.web.impl.ui.application.action.ViewAction)2 DecisionFlowChartManager (com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.DecisionFlowChartManager)2 ProposalCommitteeeSummary (com.hack23.cia.web.impl.ui.application.views.common.dataseriesfactory.api.ProposalCommitteeeSummary)2 ContentRatio (com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio)2 ChartIndicators (com.hack23.cia.web.impl.ui.application.views.common.viewnames.ChartIndicators)2 PageMode (com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode)2 ComboBox (com.vaadin.ui.ComboBox)2 Layout (com.vaadin.ui.Layout)2 MenuBar (com.vaadin.ui.MenuBar)2 Panel (com.vaadin.ui.Panel)2 UI (com.vaadin.ui.UI)2 Arrays (java.util.Arrays)2