Search in sources :

Example 1 with CamelRoutesDirectoryPanel

use of org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel in project syncope by apache.

the class CamelRoutes method buildTabList.

private List<ITab> buildTabList() {
    List<ITab> tabs = new ArrayList<>(3);
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.USER.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.USER);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.USER));
            return panel;
        }
    });
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.GROUP.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.GROUP);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.GROUP));
            return panel;
        }
    });
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.ANY_OBJECT.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.ANY_OBJECT);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.ANY_OBJECT));
            return panel;
        }
    });
    return tabs;
}
Also used : CamelRoutesDirectoryPanel(org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) ArrayList(java.util.ArrayList) Model(org.apache.wicket.model.Model) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) CamelRoutesDirectoryPanel(org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Aggregations

AjaxBootstrapTabbedPanel (de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel)1 ArrayList (java.util.ArrayList)1 CamelRoutesDirectoryPanel (org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel)1 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 Panel (org.apache.wicket.markup.html.panel.Panel)1 Model (org.apache.wicket.model.Model)1