/* (non-Javadoc)
@see org.jboss.arquillian.impl.configuration.api.GroupDef#getGroupContainers()
337212
@Override
    public List<ContainerDef> getGroupContainers() {
        List<ContainerDef> containers = new ArrayList<ContainerDef>();
        for (Node container : group.get("container")) {
            containers.add(new GroupContainerDefImpl(getDescriptorName(), getRootNode(), group, container));
        }
        return containers;
    }
531700
public void getGroupsForUser(List<String> grpMbrshipAttrs, int countLimit) throws Exception {
        throw new WIMApplicationException(WIMMessageKey.METHOD_NOT_IMPLEMENTED, Tr.formatMessage(tc, WIMMessageKey.METHOD_NOT_IMPLEMENTED));
    }
568907
@Nullable
    @ObjectiveCName("getGroups")
    public MVVMCollection<Group, GroupVM> getGroups() {
        if (modules.getGroupsModule() == null) {
            return null;
        }
        return modules.getGroupsModule().getGroupsCollection();
    }
636251
@Override
    public List<GroupDef> getGroups() {
        List<GroupDef> groups = new ArrayList<GroupDef>();
        for (Node group : model.get("group")) {
            groups.add(new GroupDefImpl(getDescriptorName(), model, group));
        }
        return groups;
    }
1104496
public java.util.List<InstanceGroup> getInstanceGroups() {
        if (instanceGroups == null) {
            instanceGroups = new com.amazonaws.internal.SdkInternalList<InstanceGroup>();
        }
        return instanceGroups;
    }
795620
public java.util.List<GroupedResourceCount> getGroupedResourceCounts() {
        if (groupedResourceCounts == null) {
            groupedResourceCounts = new com.amazonaws.internal.SdkInternalList<GroupedResourceCount>();
        }
        return groupedResourceCounts;
    }
931431
public java.util.List<EC2SecurityGroup> getEC2SecurityGroups() {
        if (eC2SecurityGroups == null) {
            eC2SecurityGroups = new com.amazonaws.internal.SdkInternalList<EC2SecurityGroup>();
        }
        return eC2SecurityGroups;
    }
772061
public List<GROUP> getGroups(List<RESOURCE> resources) {

        List<RESOURCE> sortedResources = new ArrayList<RESOURCE>(resources);
        Collections.sort(sortedResources, new SortingComparator());
        Map<Long, Integer> daysMap = computeDaysForResources(sortedResources);
        Map<GroupAge, List<RESOURCE>> resourcesByAge = partitionPublishResourcesByAge(sortedResources, daysMap);
        List<List<RESOURCE>> youngGroups = partitionYoungResources(resourcesByAge.get(GroupAge.young));
        List<List<RESOURCE>> mediumGroups = partitionMediumResources(resourcesByAge.get(GroupAge.medium), daysMap);
        List<RESOURCE> oldGroup = resourcesByAge.get(GroupAge.old);
        List<GROUP> resultGroups = new ArrayList<GROUP>();
        for (List<RESOURCE> groupRes : youngGroups) {
            String name = getPublishGroupName(groupRes, GroupAge.young);
            resultGroups.add(createGroup(name, groupRes));
        }
        for (List<RESOURCE> groupRes : mediumGroups) {
            String name = getPublishGroupName(groupRes, GroupAge.medium);
            resultGroups.add(createGroup(name, groupRes));
        }
        if (!oldGroup.isEmpty()) {
            String oldName = getPublishGroupName(oldGroup, GroupAge.old);
            resultGroups.add(createGroup(oldName, oldGroup));
        }
        return resultGroups;
    }
1127714
public java.util.List<CacheSecurityGroup> getCacheSecurityGroups() {
        if (cacheSecurityGroups == null) {
            cacheSecurityGroups = new com.amazonaws.internal.SdkInternalList<CacheSecurityGroup>();
        }
        return cacheSecurityGroups;
    }
872486
public List<Group> findAllGroups() {
        ArrayList<Group> allGroups = new ArrayList<Group>();
        PreparedStatement queryStatement = null;
        ResultSet results = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement("SELECT * FROM "
                                                                + Constants.DB_TABLE_GROUPS +
                                                                " ORDER BY " + Constants.GROUPS_GROUP_NAME);
            results = queryStatement.executeQuery();
            while (results.next()) {
                Group group = new Group();
                group.setId(results.getInt(Constants.GENERIC_ID));
                group.setName(results.getString(Constants.GROUPS_GROUP_NAME));
                allGroups.add(group);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (queryStatement != null) {
                    queryStatement.close();
                }
            } catch (Exception e) {
            }
        }

        return allGroups;
    }
656723
public java.util.List<String> getCustomSecurityGroupIds() {
        if (customSecurityGroupIds == null) {
            customSecurityGroupIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return customSecurityGroupIds;
    }
1190252
public boolean isGroupContainer(CmsObject cms) throws CmsException {

        if (m_resource == null) {
            initResource(cms);
        }
        return CmsResourceTypeXmlContainerPage.GROUP_CONTAINER_TYPE_NAME.equals(
            OpenCms.getResourceManager().getResourceType(m_resource).getTypeName());
    }
853135
public List<String> findObjectsInGroup(String groupName) {
        if (getObjectGroups().containsKey(groupName)) {
            return getObjectGroups().get(groupName);
        } else {
            return Collections.emptyList();
        }
    }
988353
public List<ServerGroup> getServerGroups() {
        ArrayList<ServerGroup> groups = new ArrayList<ServerGroup>();
        try {
            JSONObject response = new JSONObject(doGet(BASE_SERVERGROUP, null));
            JSONArray serverArray = response.getJSONArray("servergroups");

            for (int i = 0; i < serverArray.length(); i++) {
                JSONObject jsonServerGroup = serverArray.getJSONObject(i);
                ServerGroup group = getServerGroupFromJSON(jsonServerGroup);
                groups.add(group);
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return groups;
    }
283450
private List<Group> getGroups() throws Exception {
        List<Group> groups = new ArrayList<Group>();
        List<Group> sourceGroups = PathOverrideService.getInstance().findAllGroups();

        // loop through the groups
        for (Group sourceGroup : sourceGroups) {
            Group group = new Group();

            // add all methods
            ArrayList<Method> methods = new ArrayList<Method>();
            for (Method sourceMethod : EditService.getInstance().getMethodsFromGroupId(sourceGroup.getId(), null)) {
                Method method = new Method();
                method.setClassName(sourceMethod.getClassName());
                method.setMethodName(sourceMethod.getMethodName());
                methods.add(method);
            }

            group.setMethods(methods);
            group.setName(sourceGroup.getName());
            groups.add(group);
        }

        return groups;
    }
346768
public CmsGroupContainerBean getGroupContainer(CmsObject cms) {

        if (m_groupContainers.containsKey(CmsLocaleManager.MASTER_LOCALE)) {
            return m_groupContainers.get(CmsLocaleManager.MASTER_LOCALE);
        } else if (!m_groupContainers.isEmpty()) {
            return m_groupContainers.get(m_groupContainers.keySet().iterator().next());
        } else {
            return null;
        }
    }
444637
@Override
  public Map<String, DeploymentGroup> getDeploymentGroups() {
    log.debug("getting deployment groups");
    final String folder = Paths.configDeploymentGroups();
    final ZooKeeperClient client = provider.get("getDeploymentGroups");
    try {
      final List<String> names;
      try {
        names = client.getChildren(folder);
      } catch (NoNodeException e) {
        return Maps.newHashMap();
      }
      final Map<String, DeploymentGroup> descriptors = Maps.newHashMap();
      for (final String name : names) {
        final String path = Paths.configDeploymentGroup(name);
        try {
          final byte[] data = client.getData(path);
          final DeploymentGroup descriptor = parse(data, DeploymentGroup.class);
          descriptors.put(descriptor.getName(), descriptor);
        } catch (NoNodeException e) {
          // Ignore, the deployment group was deleted before we had a chance to read it.
          log.debug("Ignoring deleted deployment group {}", name);
        }
      }
      return descriptors;
    } catch (KeeperException | IOException e) {
      throw new HeliosRuntimeException("getting deployment groups failed", e);
    }
  }