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.impl.repository.language;
017
018import org.kuali.rice.core.api.exception.RiceIllegalStateException;
019import org.kuali.rice.krms.api.repository.proposition.PropositionDefinitionContract;
020
021/**
022 * This class translates requirement components and statements into 
023 * natural language.
024 */
025public interface NaturalLanguageTranslator {
026        /**
027         * Translates a requirement component for a specific natural language 
028         * usuage type (context) into natural language.
029         * 
030         * @param proposition Proposition to be translated
031         * @param nlUsageTypeKey Natural language usage type key (context)
032         * @return Natural language requirement translation
033         * @throws org.kuali.student.r2.common.exceptions.DoesNotExistException Requirement component id does not exists
034         * @throws org.kuali.student.r2.common.exceptions.OperationFailedException
035         */
036        public String translateProposition(PropositionDefinitionContract proposition, String nlUsageTypeKey) throws RiceIllegalStateException;
037
038        /**
039         * Translates a requirement component for a specific natural language
040         * usuage type (context) and language locale (e.g. 'en' for English,
041         * 'de' for German) into natural language.
042         *
043         * @param proposition Proposition to be translated
044         * @param nlUsageTypeKey Natural language usage type key (context)
045         * @param language Translation language
046         * @return
047         * @throws org.kuali.student.r2.common.exceptions.DoesNotExistException
048         * @throws org.kuali.student.r2.common.exceptions.OperationFailedException
049         */
050        public String translateProposition(PropositionDefinitionContract proposition, String nlUsageTypeKey, String language) throws RiceIllegalStateException;
051
052
053}