001/** 002 * Copyright 2005-2016 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.api.repository.rule; 017 018import java.util.List; 019import java.util.Map; 020import java.util.Set; 021 022import org.kuali.rice.core.api.mo.common.Identifiable; 023import org.kuali.rice.core.api.mo.common.Versioned; 024import org.kuali.rice.core.api.mo.common.active.Inactivatable; 025import org.kuali.rice.krms.api.repository.action.ActionDefinitionContract; 026import org.kuali.rice.krms.api.repository.proposition.PropositionDefinitionContract; 027 028/** 029 * Defines the contract for a {@link RuleDefinition} 030 * 031 * @see RuleDefinition 032 * @see org.kuali.rice.krms.framework.engine.Rule 033 * 034 * @author Kuali Rice Team (rice.collab@kuali.org) 035 */ 036public interface RuleDefinitionContract extends Identifiable, Inactivatable, Versioned { 037 /** 038 * This is the name of the Rule 039 * <p> 040 * name - the name of the Rule 041 * </p> 042 * @return the name of the Rule 043 */ 044 public String getName(); 045 046 /** 047 * This is the description of the Rule 048 * <p> 049 * description - the description of the Rule 050 * </p> 051 * @return the description of the Rule 052 */ 053 public String getDescription(); 054 055 /** 056 * This is the namespace of the Rule 057 * <p> 058 * The namespace of the Rule 059 * </p> 060 * @return the namespace of the Rule 061 */ 062 public String getNamespace(); 063 064 /** 065 * This is the KrmsType of the Rule 066 * 067 * @return id for KRMS type related of the Rule 068 */ 069 public String getTypeId(); 070 071 /** 072 * This method returns the ID of the Proposition associated with the rule. 073 * <p> 074 * Each Rule has exactly one Proposition associated with it. 075 * <p> 076 * @return the id of the Proposition associated with the Rule 077 */ 078 public String getPropId(); 079 080 /** 081 * This method returns the Proposition associated with the rule. 082 * <p> 083 * Each Rule has exactly one Proposition associated with it. 084 * <p> 085 * @return an immutable representation of the Proposition associated with the Rule 086 */ 087 public PropositionDefinitionContract getProposition(); 088 089 /** 090 * This method returns a list of Actions associated with the Rule. 091 * <p> 092 * A Rule may have zero or more Actions associated with it. 093 * <p> 094 * @return An ordered list of Actions associated with a Rule. 095 */ 096 public List<? extends ActionDefinitionContract> getActions(); 097 098 /** 099 * This method returns a Map of attributes associated with the 100 * Rule. The attributes are represented as name/value pairs. 101 * 102 * @return a Map<String,String> of RuleAttribute objects. 103 */ 104 public Map<String, String> getAttributes(); 105 106}