All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.imunity.scim.user.mapping.evaluation.SCIMMvelContextKey Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package io.imunity.scim.user.mapping.evaluation;

import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public enum SCIMMvelContextKey
{
	idsByType(SCIMMvelContextKey.descriptionPrefix + "idsByType"),
	attrObj(SCIMMvelContextKey.descriptionPrefix + "attrObj"),
	groups(SCIMMvelContextKey.descriptionPrefix + "groups"),
	groupsObj(SCIMMvelContextKey.descriptionPrefix + "groupsObj"),
	arrayObj(SCIMMvelContextKey.descriptionPrefix + "arrayObj"),
	attr(SCIMMvelContextKey.descriptionPrefix + "attr"),
	attrs(SCIMMvelContextKey.descriptionPrefix + "attrs");
	
	public static final String descriptionPrefix = "SCIMContextKey.";
	public final String descriptionKey;

	private SCIMMvelContextKey(String descriptionKey)
	{
		this.descriptionKey = descriptionKey;
	}

	public static Map mapForSingle()
	{
		return Stream.of(values()).filter(a -> !a.equals(arrayObj))
				.collect(Collectors.toMap(v -> v.name(), v -> v.descriptionKey));
	}

	public static Map mapForMulti()
	{
		return Stream.of(values()).collect(Collectors.toMap(v -> v.name(), v -> v.descriptionKey));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy