Coverage Report - org.kuali.rice.krms.impl.repository.RuleRepositoryContextProvider
 
Classes in this File Line Coverage Branch Coverage Complexity
RuleRepositoryContextProvider
0%
0/6
N/A
1
 
 1  
 package org.kuali.rice.krms.impl.repository;
 2  
 
 3  
 import java.util.Map;
 4  
 
 5  
 import org.kuali.rice.krms.api.Asset;
 6  
 import org.kuali.rice.krms.api.Context;
 7  
 import org.kuali.rice.krms.api.ContextProvider;
 8  
 import org.kuali.rice.krms.api.SelectionCriteria;
 9  
 import org.kuali.rice.krms.framework.repository.ContextDefinition;
 10  
 import org.kuali.rice.krms.framework.repository.RuleRepository;
 11  
 
 12  0
 public class RuleRepositoryContextProvider implements ContextProvider {
 13  
 
 14  
         private RuleRepository ruleRepository;
 15  
         
 16  
         @Override
 17  
         public Context loadContext(SelectionCriteria selectionCriteria, Map<Asset, Object> facts, Map<String, String> executionOptions) {
 18  0
                 ContextDefinition contextDefinition = ruleRepository.selectContext(selectionCriteria.getContextQualifiers());
 19  0
                 return loadContextFromDefinition(contextDefinition);
 20  
         }
 21  
         
 22  
         protected Context loadContextFromDefinition(ContextDefinition contextDefinition) {
 23  
                 // TODO...translate repository data model to execution model
 24  0
                 return null;
 25  
         }
 26  
         
 27  
         public void setRuleRepository(RuleRepository ruleRepository) {
 28  0
                 this.ruleRepository = ruleRepository;
 29  0
         }
 30  
 
 31  
 }