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

io.imunity.scim.console.AttributeDefinitionConfigurationList Maven / Gradle / Ivy

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

package io.imunity.scim.console;

import java.util.Collections;
import java.util.function.Supplier;

import pl.edu.icm.unity.MessageSource;
import pl.edu.icm.unity.webui.common.ListOfDnDCollapsableElements;

class AttributeDefinitionConfigurationList extends ListOfDnDCollapsableElements
{
	AttributeDefinitionConfigurationList(MessageSource msg, String addText, AttributeEditContext context, AttributeEditorData editorData)
	{
		super(msg, () -> new AttributeDefinitionWithMappingConfigurationEditor(msg, () -> context, editorData), "",
				Collections.emptyList(), addText, !context.attributesEditMode.equals(AttributesEditMode.FULL_EDIT));
	}
	
	
	AttributeDefinitionConfigurationList(MessageSource msg, String addText, Supplier contextSupplier, AttributeEditorData editorData)
	{
		super(msg, () -> new AttributeDefinitionWithMappingConfigurationEditor(msg, contextSupplier, editorData), "",
				Collections.emptyList(), addText, !contextSupplier.get().attributesEditMode.equals(AttributesEditMode.FULL_EDIT));
	}
	
	@Override
	protected AttributeDefinitionWithMappingBean makeNewInstance()
	{
		return new AttributeDefinitionWithMappingBean();
	}
	
	void refreshEditors()
	{
		elements.stream().forEach(e -> ((AttributeDefinitionWithMappingConfigurationEditor)e.getEditor()).refresh());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy