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

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

The 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 ExpandConfig implements AuthnElementConfiguration
{
	public static class Parser implements AuthnElementParser
	{
		@Override
		public Optional getConfigurationElement(VaadinEndpointProperties properties, String specEntry)
		{
			if (!specEntry.equals(AuthnOptionsColumns.SPECIAL_ENTRY_EXPAND))
			{
				return Optional.empty();
			}
			
			return Optional.of(new ExpandConfig());
		}
		
		@Override
		public PropertiesRepresentation toProperties(ExpandConfig config)
		{
			return new PropertiesRepresentation(AuthnOptionsColumns.SPECIAL_ENTRY_EXPAND);
		}
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (getClass() != obj.getClass())
			return false;
		return true;	
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy