use of com.hack23.cia.service.api.DataContainer in project cia by Hack23.
the class PartyCommitteeRolesPageModContentFactoryImpl 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, COMMITTEE_ROLES);
final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommitteeRoleMember.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenCommitteeRoleMember.class, committeeRoleMemberDataContainer.findListByProperty(new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenCommitteeRoleMember_.party, ViewRiksdagenCommitteeRoleMember_.active), COMMITTEE_ROLES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
}
return panelContent;
}
use of com.hack23.cia.service.api.DataContainer in project cia by Hack23.
the class PartyCurrentLeadersPageModContentFactoryImpl 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, CURRENT_LEADERS);
final DataContainer<ViewRiksdagenPartyRoleMember, String> partyRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPartyRoleMember.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPartyRoleMember.class, partyRoleMemberDataContainer.findListByProperty(new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenPartyRoleMember_.party, ViewRiksdagenPartyRoleMember_.active), CURRENT_LEADERS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
}
return panelContent;
}
use of com.hack23.cia.service.api.DataContainer in project cia by Hack23.
the class PoliticianRoleListPageModContentFactoryImpl 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<PersonData, String> dataContainer = getApplicationManager().getDataContainer(PersonData.class);
final PersonData personData = dataContainer.load(pageId);
if (personData != null) {
final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPolitician.class);
final ViewRiksdagenPolitician viewRiksdagenPolitician = politicianDataContainer.load(personData.getId());
getPoliticianMenuItemFactory().createPoliticianMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, PoliticianPageMode.ROLELIST.toString());
final List<AssignmentData> assignmentList = personData.getPersonAssignmentData().getAssignmentList();
createRoleList(panelContent, assignmentList);
pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician);
}
return panelContent;
}
use of com.hack23.cia.service.api.DataContainer in project cia by Hack23.
the class PoliticianRoleSummaryPageModContentFactoryImpl 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<PersonData, String> dataContainer = getApplicationManager().getDataContainer(PersonData.class);
final PersonData personData = dataContainer.load(pageId);
if (personData != null) {
final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPolitician.class);
final ViewRiksdagenPolitician viewRiksdagenPolitician = politicianDataContainer.load(personData.getId());
getPoliticianMenuItemFactory().createPoliticianMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, PoliticianPageMode.ROLESUMMARY.toString());
final List<AssignmentData> assignmentList = personData.getPersonAssignmentData().getAssignmentList();
createRoleSummary(panelContent, assignmentList, viewRiksdagenPolitician);
pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician);
}
return panelContent;
}
use of com.hack23.cia.service.api.DataContainer in project cia by Hack23.
the class PoliticianDocumentActivityPageModContentFactoryImpl 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<PersonData, String> dataContainer = getApplicationManager().getDataContainer(PersonData.class);
final PersonData personData = dataContainer.load(pageId);
if (personData != null) {
final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPolitician.class);
final ViewRiksdagenPolitician viewRiksdagenPolitician = politicianDataContainer.load(personData.getId());
getPoliticianMenuItemFactory().createPoliticianMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, PoliticianPageMode.DOCUMENTACTIVITY.toString());
documentChartDataManager.createPersonDocumentHistoryChart(panelContent, personData.getId());
pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician);
}
return panelContent;
}
Aggregations