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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? droflosession.java

?? 日常的辦公系統(tǒng) 應(yīng)用工作流框架等增加員工的基本信息、培訓(xùn)信息、獎罰信息、薪資信息
?? JAVA
字號:
/* * Copyright (c) 2005, John Mettraux, OpenWFE.org * All rights reserved. *  * Redistribution and use in source and binary forms, with or without  * modification, are permitted provided that the following conditions are met: *  * . Redistributions of source code must retain the above copyright notice, this *   list of conditions and the following disclaimer.   *  * . Redistributions in binary form must reproduce the above copyright notice,  *   this list of conditions and the following disclaimer in the documentation  *   and/or other materials provided with the distribution. *  * . Neither the name of the "OpenWFE" nor the names of its contributors may be *   used to endorse or promote products derived from this software without *   specific prior written permission. *  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE  * POSSIBILITY OF SUCH DAMAGE. * * $Id: DrofloSession.java,v 1.64 2005/05/17 16:40:20 jmettraux Exp $ *///// DrofloSession.java//// jmettraux@openwfe.org//// generated with // jtmpl 1.1.00 16.08.2003 John Mettraux (jmettraux@openwfe.org)//package openwfe.org.droflo;import java.io.PrintWriter;import javax.servlet.ServletContext;import javax.servlet.http.HttpSession;import javax.servlet.http.HttpServletRequest;import openwfe.org.StackMap;import openwfe.org.ApplicationContext;import openwfe.org.engine.Definitions;import openwfe.org.engine.launch.Launcher;import openwfe.org.engine.workitem.HistoryItem;import openwfe.org.engine.workitem.InFlowWorkItem;import openwfe.org.engine.expressions.BuildException;import openwfe.org.engine.expressions.FlowExpression;import openwfe.org.engine.expressions.DefineExpression;import openwfe.org.engine.expressions.FlowExpressionId;import openwfe.org.engine.expressions.ProcessDefinition;import openwfe.org.engine.expressions.CompositeFlowExpression;import openwfe.org.engine.expressions.map.ExpressionMap;import openwfe.org.engine.expressions.sync.SyncExpression;/** * A kind of flow definition... * * <p><font size=2>CVS Info : * <br>$Author: jmettraux $ * <br>$Id: DrofloSession.java,v 1.64 2005/05/17 16:40:20 jmettraux Exp $ </font> * * @author jmettraux@openwfe.org */public class DrofloSession{    private final static org.apache.log4j.Logger log = org.apache.log4j.Logger        .getLogger(DrofloSession.class.getName());    //    // CONSTANTS & co    public final static String DROFLO_SESSION         = "drofloSession";    public final static String IN_EDIT_MODE        = "droflo.inEditMode";    public final static String APPLICATION_CONFIGURATION        = "applicationConfiguration";    private final static int UNDO_LEVELS = 10;    //    // FIELDS    private ApplicationContext applicationContext = null;    private ProcessDefinition flowDefinition = null;    private String webappUrl = null;    private Throwable exception = null;    private boolean inEditMode = false;    private boolean helpVisible = true;    private FlowExpression expressionToEdit = null;    private java.util.List undoStack =         new java.util.ArrayList(UNDO_LEVELS);    private InFlowWorkItem workitem = null;    //    // CONSTRUCTORS    public DrofloSession         (final String webappUrl,         final ApplicationContext applicationContext,          final boolean inEditMode)    {        this.webappUrl = webappUrl;        this.applicationContext = applicationContext;        this.inEditMode = inEditMode;        log.debug("DrofloSession() this.inEditMode = "+this.inEditMode);    }    //    // METHODS    public String getWebappUrl ()    {        return this.webappUrl;    }    public InFlowWorkItem getWorkItem ()    {        return this.workitem;    }    public boolean isInEditMode ()     {         return             //this.inEditMode && (this.expressionToEdit == null);             this.inEditMode;    }    public void setInEditMode (final boolean b)    {        this.inEditMode = b;    }    public boolean isHelpVisible ()    {        return this.helpVisible;    }    public void toggleHelp ()    {        this.helpVisible = !this.helpVisible;    }    public Launcher getLauncher ()    {        return openwfe.org.engine.Definitions            .getLauncher(getApplicationContext());    }    /**     * loads a worfklow in the session     */    public void loadWorkflow (final String flowDefinitionUrl)        throws BuildException    {        this.flowDefinition = getLauncher()            .loadProcessDefinition(flowDefinitionUrl);    }    /**     * removes an expression from the current flow definition     */    public void removeExpression (final String expId)    {        final FlowExpressionId id = this.flowDefinition            .getFlowExpressionId(expId);        this.flowDefinition.removeChild(id);    }    private FlowExpressionId buildExpressionId (String expId, String expName)    {        if (expId == null || expName == null) return null;        FlowExpressionId model = this.flowDefinition.getId();        FlowExpressionId result = (FlowExpressionId)model.clone();        result.setExpressionId(expId);        result.setExpressionName(expName);        return result;    }    public void addExpression        (final String expressionName,          final String expId)     throws        BuildException    {        log.debug("addExpression() expressionName is >"+expressionName+"<");        log.debug("addExpression() expId is >"+expId+"<");        final FlowExpression exp =             this.flowDefinition.getExpression(expId);        FlowExpressionId id = null;        if (exp != null) id = exp.getId();        this.flowDefinition.add(expressionName, id);    }    public void moveExpression (final String action, final String expId)    {        log.debug            ("moveExpression() action is >"+action+"<  expId is >"+expId+"<");        final FlowExpression fe = this.flowDefinition.getExpression(expId);        final CompositeFlowExpression cfe =             (CompositeFlowExpression)this.flowDefinition.get(fe.getParent());        // should directly work as the 'moveX' button is only presented        // in a sequence or something like this                if (action.equals("moveup"))        {            cfe.moveUpChild(fe.getId());        }        else        {            cfe.moveDownChild(fe.getId());        }    }    public void newFlowDefinition ()    {        try        {            this.flowDefinition = new ProcessDefinition                (getApplicationContext(),                 "http://localhost:7079/__new_flow__1.0.xml",                 "__new_flow",                 "1.0");        }        catch (final BuildException be)        {            log.warn("Failed to build new flow definition !", be);        }    }    public ProcessDefinition getFlowDefinition ()    {        return this.flowDefinition;    }    public void setException (Throwable t)    {        this.exception = t;    }    public void clearException ()    {        this.exception = null;    }    public ApplicationContext getApplicationContext ()    {        return this.applicationContext;    }    /*     *     * RENDER FLOW     *     */    public void renderFlow         (final PrintWriter out,         final HttpServletRequest req)    throws         RenderingException    {        try        {            final long drofloLinkCounter =                 Long.parseLong(req.getParameter("dlc"));            this.workitem = (InFlowWorkItem)ApplicationContext                .lookupSharedContext().lookup("workitem"+drofloLinkCounter);        }        catch (NumberFormatException nfe)        {            this.workitem = null;        }        log.debug            ("renderFlow() this.workitem == null : "+(this.workitem == null));        DrofloHelper.getInstance(req).renderFlow(this, out, req);    }    public void updateExpression (final HttpServletRequest req)        throws RenderingException    {        DrofloHelper.getInstance(req).parseRequest(this, req);    }    public void loadExpressionToEdit (final String expId)    {        this.expressionToEdit = this.flowDefinition.getExpression(expId);    }    public void unloadExpressionToEdit ()    {        this.expressionToEdit = null;    }    public FlowExpression getExpressionToEdit ()    {        return this.expressionToEdit;    }    public String getExpressionToEditName ()    {        return getExpressionName(this.expressionToEdit);    }    /* *     * returns just the subProcess     * /    protected String getSubProcessDefinitionName (String fullPath)    {        String[] ss = fullPath.split("/");        if (ss.length <= 1) return fullPath;        return ss[ss.length-1];    }     */    public void outputDefinitionAsXml (final PrintWriter out)        throws java.io.IOException    {        out.println(this.flowDefinition.outputAsXmlString());    }    /**     * Returns the expressionMap OpenWFE service that this session uses     */    public ExpressionMap getExpressionMap ()    {        return Definitions.getExpressionMap(this.applicationContext);    }    /**     * Given a expression, returns the corresponding short name     * (found in the XML process definition as a tag)     */    public String getExpressionName (Object expression)    {        if (expression == null) return "--null-expression--";        return getExpressionMap().getName(expression.getClass());    }    //    // undo methods    public boolean canUndo ()    {        return this.undoStack.size() > 0;    }    public void stackForUndo ()    {        if (this.flowDefinition == null) return;        try        {            this.undoStack.add(0, this.flowDefinition.outputAsXmlString());            while (this.undoStack.size() > UNDO_LEVELS)                this.undoStack.remove(UNDO_LEVELS);        }        catch (Exception e)        {            log.warn                ("stackForUndo() stacking failed", e);        }    }    public void popForUndo ()    {        try        {            final String sFlowDefinition = (String)this.undoStack.get(0);            /*            this.flowDefinition = getFlowBuilder().parseWorkflow                ((String)this.flowDefinition.getAttributes().get("name"),                  sFlowDefinition);            */            this.flowDefinition = getLauncher()                .loadProcessDefinitionFromString(sFlowDefinition);        }        catch (Exception e)        {            log.warn                ("popForUndo() popping failed", e);        }        this.undoStack.remove(0);    }    //    // STATIC METHODS    public static DrofloSession getSession (final HttpServletRequest req)    {        HttpSession httpSession = req.getSession(true);        return (DrofloSession)httpSession.getAttribute(DROFLO_SESSION);    }    public static boolean inEditMode (final HttpServletRequest req)    {        Object o = req.getAttribute(IN_EDIT_MODE);        if (o == null || ! (o instanceof Boolean)) return false;        return ((Boolean)o).booleanValue();    }    private static String isolateUrl (final HttpServletRequest req)    {        final StringBuffer rawUrl = req.getRequestURL();        log.debug("isolateUrl() for >"+rawUrl+"<");        int i = rawUrl.indexOf("/servlet");        if (i < 0) i = rawUrl.lastIndexOf("/");        final String result = rawUrl.substring(0, i) + "/";        log.debug("isolateUrl() result is >"+result+"<");        return result;    }    public static DrofloSession getOrCreateSession         (final HttpServletRequest req)    {        HttpSession httpSession = req.getSession(true);        DrofloSession result = (DrofloSession)httpSession            .getAttribute(req.getContextPath()+DrofloSession.DROFLO_SESSION);        final String sEdit = req.getParameter("edit");        //log.debug("getOrCreateSession() sEdit is >"+sEdit+"<");        if (result != null)        {            //result.setInEditMode("true".equals(sEdit));            if ("true".equals(sEdit)) result.setInEditMode(true);            return result;        }        //        // build ApplicationContext                ApplicationContext applicationContext = null;        try        {            ServletContext servletContext = httpSession.getServletContext();            String configFileName = servletContext                .getInitParameter(APPLICATION_CONFIGURATION);            configFileName = servletContext.getRealPath(configFileName);            log.debug("getOrCreateSession() configFileName : "+configFileName);            openwfe.org.app.XmlApplicationContextBuilder builder =                 (openwfe.org.app.XmlApplicationContextBuilder)                    openwfe.org.app.XmlApplicationContextBuilder.class                        .newInstance();            applicationContext = builder.build(configFileName);        }        catch (final Throwable t)        {            log.warn                ("Problem with parameter '"+APPLICATION_CONFIGURATION+"'", t);            throw new IllegalArgumentException                ("Parameter '"+APPLICATION_CONFIGURATION+                 "' is missing in WEB-INF/web.xml "+                 "or this configuration file is corrupt.");        }        //        // build DrofloSession        result = new DrofloSession            (isolateUrl(req),              applicationContext,              "true".equalsIgnoreCase(sEdit));        httpSession.setAttribute            (req.getContextPath()+DrofloSession.DROFLO_SESSION, result);        return result;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1区2区3区在线观看| 一二三四区精品视频| 免费成人你懂的| 欧美zozozo| 粉嫩aⅴ一区二区三区四区| 国产精品丝袜在线| 91一区二区在线| 亚洲电影一区二区三区| 欧美一区二区三区日韩视频| 国产麻豆精品视频| 中文字幕一区二区三区在线播放 | 成人欧美一区二区三区白人| av高清久久久| 性感美女极品91精品| 日韩欧美色电影| 国产成人精品在线看| 亚洲三级视频在线观看| 欧美日韩国产一区| 国产伦精品一区二区三区免费迷| 日本一二三不卡| 色噜噜夜夜夜综合网| 蜜臀av性久久久久蜜臀av麻豆 | 欧美丰满少妇xxxbbb| 国产最新精品免费| 亚洲精品videosex极品| 日韩女优av电影在线观看| 成人激情免费网站| 丝袜美腿亚洲色图| 亚洲国产精品一区二区久久 | 99久久99久久综合| 强制捆绑调教一区二区| 欧美韩国日本不卡| 欧美一区二区高清| 色综合久久久久| 久久精品国产网站| 亚洲一区在线电影| 欧美国产在线观看| 制服.丝袜.亚洲.中文.综合| 99综合影院在线| 美女国产一区二区三区| 亚洲欧洲制服丝袜| 久久久av毛片精品| 欧美精品丝袜中出| 不卡一区二区在线| 国产资源在线一区| 亚洲mv在线观看| 综合精品久久久| 久久久亚洲精品石原莉奈| 欧美日韩精品一区二区三区四区 | 国产精品蜜臀在线观看| 91精品免费在线| 91黄色免费版| 99视频有精品| 成人av免费网站| 国产精品自拍av| 久久精品二区亚洲w码| 亚洲自拍偷拍综合| 最新不卡av在线| 国产欧美日韩精品一区| www国产成人| 精品国产一区久久| 欧美一区二区三区小说| 欧美日韩国产综合一区二区| 欧美在线观看视频一区二区| www.久久久久久久久| 成人免费看视频| 国产成都精品91一区二区三 | 高清av一区二区| 紧缚捆绑精品一区二区| 蜜臀av性久久久久av蜜臀妖精| 亚洲一区二区三区精品在线| 亚洲综合色丁香婷婷六月图片| 亚洲精品乱码久久久久| 国产精品国产成人国产三级| 国产精品色婷婷| 国产欧美视频一区二区| 欧美国产一区二区在线观看| 国产亚洲精品中文字幕| 欧美激情在线一区二区三区| 国产精品午夜春色av| 国产精品二三区| 亚洲天天做日日做天天谢日日欢 | 国产一区二区三区最好精华液| 久久成人综合网| 韩国av一区二区三区四区 | 亚洲午夜久久久久久久久电影网 | 中文字幕国产一区| 亚洲国产成人在线| 中文字幕亚洲区| 亚洲一区二区三区三| 五月天久久比比资源色| 日本中文在线一区| 国产伦理精品不卡| a4yy欧美一区二区三区| 91成人免费在线视频| 69堂成人精品免费视频| 精品国产乱子伦一区| 国产视频一区二区在线观看| 国产精品久久久久久久久果冻传媒| 最新热久久免费视频| 亚洲一区二区黄色| 精品伊人久久久久7777人| 国产高清视频一区| 色综合天天视频在线观看| 欧美军同video69gay| 久久综合色之久久综合| 国产精品久久久久aaaa| 天天综合色天天综合色h| 国模套图日韩精品一区二区 | 欧美日韩中字一区| 精品久久99ma| 亚洲免费观看高清完整| 麻豆精品在线观看| 91网址在线看| 日韩一本二本av| 中文文精品字幕一区二区| 偷拍日韩校园综合在线| 国产一区二区久久| 在线观看视频一区| 国产欧美日韩视频在线观看| 亚洲一线二线三线久久久| 国产一区久久久| 欧美日韩日日摸| 欧美高清在线一区二区| 日本人妖一区二区| 色老汉av一区二区三区| 久久久www成人免费无遮挡大片| 亚洲一区二区高清| 国产98色在线|日韩| 欧美精品1区2区| 欧美国产欧美综合| 蜜桃视频第一区免费观看| 日本久久一区二区三区| 久久午夜老司机| 天天亚洲美女在线视频| 91网站视频在线观看| 久久久久久日产精品| 日本亚洲天堂网| 日本乱人伦一区| 中文字幕日本乱码精品影院| 黄色小说综合网站| 欧美日韩国产123区| 亚洲人一二三区| 国产一区欧美日韩| 日韩一级片在线观看| 亚洲影视在线观看| 91网站在线观看视频| 欧美激情综合网| 国产在线看一区| 日韩美女主播在线视频一区二区三区 | 国产精品99久久久| 精品99一区二区| 日本午夜一本久久久综合| 欧美在线不卡视频| 亚洲精品亚洲人成人网| 99久久精品久久久久久清纯| 国产日韩欧美综合一区| 国产制服丝袜一区| 精品国产免费人成在线观看| 日韩激情一二三区| 欧美午夜理伦三级在线观看| 亚洲日本va午夜在线影院| eeuss鲁片一区二区三区在线看| 国产精品无人区| 波多野结衣中文字幕一区| 国产精品久久久爽爽爽麻豆色哟哟 | 91麻豆精品国产91久久久久久 | 国产精品国模大尺度视频| 国产成人在线网站| 日本一区二区三区四区| 成人黄色国产精品网站大全在线免费观看 | 久久久九九九九| 国产精品影视在线观看| 国产婷婷一区二区| 豆国产96在线|亚洲| 中文字幕日韩精品一区| 色综合久久久网| 亚洲国产精品天堂| 日韩亚洲欧美高清| 国产一区二区美女| 国产精品毛片久久久久久久| 91网站最新地址| 亚洲狠狠爱一区二区三区| 欧美日产在线观看| 精品一区二区三区久久| 欧美极品xxx| 色素色在线综合| 奇米777欧美一区二区| 久久综合色综合88| 99久久伊人久久99| 亚洲成人你懂的| 日韩免费在线观看| 不卡一二三区首页| 亚洲成人综合视频| 26uuuu精品一区二区| 99久久婷婷国产综合精品| 亚洲a一区二区| 亚洲精品一区二区三区影院| 懂色av一区二区三区免费观看| 亚洲女人小视频在线观看|