use of org.wso2.charon3.core.objects.ListedResource in project charon by wso2.
the class GroupResourceManager method createListedResource.
/*
* Creates the Listed Resource.
*
* @param groups
* @return
*/
public ListedResource createListedResource(List<Object> groups, int startIndex, int totalResults) throws CharonException, NotFoundException {
ListedResource listedResource = new ListedResource();
listedResource.setSchema(SCIMConstants.LISTED_RESOURCE_CORE_SCHEMA_URI);
listedResource.setTotalResults(totalResults);
listedResource.setStartIndex(startIndex);
listedResource.setItemsPerPage(groups.size());
for (Object group : groups) {
Map<String, Attribute> userAttributes = ((Group) group).getAttributeList();
listedResource.setResources(userAttributes);
}
return listedResource;
}
Aggregations