repoId = subscribedRepoId;
} else if (repoOption.equals(REPO_OPTION_UNSUBSCRIBED)) {
repoId = unsubscribedRepoId;
int iRepoId = Integer.parseInt(repoId);
RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
repoManager.subscribeResourceToRepos(subject, resourceId, new int[] { iRepoId });
// Change the subscribedRepoId so if we fall back to the page with a different error,
// the drop down for selecting an existing subscribed repo will be populated with this
// new repo
subscribedRepoId = repoId;
} else if (repoOption.equals(REPO_OPTION_NEW)) {
RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
Repo newRepo = new Repo(newRepoName);
newRepo.setCandidate(false);
newRepo = repoManager.createRepo(subject, newRepo);
repoId = Integer.toString(newRepo.getId());
repoManager.subscribeResourceToRepos(subject, resourceId, new int[] { newRepo.getId() });
// Change the subscribedRepoId so if we fall back to the page with a different error,
// the drop down for selecting an existing subscribed repo will be populated with this
// new repo
subscribedRepoId = repoId;