use of org.wso2.carbon.apimgt.rest.api.store.v1.dto.KeyManagerListDTO in project carbon-apimgt by wso2.
the class KeyManagerMappingUtil method toKeyManagerListDTO.
public static KeyManagerListDTO toKeyManagerListDTO(List<KeyManagerConfigurationDTO> keyManagerDTOList) {
KeyManagerListDTO keyManagerListDTO = new KeyManagerListDTO();
List<KeyManagerInfoDTO> keyManagerDTOS = new ArrayList<>();
for (KeyManagerConfigurationDTO keyManagerConfigurationDTO : keyManagerDTOList) {
keyManagerDTOS.add(toKeyManagerInfoDTO(keyManagerConfigurationDTO));
}
keyManagerListDTO.setList(keyManagerDTOS);
keyManagerListDTO.setCount(keyManagerDTOS.size());
return keyManagerListDTO;
}
use of org.wso2.carbon.apimgt.rest.api.store.v1.dto.KeyManagerListDTO in project carbon-apimgt by wso2.
the class KeyManagerMappingUtil method toKeyManagerListDto.
public static KeyManagerListDTO toKeyManagerListDto(List<KeyManagerConfigurationDTO> keyManagerConfigurations) {
KeyManagerListDTO keyManagerListDTO = new KeyManagerListDTO();
List<KeyManagerInfoDTO> keyManagerInfoDTOList = new ArrayList<>();
for (KeyManagerConfigurationDTO keyManagerConfigurationDTO : keyManagerConfigurations) {
keyManagerInfoDTOList.add(fromKeyManagerConfigurationDtoToKeyManagerInfoDto(keyManagerConfigurationDTO));
}
keyManagerListDTO.setList(keyManagerInfoDTOList);
keyManagerListDTO.setCount(keyManagerInfoDTOList.size());
return keyManagerListDTO;
}
use of org.wso2.carbon.apimgt.rest.api.store.v1.dto.KeyManagerListDTO in project carbon-apimgt by wso2.
the class KeyManagerMappingUtil method toKeyManagerListDto.
public static KeyManagerListDTO toKeyManagerListDto(List<KeyManagerConfigurationDTO> keyManagerConfigurations) {
KeyManagerListDTO keyManagerListDTO = new KeyManagerListDTO();
List<KeyManagerInfoDTO> keyManagerInfoDTOList = new ArrayList<>();
for (KeyManagerConfigurationDTO keyManagerConfigurationDTO : keyManagerConfigurations) {
keyManagerInfoDTOList.add(fromKeyManagerConfigurationDtoToKeyManagerInfoDto(keyManagerConfigurationDTO));
}
keyManagerListDTO.setList(keyManagerInfoDTOList);
keyManagerListDTO.setCount(keyManagerInfoDTOList.size());
return keyManagerListDTO;
}
use of org.wso2.carbon.apimgt.rest.api.store.v1.dto.KeyManagerListDTO in project carbon-apimgt by wso2.
the class KeyManagersApiServiceImpl method keyManagersGet.
public Response keyManagersGet(MessageContext messageContext) throws APIManagementException {
String organization = RestApiUtil.getOrganization(messageContext);
APIAdmin apiAdmin = new APIAdminImpl();
List<KeyManagerConfigurationDTO> keyManagerConfigurationsByOrganization = apiAdmin.getKeyManagerConfigurationsByOrganization(organization);
KeyManagerListDTO keyManagerListDTO = KeyManagerMappingUtil.toKeyManagerListDTO(keyManagerConfigurationsByOrganization);
return Response.ok().entity(keyManagerListDTO).build();
}
Aggregations