instancetablemanager.java

来自「一个工作流的原型」· Java 代码 · 共 78 行

JAVA
78
字号
/* * InstanceTableManager.java * * Created on 2004年12月29日, 下午10:04 */package workflow.xwfbox.instanceTable;import workflow.xwfbox.engine.InstanceBinding;import java.util.Vector;import java.util.Iterator;/** * * @author  Administrator */public class InstanceTableManager {    String InstanceMappingTableBinding = "file:///D:/xwfbox-v3/Source/xml/mapping/InstanceTableMapping.xml";    String InstanceMappingTable = "D:/xwfbox-v3/Source/xml/instances/InstanceTable.xml";    InstanceTable _instanceTable = null;    /** Creates a new instance of InstanceTableManager */    public InstanceTableManager() {        _instanceTable = (InstanceTable)InstanceBinding.getXMLInfo(InstanceMappingTable, InstanceMappingTableBinding);        if (_instanceTable == null) {            _instanceTable = new InstanceTable();        }    }        public InstanceTable getInstanceTable() {        return _instanceTable;    }        public void setInstanceTable(InstanceTable instanceTable) {        _instanceTable = instanceTable;    }        public void updateInstanceTable() {        InstanceBinding.putXMLInfo(_instanceTable, InstanceMappingTable, InstanceMappingTableBinding);    }        public String getInstanceLocation(String instanceId) {        Vector instanceRecs = _instanceTable.getInstanceRecs();        Iterator it = instanceRecs.iterator();        while (it.hasNext()) {            InstanceRec instanceRec = (InstanceRec)it.next();            if (instanceRec.getInstanceId().equals(instanceId)) {                return instanceRec.getInstanceLoc();            }        }        return null;    }        public String getPackageLocation(String instanceId) {        Vector instanceRecs = _instanceTable.getInstanceRecs();        Iterator it = instanceRecs.iterator();        while (it.hasNext()) {            InstanceRec instanceRec = (InstanceRec)it.next();            if (instanceRec.getInstanceId().equals(instanceId)) {                return instanceRec.getPackageLoc();            }        }        return null;    }        public String getProcessId(String instanceId) {        Vector instanceRecs = _instanceTable.getInstanceRecs();        Iterator it = instanceRecs.iterator();        while (it.hasNext()) {            InstanceRec instanceRec = (InstanceRec)it.next();            if (instanceRec.getInstanceId().equals(instanceId)) {                return instanceRec.getProcessId();            }        }        return null;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?