View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.lum.program.server;
17  
18  import java.util.List;
19  
20  import org.kuali.student.common.ui.server.gwt.BaseRpcGwtServletAbstract;
21  import org.kuali.student.common.versionmanagement.dto.VersionDisplayInfo;
22  import org.kuali.student.core.statement.dto.ReqComponentInfo;
23  import org.kuali.student.core.statement.dto.ReqComponentTypeInfo;
24  import org.kuali.student.core.statement.dto.StatementTreeViewInfo;
25  import org.kuali.student.core.statement.dto.StatementTypeInfo;
26  import org.kuali.student.core.statement.ui.client.widgets.rules.ReqComponentInfoUi;
27  import org.kuali.student.lum.lu.dto.CluInfo;
28  import org.kuali.student.lum.lu.service.LuService;
29  import org.kuali.student.lum.program.client.rpc.StatementRpcService;
30  
31  public class StatementRpcServlet extends BaseRpcGwtServletAbstract<LuService> implements StatementRpcService {
32  
33  	private static final long serialVersionUID = 1L;
34  	private StatementRpcService statmentDataService;
35  
36  	public void setStatmentDataService(StatementRpcService statmentDataService) {
37  		this.statmentDataService = statmentDataService;
38  	}
39  
40  	@Override
41  	public List<StatementTypeInfo> getStatementTypesForStatementTypeForCourse(
42  			String statementTypeKey) throws Exception {
43  		return statmentDataService
44  				.getStatementTypesForStatementTypeForCourse(statementTypeKey);
45  	}
46  
47  	@Override
48  	public List<StatementTypeInfo> getStatementTypesForStatementType(
49  			String statementTypeKey) throws Exception {
50  		return statmentDataService
51  				.getStatementTypesForStatementType(statementTypeKey);
52  	}
53  
54  	@Override
55  	public List<ReqComponentTypeInfo> getReqComponentTypesForStatementType(
56  			String luStatementTypeKey) throws Exception {
57  		return statmentDataService
58  				.getReqComponentTypesForStatementType(luStatementTypeKey);
59  	}
60  
61  	@Override
62  	public String translateReqComponentToNL(ReqComponentInfo reqComponentInfo,
63  			String nlUsageTypeKey, String language) throws Exception {
64  		return statmentDataService.translateReqComponentToNL(reqComponentInfo,
65  				nlUsageTypeKey, language);
66  	}
67  
68  	@Override
69  	public String translateStatementTreeViewToNL(
70  			StatementTreeViewInfo statementTreeViewInfo, String nlUsageTypeKey,
71  			String language) throws Exception {
72  		return statmentDataService.translateStatementTreeViewToNL(
73  				statementTreeViewInfo, nlUsageTypeKey, language);
74  	}
75  
76  	@Override
77  	public List<String> translateReqComponentToNLs(
78  			ReqComponentInfoUi reqComponentInfo, String[] nlUsageTypeKeys,
79  			String language) throws Exception {
80  		return statmentDataService.translateReqComponentToNLs(reqComponentInfo,
81  				nlUsageTypeKeys, language);
82  	}
83  
84  	@Override
85  	public CluInfo getClu(String cluId) throws Exception {
86  		return statmentDataService.getClu(cluId);
87  	}
88  
89  	@Override
90  	public VersionDisplayInfo getCurrentVersion(String refObjectTypeURI,
91  			String refObjectId) throws Exception {
92  		return statmentDataService.getCurrentVersion(refObjectTypeURI,
93  				refObjectId);
94  	}
95  
96  }