Examples of Mappable


Examples of org.drools.process.core.context.variable.Mappable

                        final String localName,
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
        Mappable mappable = (Mappable) parser.getParent();
        final String type = attrs.getValue("type");
        emptyAttributeCheck(localName, "type", type, parser);
        final String fromName = attrs.getValue("from");
        emptyAttributeCheck(localName, "from", fromName, parser);
        final String toName = attrs.getValue("to");
        emptyAttributeCheck(localName, "to", toName, parser);
        if ("in".equals(type)) {
            mappable.addInMapping(toName, fromName);
        } else if ("out".equals(type)) {
            mappable.addOutMapping(fromName, toName);
        } else {
            throw new SAXParseException(
                "Unknown mapping type " + type, parser.getLocator());
        }
        return null;
View Full Code Here

Examples of org.drools.process.core.context.variable.Mappable

                        final String localName,
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
        Mappable mappable = (Mappable) parser.getParent();
        final String type = attrs.getValue("type");
        emptyAttributeCheck(localName, "type", type, parser);
        final String fromName = attrs.getValue("from");
        emptyAttributeCheck(localName, "from", fromName, parser);
        final String toName = attrs.getValue("to");
        emptyAttributeCheck(localName, "to", toName, parser);
        if ("in".equals(type)) {
            mappable.addInMapping(toName, fromName);
        } else if ("out".equals(type)) {
            mappable.addOutMapping(fromName, toName);
        } else {
            throw new SAXParseException(
                "Unknown mapping type " + type, parser.getLocator());
        }
        return null;
View Full Code Here

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

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

        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

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

        }
        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

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

        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

Examples of org.jbpm.process.core.context.variable.Mappable

                        final String localName,
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
        Mappable mappable = (Mappable) parser.getParent();
        final String type = attrs.getValue("type");
        emptyAttributeCheck(localName, "type", type, parser);
        final String fromName = attrs.getValue("from");
        emptyAttributeCheck(localName, "from", fromName, parser);
        final String toName = attrs.getValue("to");
        emptyAttributeCheck(localName, "to", toName, parser);
        if ("in".equals(type)) {
            mappable.addInMapping(toName, fromName);
        } else if ("out".equals(type)) {
            mappable.addOutMapping(fromName, toName);
        } else {
            throw new SAXParseException(
                "Unknown mapping type " + type, parser.getLocator());
        }
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.