Beispiel #1
0
 public List<PackageDefinition> getPackages() {
   ArrayList<PackageDefinition> packages = new ArrayList<>();
   for (PackageRepository repository : this.getCurrentConfig().getPackageRepositories()) {
     packages.addAll(repository.getPackages());
   }
   return packages;
 }
Beispiel #2
0
 public List<String> getResourceList() {
   ArrayList<String> resources = new ArrayList<>();
   for (Resource res : getCurrentConfig().getAllResources()) {
     resources.add(res.getName());
   }
   return resources;
 }
Beispiel #3
0
 private List<CaseInsensitiveString> getAuthorizedUsers(AdminsConfig authorizedAdmins) {
   ArrayList<CaseInsensitiveString> users = new ArrayList<>();
   for (Admin admin : authorizedAdmins) {
     if (admin instanceof AdminRole) {
       addRoleUsers(users, admin.getName());
     } else {
       users.add(admin.getName());
     }
   }
   return users;
 }