use of org.wso2.carbon.apimgt.rest.api.publisher.dto.ScopeList_listDTO in project carbon-apimgt by wso2.
the class MappingUtil method toScopeListDto.
/**
* This method used to convert scope map
*
* @param scopeMap map of scopes
* @return ScopeListDTO object
*/
public static ScopeListDTO toScopeListDto(Map<String, String> scopeMap) {
ScopeListDTO scopeListDTO = new ScopeListDTO();
scopeMap.forEach((name, description) -> {
scopeListDTO.addListItem(new ScopeList_listDTO().name(name).description(description));
});
scopeListDTO.setCount(scopeMap.size());
return scopeListDTO;
}
Aggregations