KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > webui > util > ServiceContextImpl


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.jmanage.webui.util;
17
18 import org.jmanage.core.services.ServiceContext;
19 import org.jmanage.core.auth.User;
20 import org.jmanage.core.config.ApplicationConfig;
21 import org.jmanage.core.management.ObjectName;
22 import org.jmanage.core.management.ServerConnection;
23
24 /**
25  *
26  * date: Jan 17, 2005
27  * @author Rakesh Kalra
28  * @author Shashank Bellary
29  */

30 public class ServiceContextImpl implements ServiceContext {
31
32     private WebContext webContext;
33
34     public ServiceContextImpl(WebContext webContext){
35         this.webContext = webContext;
36     }
37
38     public User getUser() {
39         return webContext.getUser();
40     }
41
42     public void _setUser(User user){
43         this.webContext.setUser(user);
44     }
45
46     public ApplicationConfig getApplicationConfig() {
47         return webContext.getApplicationConfig();
48     }
49
50     public ObjectName getObjectName() {
51         return webContext.getObjectName();
52     }
53
54     public ServerConnection getServerConnection() {
55         return webContext.getServerConnection();
56     }
57 }
58
Popular Tags