01: /*
02: * *********************************************************************************
03: * $URL: https://source.sakaiproject.org/svn/content/trunk/content-api/api/src/java/org/sakaiproject/content/api/ContentCollection.java $
04: * $Id: ContentCollection.java 8537 2006-05-01 02:13:28Z jimeng@umich.edu $
05: * **********************************************************************************
06: *
07: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
08: *
09: * Licensed under the Educational Community License, Version 1.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.opensource.org/licenses/ecl1.php
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: *
21: * *********************************************************************************
22: *
23: */
24:
25: package org.sakaiproject.springframework.transaction.interceptor;
26:
27: import org.springframework.aop.TargetSource;
28:
29: /**
30: * Created by IntelliJ IDEA.
31: * User: John Ellis
32: * Date: May 23, 2006
33: * Time: 12:52:08 PM
34: * To change this template use File | Settings | File Templates.
35: */
36: public class DynamicTargetSource implements TargetSource {
37:
38: private Object target;
39:
40: public DynamicTargetSource(Object target) {
41: this .target = target;
42: }
43:
44: public Class getTargetClass() {
45: return target.getClass();
46: }
47:
48: public boolean isStatic() {
49: return false;
50: }
51:
52: public Object getTarget() throws Exception {
53: return target;
54: }
55:
56: public void releaseTarget(Object target) throws Exception {
57: // no need... is a singleton
58: }
59:
60: public void setTarget(Object target) {
61: this.target = target;
62: }
63:
64: }
|