📄 webcontextservice.java
字号:
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file. */package org.butor.web.context;import org.butor.fwService.FwService;import org.butor.fwService.IFwServiceImpl;/** * * @author Aiman SAWAN */public abstract class WebContextService { protected static FwService fwService = new FwService(WebContextService.class); public static boolean isImplCompatible(IFwServiceImpl impl) { return (impl instanceof IWebContextService); } public static String getServiceName() { return WebContextService.class.getName(); } public static void registerImpl(IFwServiceImpl impl) { fwService.registerImpl(impl); } public static void unregisterImpl(IFwServiceImpl impl) { fwService.unregisterImpl(impl); } protected static IWebContextService getImpl(String calledMethod) { return (IWebContextService)fwService.getImpl(calledMethod); } /** * get the context related to the working thread */ public static void releaseContext() { IWebContextService impl = getImpl("releaseContext()"); if (null != impl) { impl.releaseContext(); } } /** * release the context related to the working thread * @return IContext. */ public static IWebContext getContext() { IWebContextService impl = getImpl("getContext()"); if (null != impl) { return impl.getContext(); } return null; } /** * set the context related to the working thread */ public static void setContext(IWebContext context) { IWebContextService impl = getImpl("setContext()"); if (null != impl) { impl.setContext(context); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -