package service.adapter;

import org.springframework.stereotype.Component;

import ru.cg.webbpm.modules.database.api.entity_graph.condition.ConditionAdapter;
import ru.cg.webbpm.modules.database.api.entity_graph.condition.ConditionAdapterProvider;
import ru.cg.webbpm.modules.database.bean.entity_graph.condition.Condition;

/**
 * @author r.latypov
 */
@Component
public class ProjectRuntimeVariableAdapterProvider implements ConditionAdapterProvider {

  /**
   * @return Runtime variable value.
   */
  @Override
  public String getValueTypeCode() {
    return "RUNTIME_VARIABLE";
  }

  /**
   * Creates condition adapter.
   *
   * @return New runtime variable condition adapter.
   */
  @Override
  public ConditionAdapter<?> createAdapter(Condition condition) {
    return new ProjectRuntimeVariableConditionAdapter();
  }
}
