use of com.evolveum.midpoint.web.session.MemberPanelStorage in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method createMemberSearch.
private <AH extends AssignmentHolderType> Search<AH> createMemberSearch(Class<AH> type) {
MemberPanelStorage memberPanelStorage = getMemberPanelStorage();
if (memberPanelStorage == null) {
// normally, this should not happen
return SearchFactory.createSearch(new ContainerTypeSearchItem<>(type), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
}
if (memberPanelStorage.getSearch() != null) {
return memberPanelStorage.getSearch();
}
Search<AH> search = SearchFactory.createSearch(createSearchTypeItem(getSearchBoxConfiguration()), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
search.addCompositedSpecialItem(createMemberSearchPanel(search, memberPanelStorage));
if (additionalPanelConfig != null && additionalPanelConfig.getSearchBoxConfiguration() != null) {
search.setCanConfigure(!Boolean.FALSE.equals(additionalPanelConfig.getSearchBoxConfiguration().isAllowToConfigureSearchItems()));
}
return search;
}
use of com.evolveum.midpoint.web.session.MemberPanelStorage in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method getMemberPanelStorage.
protected MemberPanelStorage getMemberPanelStorage() {
String storageKey = createStorageKey();
if (StringUtils.isEmpty(storageKey)) {
return null;
}
PageStorage storage = getSession().getSessionStorage().getPageStorageMap().get(storageKey);
if (storage == null) {
SearchBoxConfigurationHelper searchBoxCofig = new SearchBoxConfigurationHelper(additionalPanelConfig);
searchBoxCofig.setDefaultSupportedRelations(getSupportedRelations());
searchBoxCofig.setDefaultSupportedObjectTypes(getDefaultSupportedObjectTypes(false));
searchBoxCofig.setDefaultObjectType(WebComponentUtil.classToQName(getPrismContext(), getDefaultObjectType()));
storage = getSession().getSessionStorage().initMemberStorage(storageKey, searchBoxCofig);
}
return (MemberPanelStorage) storage;
}
use of com.evolveum.midpoint.web.session.MemberPanelStorage in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method createMemberSearch.
private <AH extends AssignmentHolderType> Search<AH> createMemberSearch(Class<AH> type) {
MemberPanelStorage memberPanelStorage = getMemberPanelStorage();
if (memberPanelStorage == null) {
// normally, this should not happen
return SearchFactory.createSearch(new ContainerTypeSearchItem<>(type), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
}
if (memberPanelStorage.getSearch() != null) {
return memberPanelStorage.getSearch();
}
SearchBoxConfigurationHelper searchBoxConfig = getSearchBoxConfiguration();
Search<AH> search = SearchFactory.createSearch(createSearchTypeItem(searchBoxConfig), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
search.addCompositedSpecialItem(createMemberSearchPanel(search, searchBoxConfig));
if (additionalPanelConfig != null) {
search.setCanConfigure(!Boolean.FALSE.equals(additionalPanelConfig.isAllowToConfigureSearchItems()));
}
memberPanelStorage.setSearch(search);
return search;
}
use of com.evolveum.midpoint.web.session.MemberPanelStorage in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method getMemberPanelStorage.
protected MemberPanelStorage getMemberPanelStorage() {
String storageKey = createStorageKey();
if (StringUtils.isEmpty(storageKey)) {
return null;
}
PageStorage storage = getPageStorage(storageKey);
if (storage == null) {
storage = getSessionStorage().initMemberStorage(storageKey);
}
return (MemberPanelStorage) storage;
}
Aggregations