use of com.hack23.cia.model.external.riksdagen.person.impl.AssignmentData in project cia by Hack23.
the class PoliticianRoleGhantPageModContentFactoryImpl 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.ROLEGHANT.toString());
final List<AssignmentData> assignmentList = personData.getPersonAssignmentData().getAssignmentList();
politicianGhantChartManager.createRoleGhant(panelContent, assignmentList);
pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician);
}
return panelContent;
}
use of com.hack23.cia.model.external.riksdagen.person.impl.AssignmentData 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.model.external.riksdagen.person.impl.AssignmentData 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;
}
Aggregations