Search in sources :

Example 1 with ScopeList_listDTO

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;
}
Also used : ScopeListDTO(org.wso2.carbon.apimgt.rest.api.publisher.dto.ScopeListDTO) ScopeList_listDTO(org.wso2.carbon.apimgt.rest.api.publisher.dto.ScopeList_listDTO)

Aggregations

ScopeListDTO (org.wso2.carbon.apimgt.rest.api.publisher.dto.ScopeListDTO)1 ScopeList_listDTO (org.wso2.carbon.apimgt.rest.api.publisher.dto.ScopeList_listDTO)1