package ${basePackage}.action.api.system;

import org.springframework.beans.factory.annotation.Autowired;
import ${basePackage}.frame.auth.LocalData;
import ${basePackage}.module.system.mgr.ResManager;
import ${basePackage}.module.system.req.ResCreateRequest;
import ${basePackage}.module.system.req.ResDeleteRequest;
import ${basePackage}.module.system.req.ResFindRequest;
import ${basePackage}.module.system.req.ResGetRequest;
import ${basePackage}.module.system.req.ResTreeRequest;
import ${basePackage}.module.system.req.ResUpdateRequest;
import ${basePackage}.module.system.rsp.ResCreateResponse;
import ${basePackage}.module.system.rsp.ResDeleteResponse;
import ${basePackage}.module.system.rsp.ResFindResponse;
import ${basePackage}.module.system.rsp.ResGetResponse;
import ${basePackage}.module.system.rsp.ResTreeResponse;
import ${basePackage}.module.system.rsp.ResUpdateResponse;

public class ResApi {

    @Autowired
    private ResManager resManager;

    public ResCreateResponse create(ResCreateRequest request) {
        return resManager.create(request, LocalData.getToken());
    }

    public ResDeleteResponse delete(ResDeleteRequest request) {
        return resManager.delete(request, LocalData.getToken());
    }

    public ResUpdateResponse update(ResUpdateRequest request) {
        return resManager.update(request, LocalData.getToken());
    }

    public ResFindResponse find(ResFindRequest request) {
        return resManager.find(request, LocalData.getToken());
    }

    public ResGetResponse get(ResGetRequest request) {
        return resManager.get(request, LocalData.getToken());
    }

    public ResTreeResponse tree(ResTreeRequest request) {
        return resManager.tree(request, LocalData.getToken());
    }
}
