private static final String SWIMLANES_ELEMENT_NAME = "swimlanes";
@Override
public void readFromFile(IFolder folder, ProcessDefinition definition) throws Exception {
IFile file = folder.getFile(XML_FILE_NAME);
SwimlaneGUIConfiguration configuration = new SwimlaneGUIConfiguration();
if (file.exists()) {
Document document = XmlUtil.parseDocument(file.getContents());
NodeList elementsList = document.getDocumentElement().getElementsByTagName(SWIMLANE_ELEMENT_NAME);
for (int j = 0; j < elementsList.getLength(); j++) {
Element element = (Element) elementsList.item(j);
String swimlaneName = element.getAttribute(NAME_ATTRIBUTE_NAME);
String path = element.getAttribute(PATH_ATTRIBUTE_NAME);
configuration.putSwimlanePath(swimlaneName, path);
}
}
definition.setSwimlaneGUIConfiguration(configuration);
}