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

com.arextest.storage.service.config.impl.ApplicationOperationConfigurableHandler Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy