Skip to content

Commit

Permalink
remove software repository feature
Browse files Browse the repository at this point in the history
  • Loading branch information
lrollus committed Jul 14, 2021
1 parent fb0d552 commit 2170fea
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ class CommunicationThread implements Runnable {
// Refresh all after add
repositoryManagerThread.refreshAll()

break
case "removeSoftwareUserRepository":
log.info("[Communication] Remove a software user repository")
log.info("============================================")
log.info("username : ${mapMessage["username"]}")
log.info("dockerUsername : ${mapMessage["dockerUsername"]}")
log.info("prefix : ${mapMessage["prefix"]}")
log.info("============================================")
boolean success = repositoryManagerThread.repositoryManagers.remove(new SoftwareManager(mapMessage["username"], mapMessage["dockerUsername"], mapMessage["prefix"], mapMessage["id"], Main.buildConnectOpts(null)))
log.info("SoftwareManager removed : ${success}")
break
case "refreshSoftwareUserRepositoryList":
log.info("[Communication] Re-fetch software user repositories, it has changed")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ class SoftwareManager {
name = "SoftwareManager ${gitHubUsername}/${dockerUsername}"
}

boolean equals(o) {
if (this.is(o)) return true
if (getClass() != o.class) return false

SoftwareManager that = (SoftwareManager) o

if (name != that.name) return false

return true
}

int hashCode() {
return (name != null ? name.hashCode() : 0)
}

String toString() {
return "$name ${prefixes.keySet()}"
}
Expand Down

0 comments on commit 2170fea

Please sign in to comment.