001/** 002 * Copyright 2005-2013 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krms.service; 017 018import org.kuali.rice.core.api.util.tree.Tree; 019import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBinding; 020import org.kuali.rice.krms.api.repository.rule.RuleDefinitionContract; 021import org.kuali.rice.krms.dto.PropositionEditor; 022import org.kuali.rice.krms.dto.RuleEditor; 023import org.kuali.rice.krms.dto.TemplateInfo; 024import org.kuali.rice.krms.dto.TermParameterEditor; 025import org.kuali.rice.krms.tree.node.CompareTreeNode; 026 027import java.util.List; 028import java.util.Map; 029 030/** 031 * 032 * @author Kuali Student Team 033 */ 034public interface RuleViewHelperService { 035 036 public Boolean validateRule(RuleEditor rule); 037 038 public Boolean validateProposition(PropositionEditor proposition); 039 040 public void resetDescription(PropositionEditor proposition); 041 042 public void buildActions(RuleEditor rule); 043 044 public void configurePropositionForType(PropositionEditor proposition); 045 046 public TemplateInfo getTemplateForType(String type); 047 048 public void refreshInitTrees(RuleEditor rule); 049 050 public void refreshViewTree(RuleEditor rule); 051 052 public Tree<CompareTreeNode, String> buildCompareTree(RuleEditor original, RuleEditor compare); 053 054 public Tree<CompareTreeNode, String> buildMultiViewTree(RuleEditor coRuleEditor, RuleEditor cluRuleEditor); 055 056 public Boolean compareRules(RuleEditor original); 057 058 public void initPropositionEditor(PropositionEditor propositionEditor); 059 060 public void finPropositionEditor(PropositionEditor propositionEditor); 061 062 public Map<String, String> getTermParameters(PropositionEditor proposition); 063 064 public PropositionEditor copyProposition(PropositionEditor proposition); 065 066 public PropositionEditor createCompoundPropositionBoStub(PropositionEditor existing, boolean addNewChild); 067 068 public void setTypeForCompoundOpCode(PropositionEditor proposition, String compoundOpCode); 069 070 public PropositionEditor createSimplePropositionBoStub(PropositionEditor sibling); 071 072 public Boolean compareProposition(PropositionEditor original, PropositionEditor compare); 073 074 public Boolean compareCompoundProposition(List<PropositionEditor> original, List<PropositionEditor> compare); 075 076 public Boolean compareTerm(List<TermParameterEditor> original, List<TermParameterEditor> compare); 077 078}