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

com.enonic.xp.task.TaskInfoJson Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.task;

import java.time.Instant;
import java.util.Objects;

@Deprecated
public class TaskInfoJson
{
    private final TaskInfo taskInfo;

    public TaskInfoJson( final TaskInfo taskInfo )
    {
        this.taskInfo = Objects.requireNonNull( taskInfo );
    }

    public String getId()
    {
        return taskInfo.getId().toString();
    }

    public String getDescription()
    {
        return taskInfo.getDescription();
    }

    public String getName()
    {
        return taskInfo.getName();
    }

    public String getState()
    {
        return taskInfo.getState().name();
    }

    public String getApplication()
    {
        return taskInfo.getApplication().toString();
    }

    public String getUser()
    {
        return taskInfo.getUser().toString();
    }

    public Instant getStartTime()
    {
        return taskInfo.getStartTime();
    }

    public TaskProgressJson getProgress()
    {
        return taskInfo.getProgress() != null ? new TaskProgressJson( taskInfo.getProgress() ) : null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy