亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? serializableworkflowstore.java

?? 一個很好實用的工作流OSWORKFLOW開發例子.有著非常優秀的靈活性.
?? JAVA
字號:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.workflow.spi.memory;import com.opensymphony.module.propertyset.PropertySet;import com.opensymphony.module.propertyset.PropertySetManager;import com.opensymphony.workflow.query.WorkflowQuery;import com.opensymphony.workflow.spi.*;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import java.io.*;import java.util.*;/** * Simple flat file implementation. * * Following properties are <b>required</b>: * <ul> * <li><b>storeFile</b> - the absolute path to the store file (<i>ex:c:\workflow.store</i>)</li> * </ul> * * @author <a href="mailto:gbort@msn.com">Guillaume Bort</a> */public class SerializableWorkflowStore extends MemoryWorkflowStore {    //~ Static fields/initializers /////////////////////////////////////////////    protected static final Log log = LogFactory.getLog(SerializableWorkflowStore.class);    static String storeFile;    //~ Methods ////////////////////////////////////////////////////////////////    public PropertySet getPropertySet(long entryId) {        PropertySet ps = (PropertySet) SerializableCache.getInstance().propertySetCache.get(new Long(entryId));        if (ps == null) {            ps = PropertySetManager.getInstance("serializable", null);            SerializableCache.getInstance().propertySetCache.put(new Long(entryId), ps);        }        return ps;    }    public static void setStoreFile(String storeFile) {        SerializableWorkflowStore.storeFile = storeFile;    }    public static String getStoreFile() {        return storeFile;    }    public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) {        long id = SerializableCache.getInstance().globalStepId++;        SimpleStep step = new SimpleStep(id, entryId, stepId, 0, owner, startDate, dueDate, null, status, previousIds, null);        List currentSteps = (List) SerializableCache.getInstance().currentStepsCache.get(new Long(entryId));        if (currentSteps == null) {            currentSteps = new ArrayList();            SerializableCache.getInstance().currentStepsCache.put(new Long(entryId), currentSteps);        }        currentSteps.add(step);        SerializableCache.store();        return step;    }    public WorkflowEntry createEntry(String workflowName) {        long id = SerializableCache.getInstance().globalEntryId++;        SimpleWorkflowEntry entry = new SimpleWorkflowEntry(id, workflowName, WorkflowEntry.CREATED);        SerializableCache.getInstance().entryCache.put(new Long(id), entry);        SerializableCache.store();        return entry;    }    public List findCurrentSteps(long entryId) {        List currentSteps = (List) SerializableCache.getInstance().currentStepsCache.get(new Long(entryId));        if (currentSteps == null) {            currentSteps = new ArrayList();            SerializableCache.getInstance().currentStepsCache.put(new Long(entryId), currentSteps);        }        return currentSteps;    }    public WorkflowEntry findEntry(long entryId) {        return (WorkflowEntry) SerializableCache.getInstance().entryCache.get(new Long(entryId));    }    public List findHistorySteps(long entryId) {        List historySteps = (List) SerializableCache.getInstance().historyStepsCache.get(new Long(entryId));        if (historySteps == null) {            historySteps = new ArrayList();            SerializableCache.getInstance().historyStepsCache.put(new Long(entryId), historySteps);        }        return historySteps;    }    public void init(Map props) {        storeFile = (String) props.get("storeFile");        // check whether the file denoted by the storeFile property is a normal file.        if (!new File(storeFile).isFile()) {            log.fatal("storePath property should indicate a normal file");        }        // check wheter the directory containing the storeFile exist        if (!new File(storeFile).getParentFile().exists()) {            log.fatal("directory " + new File(storeFile).getParent() + " not found");        }    }    public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) {        List currentSteps = (List) SerializableCache.getInstance().currentStepsCache.get(new Long(step.getEntryId()));        for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) {            SimpleStep theStep = (SimpleStep) iterator.next();            if (theStep.getId() == step.getId()) {                theStep.setStatus(status);                theStep.setActionId(actionId);                theStep.setFinishDate(finishDate);                theStep.setCaller(caller);                return theStep;            }        }        SerializableCache.store();        return null;    }    public void moveToHistory(Step step) {        List currentSteps = (List) SerializableCache.getInstance().currentStepsCache.get(new Long(step.getEntryId()));        List historySteps = (List) SerializableCache.getInstance().historyStepsCache.get(new Long(step.getEntryId()));        if (historySteps == null) {            historySteps = new ArrayList();            SerializableCache.getInstance().historyStepsCache.put(new Long(step.getEntryId()), historySteps);        }        SimpleStep simpleStep = (SimpleStep) step;        for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) {            Step currentStep = (Step) iterator.next();            if (simpleStep.getId() == currentStep.getId()) {                iterator.remove();                historySteps.add(simpleStep);                break;            }        }        SerializableCache.store();    }}class SerializableCache implements Serializable {    //~ Static fields/initializers /////////////////////////////////////////////    private static transient SerializableCache instance;    //~ Instance fields ////////////////////////////////////////////////////////    HashMap currentStepsCache;    HashMap entryCache;    HashMap historyStepsCache;    HashMap propertySetCache;    long globalEntryId = 1;    long globalStepId = 1;    //~ Constructors ///////////////////////////////////////////////////////////    private SerializableCache() {        entryCache = new HashMap();        currentStepsCache = new HashMap();        historyStepsCache = new HashMap();        propertySetCache = new HashMap();    }    //~ Methods ////////////////////////////////////////////////////////////////    public List query(WorkflowQuery query) {        // not implemented        return Collections.EMPTY_LIST;    }    static SerializableCache getInstance() {        if (instance == null) {            instance = load();        }        return instance;    }    static SerializableCache load() {        try {            FileInputStream fis = new FileInputStream(new File(SerializableWorkflowStore.storeFile));            ObjectInputStream ois = new ObjectInputStream(fis);            SerializableCache o = (SerializableCache) ois.readObject();            fis.close();            return o;        } catch (Exception e) {            SerializableWorkflowStore.log.fatal("cannot store in file " + SerializableWorkflowStore.storeFile + ". Create a new blank store.");        }        return new SerializableCache();    }    static void store() {        try {            FileOutputStream fos = new FileOutputStream(new File(SerializableWorkflowStore.storeFile));            ObjectOutputStream oos = new ObjectOutputStream(fos);            oos.writeObject(getInstance());            fos.close();        } catch (Exception e) {            SerializableWorkflowStore.log.fatal("cannot store in file " + SerializableWorkflowStore.storeFile + ".");        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美洲天堂一区二卡三卡四卡视频| 洋洋成人永久网站入口| 欧美三级欧美一级| 欧美性猛交xxxxxx富婆| 日本丰满少妇一区二区三区| av亚洲精华国产精华精| 99久久伊人网影院| 色婷婷av一区二区三区gif| 99久久精品一区二区| 色88888久久久久久影院按摩| av资源网一区| 欧美亚男人的天堂| 日韩一级二级三级| 欧美精品一区二区三区蜜桃视频| 精品少妇一区二区三区在线播放 | 成人美女视频在线观看18| 国产xxx精品视频大全| 99久久99久久精品免费看蜜桃| 99免费精品视频| 欧美吞精做爰啪啪高潮| 日韩一区二区三区电影| 久久蜜桃av一区精品变态类天堂 | 亚洲色图欧美偷拍| 亚洲成人激情自拍| 久久精品国产99国产精品| 国产精品88888| 在线观看欧美日本| 欧美精品一区二区蜜臀亚洲| 国产精品久久午夜夜伦鲁鲁| 亚洲无人区一区| 国产一区二三区好的| 99久久99久久精品免费观看 | 丁香桃色午夜亚洲一区二区三区| 99v久久综合狠狠综合久久| 欧美日韩一卡二卡三卡| 国产亚洲人成网站| 亚洲狠狠爱一区二区三区| 久久精品国产色蜜蜜麻豆| 色哟哟一区二区三区| 日韩欧美视频在线| 亚洲精品乱码久久久久久黑人| 奇米影视一区二区三区小说| 色综合久久久久综合体| 久久综合九色欧美综合狠狠| 亚洲一区电影777| 成人午夜激情在线| 日韩免费看的电影| 舔着乳尖日韩一区| 91丨porny丨户外露出| 精品国产乱码久久久久久1区2区| 丝袜亚洲另类欧美| 欧美美女喷水视频| 中文字幕一区二区三区不卡| 九九九久久久精品| 91精品国产欧美一区二区18| 国产精品久久久久久久久免费丝袜 | 麻豆国产精品一区二区三区| 日本韩国精品在线| 国产精品免费丝袜| 国产乱码精品一区二区三| 日韩美女天天操| 日本视频在线一区| 欧美巨大另类极品videosbest | 欧美一区二区久久| 亚洲一区二区三区中文字幕在线| 成人不卡免费av| 国产欧美日韩中文久久| 国模娜娜一区二区三区| 日韩午夜中文字幕| 热久久一区二区| 91精品国产综合久久精品app | 久久综合色天天久久综合图片| 亚洲成av人**亚洲成av**| 在线视频你懂得一区二区三区| 最新日韩在线视频| 91亚洲精华国产精华精华液| 成人免费在线视频| 91免费观看国产| 一区二区国产视频| 欧美人牲a欧美精品| 日韩和欧美一区二区| 制服丝袜成人动漫| 美女mm1313爽爽久久久蜜臀| 日韩久久精品一区| 国产jizzjizz一区二区| 国产精品久久夜| 欧美主播一区二区三区| 午夜国产不卡在线观看视频| 在线播放国产精品二区一二区四区| 亚洲va国产va欧美va观看| 91精品在线观看入口| 韩国精品久久久| 国产精品萝li| 欧美日韩在线直播| 国产在线一区二区综合免费视频| 久久久99久久精品欧美| 99热99精品| 青青草97国产精品免费观看 | 成人av在线网站| 亚洲综合成人网| 日韩一区二区电影网| 成人中文字幕在线| 亚洲激情综合网| 日韩欧美一区在线观看| 成人高清在线视频| 亚洲成人激情自拍| 欧美激情中文不卡| 69av一区二区三区| 福利一区福利二区| 日本系列欧美系列| 一区二区三区不卡视频| 欧美一区二区不卡视频| 懂色av一区二区三区免费看| 亚洲一区在线视频观看| 国产视频在线观看一区二区三区| 色悠悠久久综合| 国产成人av一区| 视频一区二区中文字幕| 国产精品久久毛片a| 日韩美女视频在线| 91久久精品一区二区三| 国产精品99久久久久久久女警 | 久久午夜羞羞影院免费观看| 在线观看亚洲a| 国产福利一区二区三区在线视频| 一区二区三区不卡视频| 国产精品国产三级国产普通话蜜臀| 日韩一区二区三区视频在线观看| av午夜精品一区二区三区| 国产一区美女在线| 人人狠狠综合久久亚洲| 亚洲成人免费av| 亚洲最新视频在线播放| 国产精品视频一二| 精品少妇一区二区三区在线播放| 欧美日韩亚洲不卡| 在线视频一区二区免费| 99re66热这里只有精品3直播| 国产精品白丝jk黑袜喷水| 老司机午夜精品99久久| 午夜久久福利影院| 亚洲成人一区二区在线观看| 亚洲美女免费视频| 自拍偷拍亚洲综合| 亚洲欧洲性图库| 国产精品久久久久久久久快鸭 | 久久久99精品免费观看不卡| 日韩欧美成人激情| 欧美v国产在线一区二区三区| 91.麻豆视频| 日韩欧美一二区| 欧美成va人片在线观看| 欧美成人r级一区二区三区| 日韩欧美在线一区二区三区| 91精品国产91热久久久做人人| 欧美人伦禁忌dvd放荡欲情| 欧美夫妻性生活| 在线不卡欧美精品一区二区三区| 777奇米四色成人影色区| 制服视频三区第一页精品| 日韩一级完整毛片| www国产亚洲精品久久麻豆| 国产午夜亚洲精品不卡| 亚洲国产精品精华液2区45| 国产精品麻豆视频| 亚洲一二三四在线观看| 天天色图综合网| 国内不卡的二区三区中文字幕 | 91日韩精品一区| 欧美中文字幕一区二区三区| 欧美日韩久久一区| 日韩三级精品电影久久久| 精品蜜桃在线看| 国产精品妹子av| 亚洲国产精品久久一线不卡| 国产真实精品久久二三区| 成人动漫在线一区| 欧美男男青年gay1069videost| 欧美狂野另类xxxxoooo| 国产亚洲欧洲一区高清在线观看| 国产精品久久久久影院老司| 亚洲成人动漫精品| 国产1区2区3区精品美女| 91色porny| 亚洲精品在线三区| 亚洲女人的天堂| 国产一区二区三区蝌蚪| 色欧美片视频在线观看| 日韩精品中文字幕在线不卡尤物 | 91视频免费看| 精品女同一区二区| 亚洲精品成人悠悠色影视| 另类小说一区二区三区| 色激情天天射综合网| 日韩免费福利电影在线观看| 亚洲人成影院在线观看| 久久精品99国产国产精| 91久久人澡人人添人人爽欧美 | 欧美日韩视频在线一区二区| 久久综合999|