Get a snapshot of the grants used for this session for the web server.
This method should be synchronized by the caller around the session.

@return List of {@link GrantReport} objects for this session sorted by id.
178914
public List<GrantReport> getGrantReportList() {
    Map<Integer, GrantReport> grantReportMap =
      new TreeMap<Integer, GrantReport>();
    for (Map.Entry<Integer, ResourceGrant> entry : idToGrant.entrySet()) {
      grantReportMap.put(entry.getKey(),
        new GrantReport(entry.getKey().intValue(),
                        entry.getValue().getAddress().toString(),
                        entry.getValue().getType(),
                        entry.getValue().getGrantedTime()));
    }
    return new ArrayList<GrantReport>(grantReportMap.values());
  }
142291
@JsonIgnore
	public Collection<? extends GrantedAuthority> getAuthorities() {
		if (user.isAdmin()) {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.ADMIN.toString()));
		} else if (user.isModerator()) {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.MOD.toString()));
		} else {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.USER.toString()));
		}
	}
723856
public synchronized List<SessionId> getLoggedSessions() {
    // TODO: Find a solution that can handle large numbers of sessions, maybe by
    // reading them from disc.
    ImmutableList.Builder<SessionId> builder = new ImmutableList.Builder<>();
    builder.addAll(perSessionDriverEntries.keySet());
    return builder.build();
  }
705384
public java.util.List<BillingRecord> getBillingRecords() {
        if (billingRecords == null) {
            billingRecords = new com.amazonaws.internal.SdkInternalList<BillingRecord>();
        }
        return billingRecords;
    }
827847
public java.util.List<SnapshotDetail> getSnapshotDetails() {
        if (snapshotDetails == null) {
            snapshotDetails = new com.amazonaws.internal.SdkInternalList<SnapshotDetail>();
        }
        return snapshotDetails;
    }
229250
public java.util.List<PrincipalIdFormat> getPrincipals() {
        if (principals == null) {
            principals = new com.amazonaws.internal.SdkInternalList<PrincipalIdFormat>();
        }
        return principals;
    }
1062723
public java.util.List<DBClusterSnapshotAttribute> getDBClusterSnapshotAttributes() {
        if (dBClusterSnapshotAttributes == null) {
            dBClusterSnapshotAttributes = new com.amazonaws.internal.SdkInternalList<DBClusterSnapshotAttribute>();
        }
        return dBClusterSnapshotAttributes;
    }
1103145
public java.util.List<Session> getSessions() {
        if (sessions == null) {
            sessions = new com.amazonaws.internal.SdkInternalList<Session>();
        }
        return sessions;
    }
1275334
public java.util.List<ReservedDBInstancesOffering> getReservedDBInstancesOfferings() {
        if (reservedDBInstancesOfferings == null) {
            reservedDBInstancesOfferings = new com.amazonaws.internal.SdkInternalList<ReservedDBInstancesOffering>();
        }
        return reservedDBInstancesOfferings;
    }
306808
public List<ResourceRequest> getResourcesToRelease() {
    List<ResourceRequest> release = new ArrayList<ResourceRequest>();
    synchronized(lockObject) {
      for (Integer requestId:
        setDifference(requestedResources.keySet(), requestMap.keySet())) {
        // We update the data structures right away. This assumes that the
        // caller will be able to release the resources.
        ResourceRequest req = requestedResources.remove(requestId);
        if (req != null) {
          release.add(req);
          LOG.info("Filing release for requestId: " + req.getId());
        }
      }
    }
    return release;
  }
1106363
public Collection<Permission> getAggregatePermissions() {
        if (aggregatePermissions == null) {
            Set<Permission> perms = new LinkedHashSet<>();
            perms.addAll(permissions);
            for (Role role : roles) {
                perms.addAll(role.getPermissions());
            }

            if (perms.isEmpty()) {
                aggregatePermissions = Collections.emptySet();
            } else {
                aggregatePermissions = Collections.unmodifiableSet(perms);
            }
        }

        return aggregatePermissions;
    }
1137332
public List<DataPoint> getDataList() {
        List<DataPoint> dataListCopy = new LinkedList<eu.hansolo.steelseries.tools.DataPoint>();
        dataListCopy.addAll(DATA_LIST);
        return dataListCopy;
    }
208261
public List<SecurityPermissionType<ResourceadapterType<T>>> getAllSecurityPermission()
   {
      List<SecurityPermissionType<ResourceadapterType<T>>> list = new ArrayList<SecurityPermissionType<ResourceadapterType<T>>>();
      List<Node> nodeList = childNode.get("security-permission");
      for(Node node: nodeList)
      {
         SecurityPermissionType<ResourceadapterType<T>>  type = new SecurityPermissionTypeImpl<ResourceadapterType<T>>(this, "security-permission", childNode, node);
         list.add(type);
      }
      return list;
   }
82242
public void setGrants(java.util.Collection<GrantListEntry> grants) {
        if (grants == null) {
            this.grants = null;
            return;
        }

        this.grants = new com.ibm.cloud.objectstorage.internal.SdkInternalList<GrantListEntry>(grants);
    }
1217240
public List<Permission<Permissions<T>>> getAllPermission()
   {
      List<Permission<Permissions<T>>> list = new ArrayList<Permission<Permissions<T>>>();
      List<Node> nodeList = childNode.get("permission");
      for(Node node: nodeList)
      {
         Permission<Permissions<T>>  type = new PermissionImpl<Permissions<T>>(this, "permission", childNode, node);
         list.add(type);
      }
      return list;
   }
322703
public ArrayList<ProgressSource> getProgressSources()    {
        ArrayList<ProgressSource> snapshot = new ArrayList<ProgressSource>();

        try {
            synchronized(progressSourceList)    {
                for (Iterator<ProgressSource> iter = progressSourceList.iterator(); iter.hasNext();)    {
                    ProgressSource pi = iter.next();

                    // Clone ProgressSource and add to snapshot
                    snapshot.add((ProgressSource)pi.clone());
                }
            }
        }
        catch(CloneNotSupportedException e) {
            e.printStackTrace();
        }

        return snapshot;
    }
539891
public static List<String> getAllAuthorities() {
        final List<String> allPermissions = new ArrayList<>();
        final Field[] declaredFields = SpPermission.class.getDeclaredFields();
        for (final Field field : declaredFields) {
            if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) {
                field.setAccessible(true);
                try {
                    final String role = (String) field.get(null);
                    allPermissions.add(role);
                } catch (final IllegalAccessException e) {
                    LOGGER.error(e.getMessage(), e);
                }
            }
        }
        return allPermissions;
    }