use of com.hack23.cia.model.external.riksdagen.dokumentstatus.impl.DocumentStatusContainer in project cia by Hack23.
the class DecisionDataFactoryImpl method createCommitteeSummary.
@Override
public List<ProposalCommitteeeSummary> createCommitteeSummary(final String processedIn) {
final List<ProposalCommitteeeSummary> summary = new ArrayList<>();
final DataContainer<DocumentStatusContainer, Long> dataContainer = applicationManager.getDataContainer(DocumentStatusContainer.class);
for (final DocumentStatusContainer document : dataContainer.getAll()) {
addProposalCommitteeeSummary(processedIn, summary, document);
}
return summary;
}
use of com.hack23.cia.model.external.riksdagen.dokumentstatus.impl.DocumentStatusContainer in project cia by Hack23.
the class DataViewerITest method findByQueryPropertyTest.
/**
* Find by query property test.
*/
@Test
public void findByQueryPropertyTest() {
final DocumentStatusContainer findByQueryProperty = dataViewer.findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document, DocumentData.class, DocumentData_.id, "H501NU6");
assertNotNull(findByQueryProperty);
}
use of com.hack23.cia.model.external.riksdagen.dokumentstatus.impl.DocumentStatusContainer in project cia by Hack23.
the class DocumentDecisionPageModContentFactoryImpl 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<DocumentElement, String> documentElementDataContainer = getApplicationManager().getDataContainer(DocumentElement.class);
final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager().getDataContainer(DocumentStatusContainer.class);
getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);
final DocumentElement documentElement = documentElementDataContainer.load(pageId);
if (documentElement != null) {
getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);
final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer.findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document, DocumentData.class, DocumentData_.id, pageId);
LabelFactory.createHeader2Label(panelContent, DOCUMENT_DECISION);
if (documentStatusContainer != null && documentStatusContainer.getDocumentProposal() != null && documentStatusContainer.getDocumentProposal().getProposal() != null) {
getFormFactory().addFormPanelTextFields(panelContent, documentStatusContainer.getDocumentProposal().getProposal(), DocumentProposalData.class, AS_LIST);
}
panel.setContent(panelContent);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
}
return panelContent;
}
use of com.hack23.cia.model.external.riksdagen.dokumentstatus.impl.DocumentStatusContainer in project cia by Hack23.
the class DocumentPersonReferencesPageModContentFactoryImpl 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<DocumentElement, String> documentElementDataContainer = getApplicationManager().getDataContainer(DocumentElement.class);
final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager().getDataContainer(DocumentStatusContainer.class);
getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);
final DocumentElement documentElement = documentElementDataContainer.load(pageId);
if (documentElement != null) {
getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);
final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer.findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document, DocumentData.class, DocumentData_.id, pageId);
LabelFactory.createHeader2Label(panelContent, PERSON_REFERENCES);
if (documentStatusContainer != null && documentStatusContainer.getDocumentPersonReferenceContainer() != null && documentStatusContainer.getDocumentPersonReferenceContainer().getDocumentPersonReferenceList() != null) {
getGridFactory().createBasicBeanItemGrid(panelContent, DocumentPersonReferenceData.class, documentStatusContainer.getDocumentPersonReferenceContainer().getDocumentPersonReferenceList(), DOCUMENT_PERSON_REFERENCES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
}
panel.setContent(panelContent);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
}
return panelContent;
}
use of com.hack23.cia.model.external.riksdagen.dokumentstatus.impl.DocumentStatusContainer in project cia by Hack23.
the class DocumentAttachementsPageModContentFactoryImpl 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<DocumentElement, String> documentElementDataContainer = getApplicationManager().getDataContainer(DocumentElement.class);
final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager().getDataContainer(DocumentStatusContainer.class);
getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);
final DocumentElement documentElement = documentElementDataContainer.load(pageId);
if (documentElement != null) {
getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);
final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer.findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document, DocumentData.class, DocumentData_.id, pageId);
LabelFactory.createHeader2Label(panelContent, DOCUMENT_ATTACHMENTS);
if (documentStatusContainer != null && documentStatusContainer.getDocumentAttachmentContainer() != null && documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList() != null) {
getGridFactory().createBasicBeanItemGrid(panelContent, DocumentAttachment.class, documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList(), DOCUMENT_ATTACHMENTS, COLUMN_ORDER, HIDE_COLUMNS, null, null, null);
displayDocumentAttachements(panelContent, documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList());
}
panel.setContent(panelContent);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
}
return panelContent;
}
Aggregations