@Test public void testArtifactWithoutFacts() { Artifact artifact = new Artifact() .setProprietary(false); thrownException.expect(ExecutionException.class); thrownException.expectMessage("does not have enough facts to create a component name."); ArtifactToReleaseUtils.convertToReleaseWithoutAttachments(artifact); }
public static SW360Release convertToReleaseWithoutAttachments(Artifact artifact) { SW360Release release = new SW360Release(); String componentName = ArtifactToComponentUtils.createComponentName(artifact); ArtifactToReleaseUtils.setVersion(release, artifact); ArtifactToReleaseUtils.setCPEId(release, artifact); release.setName(componentName); ArtifactToReleaseUtils.setCoordinates(release, artifact); ArtifactToReleaseUtils.setOverriddenLicense(release, artifact); ArtifactToReleaseUtils.setDeclaredLicense(release, artifact); ArtifactToReleaseUtils.setObservedLicense(release, artifact); ArtifactToReleaseUtils.setSourceUrl(release, artifact); ArtifactToReleaseUtils.setReleaseTagUrl(release, artifact); ArtifactToReleaseUtils.setSwhId(release, artifact); ArtifactToReleaseUtils.setHashes(release, artifact); ArtifactToReleaseUtils.setClearingStatus(release, artifact); ArtifactToReleaseUtils.setChangeStatus(release, artifact); ArtifactToReleaseUtils.setCopyrights(release, artifact); ArtifactToReleaseUtils.setHomepageUrl(release, artifact); release.setProprietary(artifact.isProprietary()); return release; }
ArtifactToReleaseUtils { public static SW360Release convertToReleaseWithoutAttachments(Artifact artifact) { SW360Release release = new SW360Release(); String componentName = ArtifactToComponentUtils.createComponentName(artifact); ArtifactToReleaseUtils.setVersion(release, artifact); ArtifactToReleaseUtils.setCPEId(release, artifact); release.setName(componentName); ArtifactToReleaseUtils.setCoordinates(release, artifact); ArtifactToReleaseUtils.setOverriddenLicense(release, artifact); ArtifactToReleaseUtils.setDeclaredLicense(release, artifact); ArtifactToReleaseUtils.setObservedLicense(release, artifact); ArtifactToReleaseUtils.setSourceUrl(release, artifact); ArtifactToReleaseUtils.setReleaseTagUrl(release, artifact); ArtifactToReleaseUtils.setSwhId(release, artifact); ArtifactToReleaseUtils.setHashes(release, artifact); ArtifactToReleaseUtils.setClearingStatus(release, artifact); ArtifactToReleaseUtils.setChangeStatus(release, artifact); ArtifactToReleaseUtils.setCopyrights(release, artifact); ArtifactToReleaseUtils.setHomepageUrl(release, artifact); release.setProprietary(artifact.isProprietary()); return release; } }
ArtifactToReleaseUtils { public static SW360Release convertToReleaseWithoutAttachments(Artifact artifact) { SW360Release release = new SW360Release(); String componentName = ArtifactToComponentUtils.createComponentName(artifact); ArtifactToReleaseUtils.setVersion(release, artifact); ArtifactToReleaseUtils.setCPEId(release, artifact); release.setName(componentName); ArtifactToReleaseUtils.setCoordinates(release, artifact); ArtifactToReleaseUtils.setOverriddenLicense(release, artifact); ArtifactToReleaseUtils.setDeclaredLicense(release, artifact); ArtifactToReleaseUtils.setObservedLicense(release, artifact); ArtifactToReleaseUtils.setSourceUrl(release, artifact); ArtifactToReleaseUtils.setReleaseTagUrl(release, artifact); ArtifactToReleaseUtils.setSwhId(release, artifact); ArtifactToReleaseUtils.setHashes(release, artifact); ArtifactToReleaseUtils.setClearingStatus(release, artifact); ArtifactToReleaseUtils.setChangeStatus(release, artifact); ArtifactToReleaseUtils.setCopyrights(release, artifact); ArtifactToReleaseUtils.setHomepageUrl(release, artifact); release.setProprietary(artifact.isProprietary()); return release; } private  ArtifactToReleaseUtils(); }
ArtifactToReleaseUtils { public static SW360Release convertToReleaseWithoutAttachments(Artifact artifact) { SW360Release release = new SW360Release(); String componentName = ArtifactToComponentUtils.createComponentName(artifact); ArtifactToReleaseUtils.setVersion(release, artifact); ArtifactToReleaseUtils.setCPEId(release, artifact); release.setName(componentName); ArtifactToReleaseUtils.setCoordinates(release, artifact); ArtifactToReleaseUtils.setOverriddenLicense(release, artifact); ArtifactToReleaseUtils.setDeclaredLicense(release, artifact); ArtifactToReleaseUtils.setObservedLicense(release, artifact); ArtifactToReleaseUtils.setSourceUrl(release, artifact); ArtifactToReleaseUtils.setReleaseTagUrl(release, artifact); ArtifactToReleaseUtils.setSwhId(release, artifact); ArtifactToReleaseUtils.setHashes(release, artifact); ArtifactToReleaseUtils.setClearingStatus(release, artifact); ArtifactToReleaseUtils.setChangeStatus(release, artifact); ArtifactToReleaseUtils.setCopyrights(release, artifact); ArtifactToReleaseUtils.setHomepageUrl(release, artifact); release.setProprietary(artifact.isProprietary()); return release; } private  ArtifactToReleaseUtils(); static Artifact convertToArtifactWithoutSourceFile(SW360Release release, Artifact artifact); static SW360Release convertToReleaseWithoutAttachments(Artifact artifact); static String createSW360ReleaseVersion(Artifact artifact); static void setVersion(SW360Release release, Artifact artifact); }
ArtifactToReleaseUtils { public static SW360Release convertToReleaseWithoutAttachments(Artifact artifact) { SW360Release release = new SW360Release(); String componentName = ArtifactToComponentUtils.createComponentName(artifact); ArtifactToReleaseUtils.setVersion(release, artifact); ArtifactToReleaseUtils.setCPEId(release, artifact); release.setName(componentName); ArtifactToReleaseUtils.setCoordinates(release, artifact); ArtifactToReleaseUtils.setOverriddenLicense(release, artifact); ArtifactToReleaseUtils.setDeclaredLicense(release, artifact); ArtifactToReleaseUtils.setObservedLicense(release, artifact); ArtifactToReleaseUtils.setSourceUrl(release, artifact); ArtifactToReleaseUtils.setReleaseTagUrl(release, artifact); ArtifactToReleaseUtils.setSwhId(release, artifact); ArtifactToReleaseUtils.setHashes(release, artifact); ArtifactToReleaseUtils.setClearingStatus(release, artifact); ArtifactToReleaseUtils.setChangeStatus(release, artifact); ArtifactToReleaseUtils.setCopyrights(release, artifact); ArtifactToReleaseUtils.setHomepageUrl(release, artifact); release.setProprietary(artifact.isProprietary()); return release; } private  ArtifactToReleaseUtils(); static Artifact convertToArtifactWithoutSourceFile(SW360Release release, Artifact artifact); static SW360Release convertToReleaseWithoutAttachments(Artifact artifact); static String createSW360ReleaseVersion(Artifact artifact); static void setVersion(SW360Release release, Artifact artifact);  }