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

fm.pattern.tokamak.sdk.dsl.AbstractDSL Maven / Gradle / Ivy

The newest version!
package fm.pattern.tokamak.sdk.dsl;

import fm.pattern.tokamak.sdk.model.AccessTokenRepresentation;

@SuppressWarnings("unchecked")
public abstract class AbstractDSL {

    private boolean persistent;
    private AccessTokenRepresentation token;

    public T thatIs() {
        return (T) this;
    }

    public T thatAre() {
        return (T) this;
    }

    public T and() {
        return (T) this;
    }

    public T persistent() {
        this.persistent = true;
        return (T) this;
    }

    public T withToken(AccessTokenRepresentation token) {
        this.token = token;
        return (T) this;
    }

    public T persistent(AccessTokenRepresentation token) {
        this.persistent = true;
        this.token = token;
        return (T) this;
    }

    public AccessTokenRepresentation getToken() {
        return token;
    }

    public boolean shouldPersist() {
        return persistent;
    }

    public abstract C build();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy