com.arextest.storage.service.config.impl.ApplicationOperationConfigurableHandler Maven / Gradle / Ivy
package com.arextest.storage.service.config.impl;
import com.arextest.config.model.dto.application.ApplicationOperationConfiguration;
import com.arextest.config.repository.ConfigRepositoryProvider;
import com.arextest.storage.service.config.AbstractConfigurableHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author jmo
* @since 2022/1/23
*/
@Component
@Slf4j
public final class ApplicationOperationConfigurableHandler
extends AbstractConfigurableHandler {
protected ApplicationOperationConfigurableHandler(
@Autowired ConfigRepositoryProvider repositoryProvider) {
super(repositoryProvider);
}
@Override
public boolean insert(ApplicationOperationConfiguration configuration) {
if (configuration.getServiceId() == null) {
return false;
}
if (StringUtils.isEmpty(configuration.getOperationName())) {
return false;
}
return super.insert(configuration);
}
}