All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yakworks.rally.job.SyncJobCrudApi.groovy Maven / Gradle / Ivy

There is a newer version: 7.3.76
Show newest version
/*
* Copyright 2024 Yak.Works - Licensed under the Apache License, Version 2.0 (the "License")
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
package yakworks.rally.job

import javax.servlet.http.HttpServletRequest

import groovy.transform.CompileStatic

import org.springframework.stereotype.Component

import gorm.tools.job.JobUtils
import yakworks.gorm.api.DefaultCrudApi

/**
 * Used by CrudApiController for rest api.
 */
@Component
@CompileStatic
class SyncJobCrudApi extends DefaultCrudApi {

    SyncJobCrudApi() {
        super(SyncJob)
    }

    @Override
    Map entityToMap(SyncJob job, List includes){
        Map response = JobUtils.convertToMap(job)
        return response
    }

    static String requestToSourceId(HttpServletRequest req){
        JobUtils.requestToSourceId(req)
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy