jiazx0107
2025-12-04 9322f02c16d4a999fd4e9df96e200c9cf0fddf30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * This file is part of Dorado 7.x (http://dorado7.bsdn.org).
 *
 * Copyright (c) 2002-2012 BSTEK Corp. All rights reserved.
 *
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html)
 * and BSDN commercial (http://www.bsdn.org/licenses) licenses.
 *
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at http://www.bstek.com/contact.
 */
 
package com.bstek.dorado.core;
 
import java.rmi.dgc.VMID;
 
import org.apache.commons.lang.StringUtils;
 
/**
 *
 *
 *调整显示信息
 *
 * 用于获取各种Dorado基本信息的工具类。
 * @author Benny Bao (mailto:benny.bao@bstek.com)
 * @since Feb 27, 2007
 */
public class DoradoAbout {
    private static String instanceId = new VMID().toString();
    private static long instantiationTime = System.currentTimeMillis();
 
    /**
     * 返回产品名称。
     */
    public static String getProductTitle() {
        return "dorado";
    }
 
    /**
     * 返回产品提供商。
     */
    public static String getVendor() {
        return "dorado";
    }
 
    /**
     * 返回产品版本号。
     */
    public static String getVersion() {
        Package pkg = DoradoAbout.class.getPackage();
        String version = null;
        if (pkg != null) version = pkg.getImplementationVersion();
        if (StringUtils.isEmpty(version)) version = instanceId;
        return version;
    }
 
    /**
     * 返回dorado的实例id。
     */
    public static String getInstanceId() {
        return instanceId;
    }
 
    /**
     * 返回该dorado的实例的创建时间。
     */
    public static long getInstantiationTime() {
        return instantiationTime;
    }
}