Package cn.com.manager.domains

Examples of cn.com.manager.domains.Node


     */
    public static void registTask(Task task) {
        TaskNode currentNode = OperatFactory.getServiceObject(TaskService.class, DataProviderModel.FILE).getTaskNode(task.getNode());
        String nodeName = currentNode.getCurrentNode();
        ProcessNode processNode = new ProcessNode();
        Node n = OperatFactory.getServiceObject(NodeService.class, DataProviderModel.FILE).getNode(nodeName);
        processNode.setAutoFlag(n.isAutoFlag());
        processNode.setNodeName(n.getNodeName());
        processNode.setNodeDesc(n.getNodeDesc());
        processNode.setNodeStatus(n.getNodeStatus());
        task.setProcessNode(processNode);
        task.setDisplay(processNode.getNodeDesc());
        task.setStatus(processNode.getNodeStatus());
        InitiationTaskInfo.initNextProcessNode(processNode);
        BricksCacheManager.INSTANCE.addCacheElement(_CACHE_NAME, task.getTaskid(), task);
View Full Code Here


     * @return
     */
    public static void initNextProcessNode(ProcessNode processNode) {
        if (processNode != null) {
            TaskNode currentNode = OperatFactory.getServiceObject(TaskService.class, DataProviderModel.FILE).getTaskNode(processNode.getNodeName());
            Node node = null;
            // 依次设定下一节点
            String nodeName = currentNode.getNextNode();
            if (!StringUtil.isEmpty(nodeName) ) {
                node = OperatFactory.getServiceObject(NodeService.class, DataProviderModel.FILE).getNode(nodeName);
                ProcessNode subNode = new ProcessNode();
                subNode.setAutoFlag(node.isAutoFlag());
                subNode.setNodeName(node.getNodeName());
                subNode.setNodeDesc(node.getNodeDesc());
                subNode.setNodeStatus(node.getNodeStatus());
                processNode.setNext(subNode);
            }
            nodeName = currentNode.getParentNode();
            // 依次设定父节点
            if (!StringUtil.isEmpty(nodeName)) {
                node = OperatFactory.getServiceObject(NodeService.class, DataProviderModel.FILE).getNode(nodeName);
                ProcessNode parentNode = new ProcessNode();
                parentNode.setAutoFlag(node.isAutoFlag());
                parentNode.setNodeName(node.getNodeName());
                parentNode.setNodeDesc(node.getNodeDesc());
                parentNode.setNodeStatus(node.getNodeStatus());
                processNode.setParent(parentNode);
            }
        }
    }
View Full Code Here

TOP

Related Classes of cn.com.manager.domains.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.