Package org.apache.syncope.console.pages.panels.SelectedEventsPanel

Examples of org.apache.syncope.console.pages.panels.SelectedEventsPanel.InspectSelectedEvent


            updateEventsContainer(change.getTarget());
        } else if (event.getPayload() instanceof InspectSelectedEvent) {
            // update objects ....
            eventCategoryTO.getEvents().clear();

            final InspectSelectedEvent inspectSelectedEvent = (InspectSelectedEvent) event.getPayload();

            final Map.Entry<EventCategoryTO, AuditElements.Result> categoryEvent =
                    LoggerEventUtils.parseEventCategory(inspectSelectedEvent.getEvent());

            eventCategoryTO.setType(categoryEvent.getKey().getType());
            category.setChoices(filter(eventCategoryTOs, type.getModelObject()));

            eventCategoryTO.setCategory(categoryEvent.getKey().getCategory());
            subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));

            eventCategoryTO.setSubcategory(categoryEvent.getKey().getSubcategory());

            if (categoryEvent.getKey().getType() == EventCategoryType.CUSTOM) {
                custom.setModelObject(LoggerEventUtils.buildEvent(
                        categoryEvent.getKey().getType(),
                        categoryEvent.getKey().getCategory(),
                        categoryEvent.getKey().getSubcategory(),
                        categoryEvent.getKey().getEvents().isEmpty()
                        ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
                        categoryEvent.getValue()));
               
                category.setEnabled(false);
                subcategory.setEnabled(false);
                custom.setVisible(true);
                custom.setEnabled(true);
                actionPanel.setVisible(true);
                actionPanel.setEnabled(true);
            } else {
                category.setEnabled(true);
                subcategory.setEnabled(true);
                custom.setVisible(false);
                custom.setEnabled(false);
                actionPanel.setVisible(false);
                actionPanel.setEnabled(false);
            }

            inspectSelectedEvent.getTarget().add(categoryContainer);
            updateEventsContainer(inspectSelectedEvent.getTarget());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.syncope.console.pages.panels.SelectedEventsPanel.InspectSelectedEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.