Search in sources :

Example 56 with Secured

use of org.springframework.security.access.annotation.Secured 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 57 with Secured

use of org.springframework.security.access.annotation.Secured in project cia by Hack23.

the class CommitteeRankingAllCommitteesChartsPageModContentFactoryImpl 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 HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();
    chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createCommitteeChartTimeSeriesAll(), "All");
    panelContent.addComponent(chartLayout);
    panel.setCaption(NAME + "::" + CHARTS + parameters);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}
Also used : VerticalLayout(com.vaadin.ui.VerticalLayout) HorizontalLayout(com.vaadin.ui.HorizontalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 58 with Secured

use of org.springframework.security.access.annotation.Secured in project cia by Hack23.

the class CommitteeRankingCurrentCommitteesChartsPageModContentFactoryImpl 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 HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();
    chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createCommitteeChartTimeSeriesCurrent(), "Current");
    panelContent.addComponent(chartLayout);
    panel.setCaption(NAME + "::" + CHARTS + parameters);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}
Also used : VerticalLayout(com.vaadin.ui.VerticalLayout) HorizontalLayout(com.vaadin.ui.HorizontalLayout) Secured(org.springframework.security.access.annotation.Secured)

Example 59 with Secured

use of org.springframework.security.access.annotation.Secured 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 60 with Secured

use of org.springframework.security.access.annotation.Secured in project cia by Hack23.

the class CommitteeRankingOverviewPageModContentFactoryImpl 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);
    panelContent.addComponent(createDescription());
    getCommitteeRankingMenuItemFactory().createOverviewPage(panelContent);
    panel.setCaption(NAME + "::" + OVERVIEW);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}
Also used : VerticalLayout(com.vaadin.ui.VerticalLayout) Secured(org.springframework.security.access.annotation.Secured)

Aggregations

Secured (org.springframework.security.access.annotation.Secured)260 VerticalLayout (com.vaadin.ui.VerticalLayout)117 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)52 ForbiddenUserException (org.asqatasun.webapp.exception.ForbiddenUserException)23 HorizontalLayout (com.vaadin.ui.HorizontalLayout)20 CollectSurvey (org.openforis.collect.model.CollectSurvey)20 UserAccount (com.hack23.cia.model.internal.application.user.impl.UserAccount)18 Contract (org.asqatasun.entity.contract.Contract)17 ForbiddenPageException (org.asqatasun.webapp.exception.ForbiddenPageException)16 Timed (com.codahale.metrics.annotation.Timed)14 ViewRiksdagenParty (com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty)14 CreateApplicationEventRequest (com.hack23.cia.service.api.action.application.CreateApplicationEventRequest)14 URI (java.net.URI)14 User (org.asqatasun.entity.user.User)14 ViewRiksdagenCommittee (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee)13 ViewRiksdagenPolitician (com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician)13 SessionState (org.openforis.collect.web.session.SessionState)13 CollectRecord (org.openforis.collect.model.CollectRecord)12 DocumentElement (com.hack23.cia.model.external.riksdagen.dokumentlista.impl.DocumentElement)11 ArrayList (java.util.ArrayList)11