/*
 * $Id: InstanceInfo.java,v 1.2 2004/09/20 10:26:14 koppy Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 * 
 * Created on 12.07.2004
 *
 * $Log: InstanceInfo.java,v $
 * Revision 1.2  2004/09/20 10:26:14  koppy
 * +javadoc Dokumentation
 *
 * Revision 1.1  2004/08/30 14:49:54  koppy
 * Initiale Version der Workflow-Komponente
 *
 */
package vkc.workflow.model;

import java.util.Date;

/**
 * This class represents a java bean
 * to encapsulate infos about process and activity instances.
 * It is primary used in the presentation layer.
 * 
 * @author Andreas Koop
 */
public class InstanceInfo {
    
    private String id = null;
    private String name = null;
    private String description = null;
    private short priority = -1;
    private String state ="unknown";
    private Date startTime = null;
    private Date endTime = null;
    
    /**
     * @return Returns the description.
     */
    public String getDescription() {
        return description;
    }
    /**
     * @param description The description to set.
     */
    public void setDescription(String description) {
        this.description = description;
    }
    /**
     * @return Returns the id.
     */
    public String getId() {
        return id;
    }
    /**
     * @return Returns the priority.
     */
    public short getPriority() {
        return priority;
    }
    /**
     * @param priority The priority to set.
     */
    public void setPriority(short priority) {
        this.priority = priority;
    }
    /**
     * @return Returns the state.
     */
    public String getState() {
        return state;
    }
    /**
     * @param state The state to set.
     */
    public void setState(String state) {
        this.state = state;
    }
    /**
     * @param id The id to set.
     */
    public void setId(String id) {
        this.id = id;
    }
    /**
     * @return Returns the name.
     */
    public String getName() {
        return name;
    }
    /**
     * @param name The name to set.
     */
    public void setName(String name) {
        this.name = name;
    }
    
    
    /** 
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    public String toString() {
        
        return "id          " + this.id + "\n" 
        	+ "Name        " + this.name+ "\n" 
        	+ "Desc        " + this.description+ "\n" 
        	+ "prio        " + this.priority+ "\n"
        	+ "state       " + this.state;
    }
    
    
    /**
     * Returns the end time of this instance.
     * @return the end time.
     */
    public Date getEndTime() {
        return endTime;
    }
    
    /**
     * Sets the endtime of this instance.
     * @param endTime the end time
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    
    /**
     * Returns the start time of this instance.
     * @return the start time.
     */
    public Date getStartTime() {
        return startTime;
    }
    
    /**
     * Sets the start time of this instance.
     * @param startTime
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
}
