Examples of KongaSaxParserException


Examples of org.jitterbit.xml.sax.KongaSaxParserException

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

Examples of org.jitterbit.xml.sax.KongaSaxParserException

            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

Examples of org.jitterbit.xml.sax.KongaSaxParserException

        }

        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

Examples of org.jitterbit.xml.sax.KongaSaxParserException

        }

        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

Examples of org.jitterbit.xml.sax.KongaSaxParserException

    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

Examples of org.jitterbit.xml.sax.KongaSaxParserException

    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        super.startElement(uri, localName, qName, attributes);
        if (XmlConstants.Elements.ROOT_FOLDER.equals(localName)) {
            String type = attributes.getValue(XmlConstants.Attributes.TYPE);
            if (type == null || type.length() == 0) {
                throw new KongaSaxParserException("Invalid integration project XML: missing entity type attribute."); //$NON-NLS-1$
            }
            try {
                EntityType rootType;
                // Backwards compatibility for change made in 1.5.0 when EntityType.InterchangeProject was
                // renamed to EntityType.Project:
                if (type.equals("InterchangeProject")) {
                    rootType = EntityType.Project;
                } else if (type.equals("User") || type.equals("Group")) {
                    // Backwards compatibility for change made in 2.0.0.18 when EntityType.User
                    // and Group were removed
                    return;
                } else {
                    rootType = EntityType.valueOf(type);
                }
                trackBeginEntityType(rootType);
                rootFolderHandler = new RootFolderHandler(loader, project, rootDirectory, rootType);
            } catch (IllegalArgumentException e) {
                String msg = "Invalid integration project XML: unknown entity type: " + type
                                + ". This may happen if you open a project that was created in a later version of the "
                                + ProductNames.CLIENT + " than the one you are currently using.";
                throw new KongaSaxParserException(msg); //$NON-NLS-1$
            }
        } else if (rootFolderHandler != null) {
            rootFolderHandler.getStartElementHandler().handleStart(this);
        }
    }
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.