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

com.flyfish.oauth.common.sync.methods.PutSyncRequestAcceptor Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package com.flyfish.oauth.common.sync.methods;

import com.flyfish.oauth.client.RestClient;
import com.flyfish.oauth.common.sync.AbstractSyncRequestAcceptor;
import com.flyfish.oauth.common.sync.support.CollectionComparator;
import com.flyfish.oauth.configuration.sync.SyncDomainService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 基于put的同步
 * 这种同步会冲刷系统原有数据!需要格外谨慎!会查出全量数据进行比对!
 *
 * @author wangyu
 */
public class PutSyncRequestAcceptor extends AbstractSyncRequestAcceptor {
    /**
     * 比较并返回比较结果,根据不同实现策略进行不同的比较
     *
     * @param originList    原数据
     * @param domainService 数据service
     * @return 结果
     */
    @Override
    protected  CollectionComparator compare(List originList, SyncDomainService domainService) throws Exception {
        return null;
    }

    /**
     * 匹配
     *
     * @param request 请求
     * @return 结果
     */
    @Override
    public boolean accept(HttpServletRequest request) {
        return request.getMethod().equalsIgnoreCase(RestClient.HttpMethod.PUT.name());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy