private FileData createFileData(String name, ArtefactAPI project) throws PropertyException { FileData fileData = new FileData(); fileData.setName(name); // It's impossible to calculate zip size if project contains artefacts if (((FolderAPI) project).getArtefacts().size() == 0) { fileData.setSize(0); } fileData.setDeleted(project.hasProperty(ArtefactProperties.PROP_PRJ_MARKED_4_DELETION)); if (project.hasProperty(ArtefactProperties.VERSION_COMMENT)) { Property property = project.getProperty(ArtefactProperties.VERSION_COMMENT); fileData.setComment(property.getString()); } ProjectVersion version = project.getVersion(); fileData.setAuthor(version.getVersionInfo().getCreatedBy()); fileData.setModifiedAt(version.getVersionInfo().getCreatedAt()); fileData.setVersion(String.valueOf(version.getRevision())); return fileData; }
private FileData createFileData(String name, ArtefactAPI project) throws PropertyException { FileData fileData = new FileData(); fileData.setName(name); // It's impossible to calculate zip size if project contains artefacts if (((FolderAPI) project).getArtefacts().size() == 0) { fileData.setSize(0); } fileData.setDeleted(project.hasProperty(ArtefactProperties.PROP_PRJ_MARKED_4_DELETION)); if (project.hasProperty(ArtefactProperties.VERSION_COMMENT)) { Property property = project.getProperty(ArtefactProperties.VERSION_COMMENT); fileData.setComment(property.getString()); } ProjectVersion version = project.getVersion(); fileData.setAuthor(version.getVersionInfo().getCreatedBy()); fileData.setModifiedAt(version.getVersionInfo().getCreatedAt()); fileData.setVersion(String.valueOf(version.getRevision())); return fileData; }