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

io.imunity.scim.console.SCIMServiceConfigurationBean 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.console;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import io.imunity.scim.console.mapping.SchemaWithMappingBean;
import io.imunity.scim.schema.DefaultSchemaProvider;
import io.imunity.vaadin.auth.services.idp.GroupWithIndentIndicator;
import pl.edu.icm.unity.base.group.Group;

public class SCIMServiceConfigurationBean
{
	private List allowedCORSheaders;
	private List allowedCORSorigins;
	private GroupWithIndentIndicator rootGroup;
	private GroupWithIndentIndicator restAdminGroup;
	private List membershipGroups;
	private List schemas;
	private List membershipAttributes;
	private List excludedMembershipGroups;

	SCIMServiceConfigurationBean(ConfigurationVaadinBeanMapper configurationVaadinBeanMapper)
	{
		allowedCORSheaders = new ArrayList<>();
		allowedCORSorigins = new ArrayList<>();
		membershipGroups = new ArrayList<>();
		excludedMembershipGroups = new ArrayList<>();
		membershipAttributes = new ArrayList<>(DefaultSchemaProvider.getBasicUserSchemaMembershipAttributes());
		schemas = new ArrayList<>();
		schemas.add(
				configurationVaadinBeanMapper.mapFromConfigurationSchema(DefaultSchemaProvider.getBasicGroupSchema()));
		schemas.add(
				configurationVaadinBeanMapper.mapFromConfigurationSchema(DefaultSchemaProvider.getBasicUserSchema()));
	}

	public List getAllowedCORSheaders()
	{
		return allowedCORSheaders;
	}

	public void setAllowedCORSheaders(List allowedCORSheaders)
	{
		this.allowedCORSheaders = allowedCORSheaders;
	}

	public void setAllowedCORSorigins(List allowedCORSorigins)
	{
		this.allowedCORSorigins = allowedCORSorigins;
	}

	public List getAllowedCORSorigins()
	{
		return allowedCORSorigins;
	}

	public GroupWithIndentIndicator getRootGroup()
	{
		return rootGroup;
	}

	public void setRootGroup(GroupWithIndentIndicator rootGroup)
	{
		this.rootGroup = rootGroup;
	}

	public List getMembershipGroups()
	{
		return membershipGroups;
	}

	public void setMembershipGroups(List membershipGroups)
	{
		this.membershipGroups = membershipGroups;
	}

	public List getSchemas()
	{
		return schemas;
	}

	public void setSchemas(List schemas)
	{
		this.schemas = schemas;
	}

	public List getMembershipAttributes()
	{
		return membershipAttributes;
	}

	public void setMembershipAttributes(List membershipAttributes)
	{
		this.membershipAttributes = membershipAttributes;
	}

	public List getExcludedMembershipGroups()
	{
		return excludedMembershipGroups;
	}

	public void setExcludedMembershipGroups(List excludedMembershipGroups)
	{
		this.excludedMembershipGroups = excludedMembershipGroups;
	}

	public GroupWithIndentIndicator getRestAdminGroup()
	{
		return restAdminGroup;
	}

	public void setRestAdminGroup(GroupWithIndentIndicator adminGroup)
	{
		this.restAdminGroup = adminGroup;
	}
	
	@Override
	public int hashCode()
	{
		return Objects.hash(allowedCORSheaders, allowedCORSorigins, membershipGroups, excludedMembershipGroups,
				rootGroup, restAdminGroup, schemas, membershipAttributes);
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SCIMServiceConfigurationBean other = (SCIMServiceConfigurationBean) obj;
		return Objects.equals(allowedCORSheaders, other.allowedCORSheaders)
				&& Objects.equals(allowedCORSorigins, other.allowedCORSorigins)
				&& Objects.equals(membershipGroups, other.membershipGroups)
				&& Objects.equals(excludedMembershipGroups, other.excludedMembershipGroups)
				&& Objects.equals(membershipAttributes, other.membershipAttributes)
				&& Objects.equals(rootGroup, other.rootGroup) 
				&& Objects.equals(restAdminGroup, other.restAdminGroup) 
				&& Objects.equals(schemas, other.schemas);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy