Skip to content

Commit

Permalink
Adapt admin-gui to changes in inbounds schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Feb 15, 2022
1 parent 6d7ebd1 commit 6614b76
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ protected void onSubmit(AjaxRequestTarget target) {
editor.add(credentialsTooltip);
}

private String formatItemInfo(ResourceItemDefinitionType item, ItemPathType ref, String displayName, List<MappingType> inbounds,
MappingType outbound) {
private String formatItemInfo(ResourceItemDefinitionType item, ItemPathType ref, String displayName,
List<? extends MappingType> inbounds, MappingType outbound) {
StringBuilder sb = new StringBuilder();
if (ref != null && !ref.getItemPath().isEmpty()) {
QName name = ref.getItemPath().asSingleName();
Expand Down Expand Up @@ -952,7 +952,7 @@ private void removeEmptyContainers(@NotNull PrismObject<ResourceType> resourcePr
objectType.getAttribute().addAll(newAttributeList);

for (ResourceAttributeDefinitionType attr : objectType.getAttribute()) {
List<MappingType> newInbounds = clearEmptyMappings(attr.getInbound());
List<InboundMappingType> newInbounds = clearEmptyMappings(attr.getInbound());
attr.getInbound().clear();
attr.getInbound().addAll(newInbounds);
}
Expand All @@ -969,7 +969,7 @@ private void removeEmptyContainers(@NotNull PrismObject<ResourceType> resourcePr
objectType.getAssociation().addAll(newAssociationList);

for (ResourceObjectAssociationType association : objectType.getAssociation()) {
List<MappingType> newInbounds = clearEmptyMappings(association.getInbound());
List<InboundMappingType> newInbounds = clearEmptyMappings(association.getInbound());
association.getInbound().clear();
association.getInbound().addAll(newInbounds);
}
Expand Down Expand Up @@ -1008,10 +1008,10 @@ private <T> void replace(List<T> list, List<T> newList) {
list.addAll(newList);
}

private List<MappingType> clearEmptyMappings(List<MappingType> list) {
List<MappingType> newList = new ArrayList<>();
private <MT extends MappingType> List<MT> clearEmptyMappings(List<MT> list) {
List<MT> newList = new ArrayList<>();

for (MappingType mapping : list) {
for (MT mapping : list) {
if (!WizardUtil.isEmptyMapping(mapping)) {
newList.add(mapping);
}
Expand Down

0 comments on commit 6614b76

Please sign in to comment.