@Override public void generateProject(FolderEntry baseFolder, NewProject newProjectDescriptor) throws ForbiddenException, ConflictException, ServerException { Model model = Model.createModel(); model.setModelVersion("4.0.0"); model.setGroupId(newProjectDescriptor.getAttributes().get(ESBProjectConstants.GROUP_ID).get(0)); model.setArtifactId( newProjectDescriptor.getAttributes().get(ESBProjectConstants.ARTIFACT_ID).get(0)); model.setVersion(newProjectDescriptor.getAttributes().get(ESBProjectConstants.VERSION).get(0)); FileEntry pomFile = baseFolder.createFile("pom.xml", (byte[]) null, "text/xml"); model.writeTo(pomFile.getVirtualFile()); FolderEntry dbsFolder = baseFolder.createFolder("ESB Configs"); dbsFolder.createFile(baseFolder.getName() + ".esb", TAG.getBytes(), "text/xml+wso2-esb"); }
private void recTreeView(FolderEntry parent) throws ServerException { for (VirtualFileEntry virtualFileEntry : parent.getChildren()) { if (virtualFileEntry.isFile()) { setESBMimeTypeForConfigurationFiles(virtualFileEntry); } else { recTreeView((FolderEntry) virtualFileEntry); } } }