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

net.nemerosa.ontrack.model.structure.Signature Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.model.structure;

import lombok.Data;
import net.nemerosa.ontrack.common.Time;

import java.time.LocalDateTime;

@Data
public class Signature {

    private final LocalDateTime time;
    private final User user;

    public static Signature of(String name) {
        return of(Time.now(), name);
    }

    public static Signature of(LocalDateTime dateTime, String name) {
        return new Signature(
                dateTime,
                User.of(name)
        );
    }

    public static Signature none() {
        return new Signature(
                Time.now(),
                User.anonymous()
        );
    }

    public Signature withTime(LocalDateTime dateTime) {
        return new Signature(dateTime, user);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy