Package org.jbpm.formapi.shared.api

Examples of org.jbpm.formapi.shared.api.Mappable


            builder.append("null");
        } else {
            builder.append("[");
            Iterator<? extends Mappable> iter = list.iterator();
            while(iter.hasNext()) {
                Mappable mappable = iter.next();
                builder.append(toJson(mappable));
                if (iter.hasNext()) {
                    builder.append(", \n");
                }
            }
View Full Code Here


        String className = (String) objClassName;
        try {
            Class<?> klass = Class.forName(className);
            Object newInstance = klass.newInstance();
            if (newInstance instanceof Mappable) {
                Mappable mappable = (Mappable) newInstance;
                mappable.setDataMap(map);
            }
            return newInstance;
        } catch (Exception e) {
            return null;
        }
View Full Code Here

        }
        Object obj = null;
        try {
            obj = Class.forName(className).newInstance();
            if (obj instanceof Mappable) {
                Mappable item = (Mappable) obj;
                item.setDataMap(data);
            } else {
                throw new FormEncodingException("Type "
                        + obj.getClass().getName()
                        + " cannot be casted to FormItemRepresentation");
            }
View Full Code Here

        String className = (String) data.get("@className");
        Object obj = null;
        try {
            obj = ReflectionHelper.newInstance(className);
            if (obj instanceof Mappable) {
                Mappable item = (Mappable) obj;
                item.setDataMap(data);
            } else {
                throw new FormEncodingException("Cannot cast class "
                        + obj.getClass().getName() + " to Mappable");
            }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.jbpm.formapi.shared.api.Mappable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.