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

net.n2oapp.framework.config.metadata.compile.N2oComponentMerger Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.config.metadata.compile;

import net.n2oapp.framework.api.metadata.Source;
import net.n2oapp.framework.api.metadata.control.N2oComponent;
import org.springframework.stereotype.Component;

/**
 * Слияние компонентов
 */
@Component
public class N2oComponentMerger implements BaseSourceMerger {

    @Override
    public Class getSourceClass() {
        return N2oComponent.class;
    }

    @Override
    public T merge(T source, T override) {
        setIfNotNull(source::setSrc, override::getSrc);
        setIfNotNull(source::setCssClass, override::getCssClass);
        setIfNotNull(source::setStyle, override::getStyle);
        mergeExtAttributes(source, override);
        return source;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy