Commit 27c1d1c0 authored by Philippe Merle's avatar Philippe Merle

Add support for RESTful bindings.

parent dc3e35b9
/***
* OW2 FraSCAti Explorer
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*/
package org.ow2.frascati.explorer.context;
import org.objectweb.fractal.api.Interface;
import org.objectweb.fractal.explorer.context.InterfaceWrapper;
/**
* RESTful Service Binding context used to display information about SCA RESTful bindings.
*
* @author Philippe Merle.
*/
public class RestBindingWrapper extends InterfaceWrapper {
/**
* Default constructor
* @param itf The reference to wrap.
*/
public RestBindingWrapper(Interface itf) {
super(itf);
}
}
/***
* OW2 FraSCAti explorer
* OW2 FraSCAti Explorer
* Copyright (C) 2008-2009 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
......@@ -20,7 +20,7 @@
*
* Author: Christophe Demarey
*
* Contributor(s): Nicolas Dolet
* Contributor(s): Nicolas Dolet - Philippe Merle
*/
package org.ow2.frascati.explorer.context;
......@@ -33,6 +33,8 @@ import org.objectweb.fractal.api.Interface;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.AttributeController;
import org.objectweb.fractal.api.control.BindingController;
import org.objectweb.fractal.bf.connectors.rest.RestSkeletonContentAttributes;
import org.objectweb.fractal.bf.connectors.rest.RestStubContentAttributes;
import org.objectweb.fractal.bf.connectors.rmi.RmiSkeletonAttributes;
import org.objectweb.fractal.bf.connectors.rmi.RmiStubAttributes;
import org.objectweb.fractal.bf.connectors.ws.WsSkeletonContentAttributes;
......@@ -116,6 +118,13 @@ public abstract class ScaInterfaceContext implements Context {
entries.add( new DefaultEntry(FcExplorer.getPrefixedName(bindInterface),
new WsBindingWrapper(bindInterface)) );
}
// RESTful binding
if ( (ac instanceof RestSkeletonContentAttributes)
|| (ac instanceof RestStubContentAttributes) ) {
entries.add( new DefaultEntry(FcExplorer.getPrefixedName(bindInterface),
new RestBindingWrapper(bindInterface)) );
}
// RMI binding
if ( (ac instanceof RmiStubAttributes)
|| (ac instanceof RmiSkeletonAttributes) ) {
......
......@@ -2,7 +2,7 @@
<!--
* ====================================================================
*
* OW2 FraSCAti explorer
* OW2 FraSCAti Explorer
* Copyright (C) 2008-2009 INRIA
*
* This library is free software; you can redistribute it and/or
......@@ -24,7 +24,7 @@
*
* Author: Christophe Demarey
*
* Contributor(s):
* Contributor(s): Philippe Merle
* ====================================================================
-->
......@@ -127,6 +127,21 @@
</panel>
</node>
<!-- ================================================================= -->
<!-- For org.ow2.frascati.explorer.context.RestBindingWrapper -->
<!-- ================================================================= -->
<node type-name="org.ow2.frascati.explorer.context.RestBindingWrapper">
<!-- TODO: add a new icon for RESTful taken from Eclipse STP/SCA. -->
<icon> <icon-file url="icons/scaWSBinding.png"/> </icon>
<wrapper>
<code>org.ow2.frascati.explorer.context.EmptyContext</code>
</wrapper>
<panel>
<code>org.ow2.frascati.explorer.gui.BindingsPanel</code>
</panel>
</node>
<!-- ================================================================= -->
<!-- For org.ow2.frascati.explorer.context.RmiBindingWrapper -->
<!-- ================================================================= -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment