Skip to content

Commit

Permalink
removed two read-only model classes that are useless with Wicket 8+
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Sep 28, 2022
1 parent 4b82494 commit 302922f
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 178 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.text.Collator;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
Expand Down Expand Up @@ -87,7 +86,6 @@
import com.evolveum.midpoint.gui.api.model.LoadableModel;
import com.evolveum.midpoint.gui.api.model.NonEmptyModel;
import com.evolveum.midpoint.gui.api.model.ReadOnlyModel;
import com.evolveum.midpoint.gui.api.model.ReadOnlyValueModel;
import com.evolveum.midpoint.gui.api.page.PageAdminLTE;
import com.evolveum.midpoint.gui.api.page.PageBase;
import com.evolveum.midpoint.gui.api.prism.wrapper.*;
Expand Down Expand Up @@ -236,6 +234,7 @@ public final class WebComponentUtil {
/**
* To be used only for tests when there's no MidpointApplication.
* (Quite a hack. Replace eventually by a more serious solution.)
* TODO: Not used anymore, consider removal? (If not used in 2024, just delete it.)
*/
private static RelationRegistry staticallyProvidedRelationRegistry;

Expand Down Expand Up @@ -1041,15 +1040,6 @@ public static <T extends Enum> IModel<List<T>> createReadonlyModelFromEnum(final
};
}

// use for small enums only
@NotNull
public static <T extends Enum> IModel<List<T>> createReadonlyValueModelFromEnum(@NotNull Class<T> type, @NotNull Predicate<T> filter) {
return new ReadOnlyValueModel<>(
Arrays.stream(type.getEnumConstants())
.filter(filter)
.collect(Collectors.toList()));
}

/**
* Simulates task category using task archetype.
*/
Expand Down

0 comments on commit 302922f

Please sign in to comment.