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

pl.fhframework.trees.ITreeElement Maven / Gradle / Ivy

package pl.fhframework.trees;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

public interface ITreeElement {
    //settery dodane do interfejsu ze wzgledu na brak obslugi bindingu gdy element modelu fromatki jest interfejsem

    String getRef();
    void setRef(String ref);

    String getIcon();
    void setIcon(String icon);

    int getPosition();
    void setPosition(int position);

    String getLabel();
    void setLabel(String label);

    String getDescription();
    void setDescription(String description);

    boolean isDynamic();

    boolean isLeaf();

    List getModes();
    void setModes(List modes);

    String getCloudServerName();

    AtomicBoolean getActivityToken();

    boolean isGrouping();

    List getSubelements();

    default boolean isAvailableForMode(List activeModes) {
        if (!activeModes.isEmpty()) {
            if (this.getModes() == null || this.getModes().isEmpty() || !Collections.disjoint(activeModes, this.getModes())) {
                return true;
            } else {
                return false;
            }
        } else {
            return true;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy