Package org.jitterbit.xml.sax

Examples of org.jitterbit.xml.sax.KongaSaxParserException


                path = parser.getCurrentElementValue();
            } else if (MappingsXmlConstants.NAME.equals(name)) {
                userDefinedName = parser.getCurrentElementValue();
            } else if (MappingsXmlConstants.MULTIPLE_FOLDER.equals(name)) {
                if (path == null) {
                    throw new KongaSaxParserException("Invalid XML: Multiple folder entry is missing the "
                                    + MappingsXmlConstants.PATH + " element");
                }
                folders.put(path, userDefinedName);
                path = null;
                userDefinedName = null;
View Full Code Here


                Attributes attrs = parser.getCurrentAttributes();
                String v = attrs.getValue(PluginXmlConstants.SPEC_VERSION);
                try {
                    callback.handle(VersionFactory.fromString(v));
                } catch (IllegalVersionException ex) {
                    throw new KongaSaxParserException("Invalid version string: " + v, ex); //$NON-NLS-1$
                } catch (NullPointerException ex) {
                    throw new KongaSaxParserException("Missing version string."); //$NON-NLS-1$
                }
            }
        }
View Full Code Here

        private void parseEntityType(KongaSaxParser parser) throws KongaSaxParserException {
            try {
                String type = parser.getCurrentElementValue();
                subjectType = EntityType.valueOf(type);
            } catch (RuntimeException ex) {
                throw new KongaSaxParserException("Invalid entity type in pipeline position: " +
                        parser.getCurrentElementValue());
            }
        }
View Full Code Here

        }
       
        private void parsingComplete() throws KongaSaxParserException {
            PluginIdentifier pluginId = parser.getCurrentPlugin();
            if (pluginId == null) {
                throw new KongaSaxParserException("Invalid plugin XML: Plugin ID null when parsing position.");
            }
            if (relative == null) {
                checkDefaultValueOfRelative();
            }
            callback.handle(new PipelinePosition(parser.getCurrentPlugin(), subjectType, relative, execOrder, optional));
View Full Code Here

        private void checkDefaultValueOfRelative() throws KongaSaxParserException {
            if (subjectType == EntityType.Script) {
                relative = RelativePosition.INSIDE;
            } else {
                throw new KongaSaxParserException("Missing Relative attribute.");
            }
        }
View Full Code Here

                return null;
            }
            try {
                return RelativePosition.fromString(relative);
            } catch (IllegalArgumentException ex) {
                throw new KongaSaxParserException("Invalid relative position: " + relative);
            }
        }
View Full Code Here

            return VersionFactory.newVersion(1, 0, 0, 0);
        }
        try {
            return VersionFactory.fromString(value);
        } catch (IllegalVersionException ex) {
            throw new KongaSaxParserException("Invalid XML: Illegal value of the \"Since\" attribute.", ex);
        }
    }
View Full Code Here

        }

        private String getCategoryName(KongaSaxParser parser) throws KongaSaxParserException {
            String name = getNameAttribute(parser);
            if ((name == null) || (name.length() == 0)) {
                throw new KongaSaxParserException("Invalid XML: Missing name-attribute in a Category node.");
            }
            return name;
        }
View Full Code Here

        }

        private String getFunctionName(KongaSaxParser parser) throws KongaSaxParserException {
            String name = getNameAttribute(parser);
            if ((name == null) || (name.length() == 0)) {
                throw new KongaSaxParserException("Invalid XML: Missing name-attribute in a Function node.");
            }
            return name;
        }
View Full Code Here

    private void handleDeletedItem(KongaSaxParser parser, String nodeName) throws KongaSaxParserException {
        EntityType type = null;
        try {
            type = EntityType.valueOf(nodeName);
        } catch (IllegalArgumentException e) {
            throw new KongaSaxParserException("Invalid EntityType: " + nodeName); //$NON-NLS-1$
        }
        try {
            String idStringRep = parser.getCurrentAttributes().getValue(XmlConstants.Attributes.ID);
            marker.markAsDeleted(type, type.getIntegrationId(idStringRep));
            loader.logDetail("Marked as deleted: " + type + " [" + idStringRep + "]");
        } catch (IllegalArgumentException e) {
            throw new KongaSaxParserException("Invalid ID: " //$NON-NLS-1$
                            + parser.getCurrentAttributes().getValue(XmlConstants.Attributes.ID));
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.xml.sax.KongaSaxParserException

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.