public String deleteSelectedRepoSubscriptions() {
    Subject subject = EnterpriseFacesContextUtility.getSubject();
    String[] selected = getSelectedRepoSubscriptions();
    int repoId = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
    int[] resourceIds = getIntegerArray(selected);

    if ((resourceIds != null) && (resourceIds.length > 0)) {
      try {
        RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();

        // TODO: we should have a SLSB method that takes a list of resources
        for (int resourceId : resourceIds) {
          manager.unsubscribeResourceFromRepos(subject, resourceId, new int[] {repoId});
        }

        FacesContextUtility.addMessage(
            FacesMessage.SEVERITY_INFO,
            "Unsubscribed [" + resourceIds.length + "] resources from repository");
      } catch (Exception e) {
        FacesContextUtility.addMessage(
            FacesMessage.SEVERITY_ERROR,
            "Failed to unsubscribe one or more resources from repository",
            e);
      }
    }

    return "success";
  }