package com.sinosig.util.domain;

import java.io.Serializable;
import org.springframework.util.DigestUtils;

public class WFMode implements Serializable {
    /**
	 * default serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

    String wfmodeid;

    String wfmodename;

    /*
	 * 逻辑名
	 */
	String logicname;

    /**
     * 部署系统标识
     */
    String pssystemid;

    /**
     * 部署域标识
     */
    String workflowid;

    public String getWfmodeid() {
        if (this.wfmodeid == null) {
            return this.wfmodeid;
        }
        String srtTmp = this.wfmodeid;
        if (this.pssystemid != null) {
            srtTmp = this.pssystemid + srtTmp;
        }
        if (this.workflowid != null) {
            srtTmp = this.workflowid + srtTmp;
        }
        return DigestUtils.md5DigestAsHex(srtTmp.getBytes());
    }

    public void setWfmodeid(String wfmodeid) {
        this.wfmodeid = wfmodeid;
    }

    public String getWfmodename() {
        return this.wfmodename;
    }

    public void setWfmodename(String wfmodename) {
        this.wfmodename = wfmodename;
    }

    public String getPssystemid() {
        if (this.pssystemid == null) {
            return this.pssystemid;
        }
        String srtTmp = this.pssystemid;
        if (this.workflowid != null) {
            srtTmp = this.workflowid + srtTmp;
        }
        return DigestUtils.md5DigestAsHex(srtTmp.getBytes());
    }

	public void setPssystemid(String pssystemid) {
		this.pssystemid = pssystemid;
	}

	public String getWorkflowid() {
        if (this.workflowid != null) {
            return DigestUtils.md5DigestAsHex(this.workflowid.getBytes());
        }
        return this.workflowid;
    }

    public void setWorkflowid(String workflowid) {
        this.workflowid = workflowid;
    }

    public String getLogicname() {
		return logicname;
	}

	public void setLogicname(String logicname) {
		this.logicname = logicname;
	}

}
