Search in sources :

Example 11 with ViewRiksdagenParty

use of com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty in project cia by Hack23.

the class PartyDocumentActivityPageModContentFactoryImpl 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<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
    if (viewRiksdagenParty != null) {
        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, DOCUMENT_ACTIVITY);
        documentChartDataManager.createDocumentHistoryPartyChart(panelContent, pageId);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) VerticalLayout(com.vaadin.ui.VerticalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 12 with ViewRiksdagenParty

use of com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty in project cia by Hack23.

the class PartyDocumentHistoryPageModContentFactoryImpl 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<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
    if (viewRiksdagenParty != null) {
        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, DOCUMENT_HISTORY);
        final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPoliticianDocument.class);
        getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPoliticianDocument.class, politicianDocumentDataContainer.findOrderedListByProperty(ViewRiksdagenPoliticianDocument_.partyShortCode, pageId, ViewRiksdagenPoliticianDocument_.madePublicDate), MEMBER_DOCUMENT_HISTORY, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenPoliticianDocument(com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocument) ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) VerticalLayout(com.vaadin.ui.VerticalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 13 with ViewRiksdagenParty

use of com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty in project cia by Hack23.

the class PartyGovernmentRolesPageModContentFactoryImpl 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<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
    if (viewRiksdagenParty != null) {
        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, GOVERNMENT_ROLES);
        final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenGovermentRoleMember.class);
        getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer.findListByProperty(new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenGovermentRoleMember_.party, ViewRiksdagenGovermentRoleMember_.active), GOVERNMENT_ROLES, COLUMN_ORDER, HIDE_COLUMNS, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, PERSON_ID), null, null);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenGovermentRoleMember(com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember) ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) PageItemPropertyClickListener(com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener) VerticalLayout(com.vaadin.ui.VerticalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 14 with ViewRiksdagenParty

use of com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty in project cia by Hack23.

the class PartyLeaderHistoryPageModContentFactoryImpl 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<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
    if (viewRiksdagenParty != null) {
        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, LEADER_HISTORY);
        final DataContainer<ViewRiksdagenPartyRoleMember, String> partyRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPartyRoleMember.class);
        getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPartyRoleMember.class, partyRoleMemberDataContainer.getAllBy(ViewRiksdagenPartyRoleMember_.party, viewRiksdagenParty.getPartyId()), LEADER_HISTORY2, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) ViewRiksdagenPartyRoleMember(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartyRoleMember) VerticalLayout(com.vaadin.ui.VerticalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 15 with ViewRiksdagenParty

use of com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty in project cia by Hack23.

the class PartyMemberHistoryPageModContentFactoryImpl 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<ViewRiksdagenParty, String> dataContainer = getApplicationManager().getDataContainer(ViewRiksdagenParty.class);
    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);
    if (viewRiksdagenParty != null) {
        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);
        LabelFactory.createHeader2Label(panelContent, MEMBER_HISTORY);
        final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPolitician.class);
        getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPolitician.class, politicianDataContainer.getAllBy(ViewRiksdagenPolitician_.party, viewRiksdagenParty.getPartyId()), POLITICIANS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;
}
Also used : ViewRiksdagenParty(com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty) VerticalLayout(com.vaadin.ui.VerticalLayout) ViewRiksdagenPolitician(com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician) Secured(org.springframework.security.access.annotation.Secured)

Aggregations

ViewRiksdagenParty (com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty)20 VerticalLayout (com.vaadin.ui.VerticalLayout)14 Secured (org.springframework.security.access.annotation.Secured)14 ViewRiksdagenPartySummary (com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartySummary)5 DataSeries (org.dussan.vaadin.dcharts.data.DataSeries)5 ViewRiksdagenPartyRoleMember (com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartyRoleMember)3 ViewRiksdagenPolitician (com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician)2 ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId)1 ViewRiksdagenCommitteeBallotDecisionPartySummary (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary)1 ViewRiksdagenCommitteeRoleMember (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeRoleMember)1 ViewRiksdagenPoliticianDocument (com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocument)1 ViewRiksdagenGovermentRoleMember (com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember)1 PageItemPropertyClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener)1 Link (com.vaadin.ui.Link)1 Test (org.junit.Test)1