use of com.evolveum.midpoint.model.api.authentication.CompiledShadowCollectionView in project midpoint by Evolveum.
the class ResourceContentPanel method initLayout.
private void initLayout() {
WebMarkupContainer totals = new WebMarkupContainer(ID_TOTALS);
totals.setOutputMarkupId(true);
add(totals);
initShadowStatistics(totals);
MainObjectListPanel<ShadowType> shadowListPanel = new MainObjectListPanel<>(ID_TABLE, ShadowType.class, createSearchOptions(), getPanelConfiguration()) {
private static final long serialVersionUID = 1L;
@Override
protected List<InlineMenuItem> createInlineMenu() {
return ResourceContentPanel.this.createRowMenuItems();
}
@Override
protected List<IColumn<SelectableBean<ShadowType>, String>> createDefaultColumns() {
return ResourceContentPanel.this.initColumns();
}
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, ShadowType object) {
shadowDetailsPerformed(target, WebComponentUtil.getName(object), object.getOid());
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected UserProfileStorage.TableId getTableId() {
return ResourceContentPanel.this.getTableId();
}
@Override
public PageStorage getPageStorage() {
return getPageBase().getSessionStorage().getResourceContentStorage(kind, searchMode);
}
@Override
protected ISelectableDataProvider createProvider() {
provider = createSelectableBeanObjectDataProvider(() -> getResourceContentQuery(), null);
provider.setEmptyListOnNullQuery(true);
provider.setSort(null);
provider.setDefaultCountIfNull(Integer.MAX_VALUE);
return provider;
}
@Override
protected Search createSearch(Class<ShadowType> type) {
return ResourceContentPanel.this.createSearch();
}
@Override
protected CompiledObjectCollectionView getObjectCollectionView() {
CompiledShadowCollectionView compiledView = findContainerPanelConfig();
if (compiledView != null) {
return compiledView;
}
return super.getObjectCollectionView();
}
};
shadowListPanel.setOutputMarkupId(true);
shadowListPanel.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return createQuery() != null;
}
});
shadowListPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_SHADOW_BOX_CSS_CLASSES);
add(shadowListPanel);
Label label = new Label(ID_LABEL, "Nothing to show. Select intent to search");
add(label);
label.setOutputMarkupId(true);
label.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return createQuery() == null;
}
});
initButton(ID_IMPORT, "Import", " fa-download", SystemObjectsType.ARCHETYPE_IMPORT_TASK.value());
initButton(ID_RECONCILIATION, "Reconciliation", " fa-link", SystemObjectsType.ARCHETYPE_RECONCILIATION_TASK.value());
initButton(ID_LIVE_SYNC, "Live Sync", " fa-refresh", SystemObjectsType.ARCHETYPE_LIVE_SYNC_TASK.value());
initCustomLayout();
}
Aggregations