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.common_test_tester.support;
17  
18  import javax.jws.WebService;
19  
20  import org.apache.log4j.Logger;
21  import org.springframework.transaction.annotation.Transactional;
22  
23  @WebService(endpointInterface = "org.kuali.student.common_test_tester.support.MyService", serviceName = "MyService", portName = "MyService", targetNamespace = "http://student.kuali.org/poc/wsdl/test/my")
24  @Transactional
25  public class MyServiceImpl implements MyService {
26  	final Logger LOG = Logger.getLogger(MyServiceImpl.class);
27  	private MyDao dao0;
28  	private OtherDao otherDao;
29  	private SomeClass myClass;
30  
31  	/**
32  	 * @return the dao
33  	 */
34  	public MyDao getDao0() {
35  		return dao0;
36  	}
37  
38  	/**
39  	 * @param dao
40  	 *            the dao to set
41  	 */
42  	public void setDao0(MyDao dao0) {
43  		this.dao0 = dao0;
44  	}
45  
46  	/**
47  	 * @return the otherDao
48  	 */
49  	public OtherDao getOtherDao() {
50  		return otherDao;
51  	}
52  
53  	/**
54  	 * @param otherDao
55  	 *            the otherDao to set
56  	 */
57  	public void setOtherDao(OtherDao otherDao) {
58  		this.otherDao = otherDao;
59  	}
60  
61  	@Override
62  	public String saveString(String value) {
63  		if(myClass==null){
64  			throw new RuntimeException("ListIsNull");
65  		}
66  		LOG.info("######==" + dao0);
67  		if (dao0 == null) {
68  			return "";
69  		}
70  		String id = this.dao0.createValue(new Value(value));
71  		this.otherDao.foo();
72  		return id;
73  	}
74  
75  	@Override
76  	public String findStringId(String id) {
77  		return this.dao0.findValue(id);
78  	}
79  
80  	@Override
81  	public boolean updateValue(String id, String value) {
82  		return this.dao0.updateValue(id, value);
83  	}
84  
85  	@Override
86  	public String findValueFromValue(String value) {
87  		return this.dao0.findValueFromValue(value).getValue();
88  	}
89  
90  	public SomeClass getMyClass() {
91  		return myClass;
92  	}
93  
94  	public void setMyClass(SomeClass myClass) {
95  		this.myClass = myClass;
96  	}
97  
98  	@Override
99  	public String echo(String string) {
100 		return "Echo: "+ string;
101 	}
102 
103 }