⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractworkitemcoder.java.old

📁 一个工作流设计及定义的系统,可以直接与数据库结合进行系统工作流程的定义及应用.
💻 OLD
字号:
/* * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: *  * 1. Redistributions of source code must retain copyright *    statements and notices.  Redistributions must also contain a *    copy of this document. *  * 2. 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. *  * 3. The name "OpenWFE" must not be used to endorse or promote *    products derived from this Software without prior written *    permission of The OpenWFE Group.  For written permission, *    please contact openwfe@openwfe.org. *  * 4. Products derived from this Software may not be called "OpenWFE" *    nor may "OpenWFE" appear in their names without prior written *    permission of The OpenWFE Group. OpenWFE is a registered *    trademark of The OpenWFE Group. *  * 5. Due credit should be given to the OpenWFE Project *    (http://www.openwfe.org/). *  * THIS SOFTWARE IS PROVIDED BY THE OPENWFE GROUP AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED 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 OPENWFE GROUP OR ITS 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. *  * Copyright 2002 (C) The OpenWFE Group. All Rights Reserved. *  * $Id: AbstractWorkItemCoder.java,v 1.1 2004/06/10 21:41:59 jmettraux Exp $ *///// AbstractWorkItemCoder.java//// jmettraux@hellscape.ch//// generated with // jtmpl 1.0.04 31.10.2002 John Mettraux (jmettraux@openwfe.org)//package openwfe.org.impl.workitem;import openwfe.org.time.Time;import openwfe.org.listen.reply.ListenerReplyCoder;import openwfe.org.workitem.WorkItem;import openwfe.org.workitem.CancelItem;import openwfe.org.workitem.LaunchItem;import openwfe.org.workitem.InFlowWorkItem;import openwfe.org.workitem.WorkItemCoder;import openwfe.org.workitem.CodingException;import openwfe.org.workitem.HistoryItem;import openwfe.org.workitem.Attribute;import openwfe.org.workitem.AttributeCoder;import openwfe.org.workitem.StringMapAttribute;import openwfe.org.expressions.FlowExpressionId;import openwfe.org.participants.Filter;import openwfe.org.participants.FilterEntry;/** * half an implementation of a coder * * <p><font size=2>CVS Info : * <br>$Author: jmettraux $ * <br>$Date: 2004/06/10 21:41:59 $ * <br>$Id: AbstractWorkItemCoder.java,v 1.1 2004/06/10 21:41:59 jmettraux Exp $ </font> * * @author jmettraux@hellscape.ch */public abstract class AbstractWorkItemCoder    implements WorkItemCoder{    /*    private final static org.apache.log4j.Logger log = org.apache.log4j.Logger	.getLogger(AbstractWorkItemCoder.class.getName());    */    //    // CONSTANTS & co    //    // FIELDS    protected java.util.Map perClassMap = null;    protected java.util.Map perRepresentationMap = null;    protected ListenerReplyCoder replyCoder = null;    //    // CONSTRUCTORS    public void init	(java.util.List attributeCoders, ListenerReplyCoder replyCoder)    {	perClassMap = new java.util.HashMap(attributeCoders.size());	perRepresentationMap = new java.util.HashMap(attributeCoders.size());	java.util.Iterator it = attributeCoders.iterator();	while (it.hasNext())	{	    AttributeCoder coder = (AttributeCoder)it.next();	    perClassMap.put(coder.getAttributeClassName(), coder);	    perRepresentationMap.put(coder.getRepresentationName(), coder);	}	this.replyCoder = replyCoder;    }    //    // METHODS    public ListenerReplyCoder getReplyCoder ()    {	return this.replyCoder;    }    public AttributeCoder getAttributeCoder (Attribute a)	throws CodingException    {	AttributeCoder result = (AttributeCoder)this.perClassMap	    .get(a.getClass().getName());	if (result == null)	{	    throw new CodingException		("No coder found for attribute of class '"+		 a.getClass().getName()+"'");	}	return result;    }    public AttributeCoder getAttributeCoder (String representation)	throws CodingException    {	AttributeCoder result = (AttributeCoder)this.perRepresentationMap	    .get(representation);	if (result == null)	{	    throw new CodingException		("No coder found for attribute represented as '"+		 representation+"'");	}	return result;    }    //    // STATIC METHODS}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -