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);
}
}