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

com.societegenerale.commons.plugin.model.Rules Maven / Gradle / Ivy

package com.societegenerale.commons.plugin.model;

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

public class Rules {

    public Rules() {
        //no arg constructor required by Maven when running the plugin
    }

    public Rules(List preConfiguredRules, List configurableRules) {
        this.preConfiguredRules = preConfiguredRules;
        this.configurableRules = configurableRules;
    }

    private List preConfiguredRules= new ArrayList<>();

    private List configurableRules= new ArrayList<>();

    public List getPreConfiguredRules() {
        return preConfiguredRules;
    }

    public List getConfigurableRules() {
        return configurableRules;
    }

    public boolean isValid() {
        return (hasSomePreConfiguredRules() || hasSomeConfigurableRules());
    }

    public boolean hasSomePreConfiguredRules() {
        return !preConfiguredRules.isEmpty();
    }

    public boolean hasSomeConfigurableRules() {
        return !configurableRules.isEmpty();
    }

    public void setPreConfiguredRules(List preConfiguredRules) {
        this.preConfiguredRules = preConfiguredRules;
    }

    public void setConfigurableRules(List configurableRules) {
        this.configurableRules = configurableRules;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy