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

io.github.rbajek.rasa.sdk.dto.event.Form Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package io.github.rbajek.rasa.sdk.dto.event;

import io.github.rbajek.rasa.sdk.util.StringUtils;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

import java.beans.Transient;
import java.sql.Timestamp;

@Getter
@EqualsAndHashCode(callSuper = true)
@ToString
public class Form extends AbstractEvent {

    //-----------------------------------------------
    // Fields
    //-----------------------------------------------

    private final String name;

    //-----------------------------------------------
    // Constructors
    //-----------------------------------------------

    public Form(String name) {
        this(name, null);
    }

    public Form(String name, Timestamp timestamp) {
        super("form", timestamp);
        this.name = name;
    }

    //-----------------------------------------------
    // Class methods
    //-----------------------------------------------

    @Transient
    public boolean isActive() {
        return StringUtils.isNotNullOrEmpty(this.name);
    }

    @Transient
    public boolean isNotActive() {
        return !isActive();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy