// Path: net.locosoft.fold.channel/src/net/locosoft/fold/channel/ChannelUtil.java
// public class ChannelUtil {
// 
// 	public static IChannelService getChannelService() {
// 		return FoldUtil.getService(IChannelService.class);
// 	}
// }
// 
// Path: net.locosoft.fold.channel/src/net/locosoft/fold/channel/IChannelService.java
// public interface IChannelService {
// 
// 	IChannel[] getAllChannels();
// 
// 	IChannel getChannel(String channelId);
// 
// 	<T extends IChannel> T getChannel(Class<T> channelInterface);
// 
// 	String getChannelData(String channelId, String key, String... params);
// 
// 	IChannelItemDetails getChannelItemDetails(String channelId,
// 			String channelItemLabel, long channelItemOrdinal);
// 
// 	boolean channelSecurity(HttpServletRequest request,
// 			HttpServletResponse response) throws IOException;
// 
// 	void channelHttp(HttpServletRequest request, HttpServletResponse response)
// 			throws ServletException, IOException;
// 
// }


import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.locosoft.fold.channel.ChannelUtil;
import net.locosoft.fold.channel.IChannelService;
import org.osgi.service.http.HttpContext;
/*****************************************************************************
 * Copyright (c) 2015 Chris J Daly (github user cjdaly)
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   cjdaly - initial API and implementation
 ****************************************************************************/

package net.locosoft.fold.server.internal;





public class FoldServletHttpContext implements HttpContext {

	private IChannelService _channelService;

	public FoldServletHttpContext() {
		_channelService = ChannelUtil.getChannelService();
	}

	public boolean handleSecurity(HttpServletRequest request,
// Path: net.locosoft.fold.channel/src/net/locosoft/fold/channel/ChannelUtil.java
// public class ChannelUtil {
// 
// 	public static IChannelService getChannelService() {
// 		return FoldUtil.getService(IChannelService.class);
// 	}
// }
// 
// Path: net.locosoft.fold.channel/src/net/locosoft/fold/channel/IChannelService.java
// public interface IChannelService {
// 
// 	IChannel[] getAllChannels();
// 
// 	IChannel getChannel(String channelId);
// 
// 	<T extends IChannel> T getChannel(Class<T> channelInterface);
// 
// 	String getChannelData(String channelId, String key, String... params);
// 
// 	IChannelItemDetails getChannelItemDetails(String channelId,
// 			String channelItemLabel, long channelItemOrdinal);
// 
// 	boolean channelSecurity(HttpServletRequest request,
// 			HttpServletResponse response) throws IOException;
// 
// 	void channelHttp(HttpServletRequest request, HttpServletResponse response)
// 			throws ServletException, IOException;
// 
// }


// Path: net.locosoft.fold.server/src/net/locosoft/fold/server/internal/FoldServletHttpContext.java
import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.locosoft.fold.channel.ChannelUtil;
import net.locosoft.fold.channel.IChannelService;
import org.osgi.service.http.HttpContext;

/*****************************************************************************
 * Copyright (c) 2015 Chris J Daly (github user cjdaly)
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   cjdaly - initial API and implementation
 ****************************************************************************/

package net.locosoft.fold.server.internal;





public class FoldServletHttpContext implements HttpContext {

	private IChannelService _channelService;

	public FoldServletHttpContext() {
		_channelService = ChannelUtil.getChannelService();
	}

	public boolean handleSecurity(HttpServletRequest request,
			HttpServletResponse response) throws IOException {