Search in sources :

Example 11 with BotDetectionData

use of org.wso2.carbon.apimgt.api.model.botDataAPI.BotDetectionData in project carbon-apimgt by wso2.

the class BotDetectionMappingUtil method fromAlertSubscriptionToDTO.

/**
 * Converts a single Bot Detection Alert Subscription model into a Bot Detection Alert Subscription DTO
 *
 * @param alertSubscription Bot Detection Alert Subscription model object
 * @return Converted Bot Detection Alert Subscription DTO object
 */
public static BotDetectionAlertSubscriptionDTO fromAlertSubscriptionToDTO(BotDetectionData alertSubscription) {
    BotDetectionAlertSubscriptionDTO alertSubscriptionDTO = new BotDetectionAlertSubscriptionDTO();
    alertSubscriptionDTO.setUuid(alertSubscription.getUuid());
    alertSubscriptionDTO.setEmail(alertSubscription.getEmail());
    return alertSubscriptionDTO;
}
Also used : BotDetectionAlertSubscriptionDTO(org.wso2.carbon.apimgt.rest.api.admin.v1.dto.BotDetectionAlertSubscriptionDTO)

Aggregations

BotDetectionData (org.wso2.carbon.apimgt.api.model.botDataAPI.BotDetectionData)9 ArrayList (java.util.ArrayList)4 APIAdmin (org.wso2.carbon.apimgt.api.APIAdmin)4 APIAdminImpl (org.wso2.carbon.apimgt.impl.APIAdminImpl)4 BotDetectionAlertSubscriptionDTO (org.wso2.carbon.apimgt.rest.api.admin.v1.dto.BotDetectionAlertSubscriptionDTO)3 Connection (java.sql.Connection)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 SQLException (java.sql.SQLException)2 APIManagementException (org.wso2.carbon.apimgt.api.APIManagementException)2 BotDetectionAlertSubscriptionListDTO (org.wso2.carbon.apimgt.rest.api.admin.v1.dto.BotDetectionAlertSubscriptionListDTO)2 BotDetectionDataDTO (org.wso2.carbon.apimgt.rest.api.admin.v1.dto.BotDetectionDataDTO)2 BotDetectionDataListDTO (org.wso2.carbon.apimgt.rest.api.admin.v1.dto.BotDetectionDataListDTO)2 JsonObject (com.google.gson.JsonObject)1 JSONArray (org.json.simple.JSONArray)1 JSONObject (org.json.simple.JSONObject)1