|
From: Leandro R. S. C. <bas...@us...> - 2004-03-22 21:34:24
|
Update of /cvsroot/xingu/xingu/exintake/src/java/br/com/ibnetwork/xingu/exintake/model/presentation/factory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31708/exintake/src/java/br/com/ibnetwork/xingu/exintake/model/presentation/factory Added Files: PresentationFactory.java Log Message: adding Extensible input taker --- NEW FILE: PresentationFactory.java --- /* * Created on Dec 22, 2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package br.com.ibnetwork.xingu.exintake.model.presentation.factory; import org.xml.sax.Attributes; import br.com.ibnetwork.xingu.exintake.model.presentation.Presentation; import br.com.ibnetwork.xingu.exintake.model.presentation.impl.PresentationDefaultImpl; import br.com.ibnetwork.xingu.factory.ObjectFactoryException; import br.com.ibnetwork.xingu.factory.impl.FactoryDefaultImpl; /** * @author neto * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class PresentationFactory extends FactoryDefaultImpl { /* (non-Javadoc) * @see br.com.ibnetwork.xingu.factory.Factory#getInstance(java.lang.String, java.lang.Object[], java.lang.String[]) */ public Object getInstance( String className, Object[] params, String[] signature) throws ObjectFactoryException { if(!Presentation.class.getName().equals(className)) { throw new ObjectFactoryException("I can´t create U"); } Attributes attrs = (Attributes) params[0]; PresentationDefaultImpl presentation = new PresentationDefaultImpl(); presentation.setDisplayName(attrs.getValue("displayName")); presentation.setSize(attrs.getValue("size")); presentation.setMaxLength(attrs.getValue("maxLength")); presentation.setInputType(attrs.getValue("inputType")); presentation.setCols(attrs.getValue("cols")); presentation.setRows(attrs.getValue("rows")); return presentation; } } |