Package com.kylietech.oaj.web.validator

Source Code of com.kylietech.oaj.web.validator.DataImportValidator

/*
* Created on Dec 2, 2004
*
*/
package com.kylietech.oaj.web.validator;

import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

import com.kylietech.oaj.common.util.OAServiceUtil;
import com.kylietech.oaj.extras.service.*;
import com.kylietech.oaj.impexp.DataImportProcessor;
import com.kylietech.oaj.impexp.ImpExpData;

/**
* @spring.bean
*          name = "dataImportValidator"
*/
public class DataImportValidator implements Validator {

    public boolean supports(Class clazz) {
        return clazz.equals(ImpExpData.class);
    }

    public void validate(Object command, Errors errors) {
        DataImportService manager = (DataImportService)OAServiceUtil.getBean("DataImportManager");       
        DataImportProcessor processor = manager.createProcessor((ImpExpData)command);
        processor.validate(errors);       
    }

}
TOP

Related Classes of com.kylietech.oaj.web.validator.DataImportValidator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.