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

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

?? abstractworkflow.java

?? Java編譯osworkflow工作流系統的安裝和源代碼
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.workflow;import com.opensymphony.module.propertyset.PropertySet;import com.opensymphony.module.propertyset.PropertySetManager;import com.opensymphony.workflow.config.Configuration;import com.opensymphony.workflow.config.DefaultConfiguration;import com.opensymphony.workflow.loader.*;import com.opensymphony.workflow.query.WorkflowExpressionQuery;import com.opensymphony.workflow.query.WorkflowQuery;import com.opensymphony.workflow.spi.*;import com.opensymphony.workflow.util.VariableResolver;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import java.util.*;/** * Abstract workflow instance that serves as the base for specific implementations, such as EJB or SOAP. * * @author <a href="mailto:plightbo@hotmail.com">Pat Lightbody</a> * @author Hani Suleiman */public class AbstractWorkflow implements Workflow {    //~ Static fields/initializers /////////////////////////////////////////////    private static final Log log = LogFactory.getLog(AbstractWorkflow.class);    //~ Instance fields ////////////////////////////////////////////////////////    protected WorkflowContext context;    private Configuration configuration;    private ThreadLocal stateCache = new ThreadLocal();    private TypeResolver typeResolver;    //~ Constructors ///////////////////////////////////////////////////////////    public AbstractWorkflow() {        stateCache.set(new HashMap());    }    //~ Methods ////////////////////////////////////////////////////////////////    /**     * @ejb.interface-method     * @deprecated use {@link #getAvailableActions(long, Map)}  with an empty Map instead.     */    public int[] getAvailableActions(long id) {        return getAvailableActions(id, new HashMap());    }    /**     * Get the available actions for the specified workflow instance.     * @ejb.interface-method     * @param id The workflow instance id.     * @param inputs The inputs map to pass on to conditions     * @return An array of action id's that can be performed on the specified entry.     * @throws IllegalArgumentException if the specified id does not exist, or if its workflow     * descriptor is no longer available or has become invalid.     */    public int[] getAvailableActions(long id, Map inputs) {        try {            WorkflowStore store = getPersistence();            WorkflowEntry entry = store.findEntry(id);            if (entry == null) {                throw new IllegalArgumentException("No such workflow id " + id);            }            if (entry.getState() != WorkflowEntry.ACTIVATED) {                return new int[0];            }            WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName());            if (wf == null) {                throw new IllegalArgumentException("No such workflow " + entry.getWorkflowName());            }            List l = new ArrayList();            PropertySet ps = store.getPropertySet(id);            Map transientVars = (inputs == null) ? new HashMap() : new HashMap(inputs);            Collection currentSteps = store.findCurrentSteps(id);            populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(0), currentSteps, ps);            // get global actions            List globalActions = wf.getGlobalActions();            for (Iterator iterator = globalActions.iterator();                    iterator.hasNext();) {                ActionDescriptor action = (ActionDescriptor) iterator.next();                RestrictionDescriptor restriction = action.getRestriction();                ConditionsDescriptor conditions = null;                transientVars.put("actionId", new Integer(action.getId()));                if (restriction != null) {                    conditions = restriction.getConditionsDescriptor();                }                //todo verify that 0 is the right currentStepId                if (passesConditions(wf.getGlobalConditions(), transientVars, ps, 0) && passesConditions(conditions, transientVars, ps, 0)) {                    l.add(new Integer(action.getId()));                }            }            // get normal actions            for (Iterator iterator = currentSteps.iterator();                    iterator.hasNext();) {                Step step = (Step) iterator.next();                l.addAll(getAvailableActionsForStep(wf, step, transientVars, ps));            }            int[] actions = new int[l.size()];            for (int i = 0; i < actions.length; i++) {                actions[i] = ((Integer) l.get(i)).intValue();            }            return actions;        } catch (Exception e) {            log.error("Error checking available actions", e);            return new int[0];        }    }    /**     * @ejb.interface-method     */    public void setConfiguration(Configuration configuration) {        this.configuration = configuration;    }    /**     * Get the configuration for this workflow.     * This method also checks if the configuration has been initialized, and if not, initializes it.     * @return The configuration that was set.     * If no configuration was set, then the default (static) configuration is returned.     *     */    public Configuration getConfiguration() {        Configuration config = (configuration != null) ? configuration : DefaultConfiguration.INSTANCE;        if (!config.isInitialized()) {            try {                config.load(null);            } catch (FactoryException e) {                log.fatal("Error initialising configuration", e);                //fail fast, better to blow up with an NPE that hide the error                return null;            }        }        return config;    }    /**     * @ejb.interface-method     */    public List getCurrentSteps(long id) {        try {            WorkflowStore store = getPersistence();            return store.findCurrentSteps(id);        } catch (StoreException e) {            log.error("Error checking current steps for instance #" + id, e);            return Collections.EMPTY_LIST;        }    }    /**     * @ejb.interface-method     */    public int getEntryState(long id) {        try {            WorkflowStore store = getPersistence();            return store.findEntry(id).getState();        } catch (StoreException e) {            log.error("Error checking instance state for instance #" + id, e);        }        return WorkflowEntry.UNKNOWN;    }    /**     * @ejb.interface-method     */    public List getHistorySteps(long id) {        try {            WorkflowStore store = getPersistence();            return store.findHistorySteps(id);        } catch (StoreException e) {            log.error("Error getting history steps for instance #" + id, e);        }        return Collections.EMPTY_LIST;    }    /**     * @ejb.interface-method     */    public Properties getPersistenceProperties() {        Properties p = new Properties();        Iterator iter = getConfiguration().getPersistenceArgs().entrySet().iterator();        while (iter.hasNext()) {            Map.Entry entry = (Map.Entry) iter.next();            p.setProperty((String) entry.getKey(), (String) entry.getValue());        }        return p;    }    /**     * Get the PropertySet for the specified workflow ID     * @ejb.interface-method     * @param id The workflow ID     */    public PropertySet getPropertySet(long id) {        PropertySet ps = null;        try {            ps = getPersistence().getPropertySet(id);        } catch (StoreException e) {            log.error("Error getting propertyset for instance #" + id, e);        }        return ps;    }    public void setResolver(TypeResolver resolver) {        this.typeResolver = resolver;    }    public TypeResolver getResolver() {        if (typeResolver == null) {            typeResolver = TypeResolver.getResolver();        }        return typeResolver;    }    /**     * @ejb.interface-method     */    public List getSecurityPermissions(long id) {        return getSecurityPermissions(id, null);    }    /**     * @ejb.interface-method     */    public List getSecurityPermissions(long id, Map inputs) {        try {            WorkflowStore store = getPersistence();            WorkflowEntry entry = store.findEntry(id);            WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName());            PropertySet ps = store.getPropertySet(id);            Map transientVars = (inputs == null) ? new HashMap() : new HashMap(inputs);            Collection currentSteps = store.findCurrentSteps(id);            populateTransientMap(entry, transientVars, wf.getRegisters(), null, currentSteps, ps);            List s = new ArrayList();            for (Iterator interator = currentSteps.iterator();                    interator.hasNext();) {                Step step = (Step) interator.next();                int stepId = step.getStepId();                StepDescriptor xmlStep = wf.getStep(stepId);                List securities = xmlStep.getPermissions();                for (Iterator iterator2 = securities.iterator();                        iterator2.hasNext();) {                    PermissionDescriptor security = (PermissionDescriptor) iterator2.next();                    // to have the permission, the condition must be met or not specified                    // securities can't have restrictions based on inputs, so it's null                    if (security.getRestriction() != null) {                        if (passesConditions(security.getRestriction().getConditionsDescriptor(), transientVars, ps, xmlStep.getId())) {                            s.add(security.getName());                        }                    }                }            }            return s;        } catch (Exception e) {            log.error("Error getting security permissions for instance #" + id, e);        }        return Collections.EMPTY_LIST;    }    /**     * Returns a workflow definition object associated with the given name.     *     * @param workflowName the name of the workflow     * @return the object graph that represents a workflow definition     * @ejb.interface-method     */    public WorkflowDescriptor getWorkflowDescriptor(String workflowName) {        try {            return getConfiguration().getWorkflow(workflowName);        } catch (FactoryException e) {            log.error("Error loading workflow " + workflowName, e);        }        return null;    }    /**     * @ejb.interface-method     */    public String getWorkflowName(long id) {        try {            WorkflowStore store = getPersistence();            WorkflowEntry entry = store.findEntry(id);            if (entry != null) {                return entry.getWorkflowName();            }        } catch (StoreException e) {            log.error("Error getting instance name for instance #" + id, e);        }        return null;    }    /**     * Get a list of workflow names available     * @return String[] an array of workflow names.     * @ejb.interface-method     */    public String[] getWorkflowNames() {        try {            return getConfiguration().getWorkflowNames();        } catch (FactoryException e) {            log.error("Error getting workflow names", e);        }        return new String[0];    }    /**     * @ejb.interface-method     */    public boolean canInitialize(String workflowName, int initialAction) {        return canInitialize(workflowName, initialAction, null);    }    /**     * @ejb.interface-method     * @param workflowName the name of the workflow to check     * @param initialAction The initial action to check     * @param inputs the inputs map     * @return true if the workflow can be initialized     */    public boolean canInitialize(String workflowName, int initialAction, Map inputs) {        final String mockWorkflowName = workflowName;        WorkflowEntry mockEntry = new WorkflowEntry() {            public long getId() {                return 0;            }            public String getWorkflowName() {                return mockWorkflowName;            }            public boolean isInitialized() {                return false;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区黑人麻豆| 日韩一区二区三区在线观看| 国产日韩精品久久久| 国产裸体歌舞团一区二区| 久久婷婷久久一区二区三区| 国产一区三区三区| 国产精品天美传媒| 91麻豆精品在线观看| 亚洲一区二区三区免费视频| 欧美日韩情趣电影| 青青草97国产精品免费观看 | 欧美视频日韩视频在线观看| 亚洲一区二区三区四区五区黄 | 狠狠色2019综合网| 国产片一区二区| 一本久久a久久免费精品不卡| 亚洲高清免费一级二级三级| 日韩欧美一二三四区| 国产成人av电影免费在线观看| 亚洲少妇最新在线视频| 欧美日韩亚洲另类| 久久精工是国产品牌吗| 国产精品私人自拍| 欧美色区777第一页| 韩国精品久久久| 中文成人综合网| 精品国产乱码久久久久久久久| 国产91富婆露脸刺激对白| 夜夜精品浪潮av一区二区三区| 日韩女优电影在线观看| 成人动漫在线一区| 香蕉成人伊视频在线观看| 国产欧美日韩综合精品一区二区| 一本一道波多野结衣一区二区| 美女视频免费一区| 亚洲视频免费在线观看| 日韩三级免费观看| 91社区在线播放| 久久99久久久欧美国产| 亚洲欧美另类图片小说| 久久久久久一级片| 欧美色网一区二区| 成人午夜激情在线| 日韩二区在线观看| 亚洲视频图片小说| 国产欧美日韩在线观看| 欧美精品黑人性xxxx| 成人毛片视频在线观看| 日本欧洲一区二区| 一区二区三区精品在线| 国产女同性恋一区二区| 日韩欧美精品三级| 欧美日精品一区视频| 99久久精品国产毛片| 国产精品香蕉一区二区三区| 午夜视频一区在线观看| 亚洲女人****多毛耸耸8| 欧美国产综合色视频| 自拍偷拍亚洲综合| 国产日产亚洲精品系列| 8x8x8国产精品| 91蝌蚪porny| 不卡影院免费观看| 国产成人精品免费视频网站| 麻豆免费看一区二区三区| 亚洲国产aⅴ天堂久久| 一区二区三区加勒比av| 亚洲麻豆国产自偷在线| 中文字幕一区在线观看视频| 久久久不卡网国产精品二区| 欧美白人最猛性xxxxx69交| 欧美精品久久久久久久多人混战| 欧美吻胸吃奶大尺度电影| 一本到不卡精品视频在线观看 | 日韩av网站在线观看| 亚洲国产日韩a在线播放| 亚洲三级在线播放| 亚洲激情网站免费观看| 亚洲色图色小说| 亚洲欧洲另类国产综合| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲色图在线看| 一区二区三区四区五区视频在线观看| 国产日韩精品一区二区三区在线| 国产欧美日本一区视频| 国产精品久久久久影院| 中文字幕日韩av资源站| 亚洲三级理论片| 亚洲一区在线观看视频| 图片区小说区区亚洲影院| 日韩成人免费看| 精一区二区三区| 国产伦理精品不卡| 91在线小视频| 欧美在线观看一区| 日韩亚洲欧美一区二区三区| 日韩美女视频在线| 久久久国产精华| 亚洲视频一二三| 午夜不卡av免费| 狠狠色综合色综合网络| 成人听书哪个软件好| 欧洲一区二区三区在线| 91精品国产综合久久国产大片| 精品国产一区二区精华| 国产精品视频九色porn| 亚洲美女在线一区| 免费在线欧美视频| 国产不卡视频一区二区三区| 色香蕉久久蜜桃| 69堂精品视频| 国产精品系列在线| 国产在线播放一区三区四| 成人高清av在线| 在线一区二区三区四区五区| 欧美一区二区三区思思人| 国产亚洲短视频| 亚洲第一搞黄网站| 国产盗摄女厕一区二区三区 | 亚洲国产cao| 国产精品一区二区在线看| 在线中文字幕不卡| 久久综合久久鬼色| 亚洲午夜久久久久久久久电影院| 99国产精品久久久久久久久久| 亚洲欧洲性图库| 久久国产成人午夜av影院| 91丨porny丨中文| 国产精品天美传媒沈樵| 国产精品18久久久久| 99精品视频一区| 欧美人牲a欧美精品| www亚洲一区| 亚洲国产岛国毛片在线| 日韩综合在线视频| 欧美高清精品3d| 国产精品久久久久一区二区三区共| 亚洲成人激情av| 91在线视频播放| 国产午夜精品福利| 久久精品国产第一区二区三区| 91污片在线观看| 中文字幕av资源一区| 久久se精品一区精品二区| 欧美日韩国产美女| 中文字幕在线播放不卡一区| 国产老妇另类xxxxx| 日韩一区二区精品在线观看| 亚洲国产美女搞黄色| 99国产精品一区| 国产精品乱码一区二区三区软件| 国模套图日韩精品一区二区| 51久久夜色精品国产麻豆| 亚洲一区在线看| 色综合久久综合网97色综合| 国产精品网友自拍| 成人小视频在线观看| 亚洲精品一线二线三线| 捆绑调教美女网站视频一区| 欧美性感一区二区三区| 一区二区三区四区国产精品| 91丨porny丨首页| 久久精品视频在线免费观看| 国产一区在线观看麻豆| 久久久久久久久99精品| 另类人妖一区二区av| 日韩三级视频中文字幕| 美女视频黄 久久| 欧美一区二区三区白人| 蜜桃精品在线观看| 欧美本精品男人aⅴ天堂| 久久99热99| 久久看人人爽人人| 夫妻av一区二区| 国产精品私人影院| av动漫一区二区| 一区二区视频在线| 在线亚洲+欧美+日本专区| 一区二区三区不卡视频在线观看| 欧美伊人久久久久久久久影院| 亚洲3atv精品一区二区三区| 欧美伦理电影网| 极品美女销魂一区二区三区免费| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲天堂成人网| 色一情一乱一乱一91av| 亚洲成人午夜影院| 日韩一卡二卡三卡四卡| 国产精品88av| 亚洲天堂中文字幕| 欧美日韩国产综合视频在线观看| 日韩精品1区2区3区| 久久理论电影网| 色综合天天综合网国产成人综合天 | 专区另类欧美日韩| 欧美综合视频在线观看| 美女视频一区在线观看| 国产欧美日产一区| 欧洲一区二区三区在线| 日本一道高清亚洲日美韩|