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

com.wadpam.oauth2.web.FactoryController Maven / Gradle / Ivy

The newest version!
/*
 * INSERT COPYRIGHT HERE
 */

package com.wadpam.oauth2.web;

import com.wadpam.oauth2.domain.DFactory;
import com.wadpam.oauth2.json.JFactory;
import com.wadpam.oauth2.service.FactoryService;
import com.wadpam.open.mvc.CrudController;
import com.wadpam.open.mvc.CrudService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author sosandstrom
 */
@Controller
@RequestMapping("{domain}/_admin/factory")
public class FactoryController extends CrudController> {

    public FactoryController() {
        super(JFactory.class);
    }
    
    @Override
    public void convertDomain(DFactory from, JFactory to) {
        convertStringEntity(from, to);
        to.setBaseUrl(from.getBaseUrl());
        to.setClientId(from.getClientId());
        to.setClientSecret(from.getClientSecret());
    }

    @Override
    public void convertJson(JFactory from, DFactory to) {
        convertJString(from, to);
        to.setBaseUrl(from.getBaseUrl());
        to.setClientId(from.getClientId());
        to.setClientSecret(from.getClientSecret());
    }

    @Autowired
    public void setFactoryService(CrudService factoryService) {
        this.service = factoryService;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy