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

io.imunity.vaadin.auth.services.layout.configuration.elements.RegistrationConfig Maven / Gradle / Ivy

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

package io.imunity.vaadin.auth.services.layout.configuration.elements;

import io.imunity.vaadin.auth.AuthnOptionsColumns;
import io.imunity.vaadin.endpoint.common.VaadinEndpointProperties;

import java.util.Optional;

public class RegistrationConfig implements AuthnElementConfiguration
{
	public static class Parser implements AuthnElementParser
	{
		@Override
		public Optional getConfigurationElement(
				VaadinEndpointProperties properties, String specEntry)
		{
			return !specEntry.equals(AuthnOptionsColumns.SPECIAL_ENTRY_REGISTER) ?
					Optional.empty() : Optional.of(new RegistrationConfig());
		}
		
		@Override
		public PropertiesRepresentation toProperties(RegistrationConfig element)
		{
			return new PropertiesRepresentation(AuthnOptionsColumns.SPECIAL_ENTRY_REGISTER);
		}
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (getClass() != obj.getClass())
			return false;
		return true;	
	}	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy