Skip to content

Commit

Permalink
Remove unused ProjectQueryManager#updateProject method
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Nov 27, 2023
1 parent 609c4f8 commit b6952ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -508,40 +508,6 @@ public Project createProject(final Project project, List<Tag> tags, boolean comm
return result;
}

/**
* Updates an existing Project.
* @param uuid the uuid of the project to update
* @param name the name of the project
* @param description a description of the project
* @param version the project version
* @param tags a List of Tags - these will be resolved if necessary
* @param purl an optional Package URL
* @param active specified if the project is active
* @param commitIndex specifies if the search index should be committed (an expensive operation)
* @return the updated Project
*/
@Override
public Project updateProject(UUID uuid, String name, String description, String version, List<Tag> tags, PackageURL purl, boolean active, boolean commitIndex) {
final Project project = getObjectByUuid(Project.class, uuid);
project.setName(name);
project.setDescription(description);
project.setVersion(version);
project.setPurl(purl);

if (!active && Boolean.TRUE.equals(project.isActive()) && hasActiveChild(project)){
throw new IllegalArgumentException("Project cannot be set to inactive, if active children are present.");
}
project.setActive(active);

final List<Tag> resolvedTags = resolveTags(tags);
bind(project, resolvedTags);

final Project result = persist(project);
Event.dispatch(new IndexEvent(IndexEvent.Action.UPDATE, result));
commitSearchIndex(commitIndex, Project.class);
return result;
}

/**
* Updates an existing Project.
* @param transientProject the project to update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,6 @@ public Project createProject(final Project project, List<Tag> tags, boolean comm
return getProjectQueryManager().createProject(project, tags, commitIndex);
}

public Project updateProject(UUID uuid, String name, String description, String version, List<Tag> tags, PackageURL purl, boolean active, boolean commitIndex) {
return getProjectQueryManager().updateProject(uuid, name, description, version, tags, purl, active, commitIndex);
}

public Project updateProject(Project transientProject, boolean commitIndex) {
return getProjectQueryManager().updateProject(transientProject, commitIndex);
}
Expand Down

0 comments on commit b6952ca

Please sign in to comment.