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.term; 017 018import org.kuali.rice.core.api.mo.common.Identifiable; 019import org.kuali.rice.core.api.mo.common.Versioned; 020import org.kuali.rice.core.api.mo.common.active.Inactivatable; 021import org.kuali.rice.krms.api.repository.category.CategoryDefinitionContract; 022 023import java.util.List; 024 025/** 026 * <p>The contract for a {@link TermSpecificationDefinition} which defines important information about a term (see 027 * {@link org.kuali.rice.krms.api.repository.term.TermDefinitionContract}). A term specification should be uniquely 028 * identifiable by its name and namespace. This key is important for determining how the fact value for a term can be 029 * resolved. 030 * </p> 031 * 032 * @author Kuali Rice Team (rice.collab@kuali.org) 033 * 034 */ 035public interface TermSpecificationDefinitionContract extends Identifiable, Inactivatable, Versioned { 036 037 /** 038 * Gets the name for this {@link TermSpecificationDefinitionContract}. This is an important key 039 * that must be unique within a namespace, and is used to determine how to resolve any terms 040 * having this specification. Will not be null or empty. 041 * 042 * @return the name 043 */ 044 String getName(); 045 046 /** 047 * Gets the namespace of this {@link TermSpecificationDefinitionContract}. Will not be null or empty. 048 * 049 * @return the namespace of the TermSpecificationDefinitionContract 050 */ 051 public String getNamespace(); 052 053 /** 054 * Gets the fully qualified class name for the values of any term having this specification. E.g. if the 055 * type of the fact values for the "total dollar amount of a grant" term was {@link java.math.BigDecimal}, 056 * then the term specification's type would be the String "java.math.BigDecimal". Will never return null or 057 * the empty string. 058 * 059 * @return the fully qualified name of the java type of values for this term. 060 */ 061 String getType(); 062 063 /** 064 * Gets the description for this term specification, which will typically be a suitable description for 065 * any term having this specification as well. May return null if no description is specified for the term 066 * specification. 067 * 068 * @return the description for this term specification. 069 */ 070 String getDescription(); 071 072 /** 073 * Gets an ordered list of the categories which this term specification 074 * definition belongs to. This list can be empty but will never be null. 075 * 076 * @return the list of categories for this term specification definition. 077 */ 078 List<? extends CategoryDefinitionContract> getCategories(); 079 080 // TODO: ensure that @since is accurate when this sandbox branch is merged back into Rice proper 081 /** 082 * Gets a list of the IDs for the contexts this TermSpecification can be used in. 083 * 084 * @return the list of contexts for this term specification definition 085 * @since 2.2 086 */ 087 List<String> getContextIds(); 088 089}