亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
一区二区三区 在线观看视频| 亚洲黄一区二区三区| 久久久欧美精品sm网站| 国产日韩欧美高清| 亚洲黄色小视频| 日本午夜精品一区二区三区电影| 精品无人区卡一卡二卡三乱码免费卡| 国产91综合网| 欧美欧美午夜aⅴ在线观看| 一区精品在线播放| 亚洲美女淫视频| 国产综合一区二区| 欧美日韩精品一区二区三区四区| 国产欧美中文在线| 天堂成人国产精品一区| av一区二区不卡| 日韩一区二区电影| 一区二区三区欧美激情| 国产精品一区二区在线观看网站| 欧美性色黄大片| 亚洲久本草在线中文字幕| 久久成人18免费观看| 欧美日韩第一区日日骚| 亚洲欧美日韩成人高清在线一区| 久久精品国产久精国产爱| 欧美日韩精品综合在线| 亚洲影视资源网| 91福利国产成人精品照片| 亚洲天堂免费看| 成人av电影观看| 中文字幕日韩一区二区| 国产成人av福利| 国产日韩欧美一区二区三区乱码| 高清久久久久久| 中文字幕一区在线观看| 色综合天天性综合| 一区二区三区不卡在线观看| 91成人国产精品| 韩日欧美一区二区三区| 国产欧美1区2区3区| 在线免费精品视频| 极品少妇xxxx偷拍精品少妇| 欧美日韩国产三级| 亚洲国产欧美一区二区三区丁香婷| 成人av综合在线| 日韩理论片一区二区| 国产高清视频一区| 国产精品国产三级国产aⅴ入口| 久久99国产乱子伦精品免费| 日韩一级片网站| 色美美综合视频| 日韩精品色哟哟| 国产精品美女一区二区在线观看| 在线亚洲+欧美+日本专区| 精品影院一区二区久久久| 国产精品成人在线观看| 91精品福利在线一区二区三区| 久久国产婷婷国产香蕉| 亚洲精品美国一| 国产亚洲精品7777| 欧美一区二区三区视频在线| 99精品国产热久久91蜜凸| 亚洲成av人片www| 亚洲视频每日更新| 国产网站一区二区| 国产精品三级av在线播放| 91精品一区二区三区久久久久久| 最新国产精品久久精品| 777久久久精品| 欧美色图激情小说| 亚洲va欧美va国产va天堂影院| 欧美日韩一区二区三区视频| 麻豆一区二区99久久久久| 麻豆免费看一区二区三区| 蜜臀久久久99精品久久久久久| 六月丁香婷婷色狠狠久久| 国产伦精品一区二区三区免费迷| 国产精品一二三四区| 一区二区三区资源| 日韩美一区二区三区| 国产精品一区二区在线观看不卡| 一区二区三区在线视频观看58| 色网综合在线观看| 亚洲一区二区三区视频在线| 欧美mv日韩mv| 国产一区二区三区精品欧美日韩一区二区三区| 91精品国产欧美一区二区18| 91麻豆精品国产综合久久久久久| 成人精品免费网站| 色婷婷久久久综合中文字幕| 国产在线一区二区| 日本91福利区| 国产日韩综合av| 欧美视频你懂的| 色综合欧美在线视频区| 人人精品人人爱| 亚洲人被黑人高潮完整版| 中文字幕国产一区| 成人中文字幕电影| 人人精品人人爱| 亚洲黄色免费网站| 国产精品欧美久久久久一区二区| 69堂国产成人免费视频| 亚洲色图制服丝袜| av欧美精品.com| 欧美国产激情一区二区三区蜜月| 日韩av网站在线观看| 欧美日韩国产一区| 亚洲小少妇裸体bbw| 樱桃国产成人精品视频| 日本欧美加勒比视频| 色综合天天性综合| 久久久久久久久久久黄色| 五月婷婷久久丁香| 成人动漫一区二区三区| 欧美精品一区二区三区蜜臀| 亚洲成人综合视频| 欧美亚洲另类激情小说| 日本一区二区三级电影在线观看 | 欧美日本一区二区| 国产suv精品一区二区三区| 爽好久久久欧美精品| 久久99国产精品尤物| 国产精品影视在线| 91玉足脚交白嫩脚丫在线播放| 日韩一区二区高清| 日一区二区三区| 欧美一区二区在线免费观看| 亚洲第一狼人社区| 欧美精品日日鲁夜夜添| 日日夜夜精品视频免费| 51午夜精品国产| 麻豆精品一二三| 欧美一区二区啪啪| 国产激情偷乱视频一区二区三区| 久久嫩草精品久久久精品一| 国产成人免费视频网站高清观看视频| 欧美电影免费观看完整版| 国产精品综合一区二区三区| 久久天天做天天爱综合色| 成人小视频在线| 亚洲第一电影网| 久久综合狠狠综合| 97精品久久久午夜一区二区三区| 亚洲丰满少妇videoshd| 欧美精品丝袜中出| 一区二区三区毛片| 99久久免费视频.com| 成人欧美一区二区三区在线播放| 五月天激情小说综合| 99久久久国产精品免费蜜臀| 精品欧美久久久| 久久99久久99小草精品免视看| 国产精品久久久久影视| 欧美日韩国产小视频| 丁香激情综合国产| 午夜精品福利久久久| 亚洲男人都懂的| 久久久精品黄色| 久久综合国产精品| 一本大道综合伊人精品热热| 国产精品免费aⅴ片在线观看| 久久97超碰色| 中文字幕一区二区5566日韩| www.激情成人| 亚洲色图视频网站| 日韩欧美综合一区| 色94色欧美sute亚洲13| 亚洲成人资源网| 亚洲视频1区2区| 欧美精品一区二区三区视频| 欧美性欧美巨大黑白大战| 色偷偷久久一区二区三区| 91女厕偷拍女厕偷拍高清| 99re成人精品视频| 日本韩国欧美一区| 91亚洲国产成人精品一区二区三| 国产精品综合二区| 国产成人精品亚洲777人妖| 国产成人免费xxxxxxxx| 国产高清不卡二三区| 91影院在线免费观看| 欧美亚洲日本国产| 精品国产欧美一区二区| 精品美女在线播放| **性色生活片久久毛片| 夜夜嗨av一区二区三区四季av| 亚洲一级二级三级| 麻豆免费看一区二区三区| 狠狠色丁香久久婷婷综| 国产一区二区主播在线| 日本精品视频一区二区三区| 欧美日韩视频一区二区| 久久久久88色偷偷免费| 亚洲色图色小说| 国产精品一级黄| 51精品久久久久久久蜜臀| 国产清纯在线一区二区www| 亚洲最色的网站| 成人sese在线|