Savarese.Org

org.savarese.unicorn.ui
Class WebServicePanelModel

java.lang.Object
  extended by org.savarese.unicorn.ui.AbstractObjectPanelModel<javax.wsdl.Service>
      extended by org.savarese.unicorn.ui.WebServicePanelModel
All Implemented Interfaces:
ObjectPanelModel<javax.wsdl.Service>

public class WebServicePanelModel
extends AbstractObjectPanelModel<javax.wsdl.Service>

An ObjectPanelModel implementation for Web services with WSDL definitions.


Field Summary
 
Fields inherited from class org.savarese.unicorn.ui.AbstractObjectPanelModel
_listeners_, _object_
 
Constructor Summary
WebServicePanelModel(javax.wsdl.Definition wsdl, javax.wsdl.Service service)
          Instantiates a WebServicePanelModel that wraps the provided Web service from the accompanying WSDL definition.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attribute)
          Retrieves a named attribute from the adapted object.
 javax.management.MBeanInfo getObjectInfo()
          Returns a description of the object.
 java.lang.String getObjectName()
          Returns a string that identifies the object.
 java.lang.Object invoke(java.lang.String operation, java.lang.Object[] params, java.lang.Class[] types, java.lang.String[] signature)
          Invokes an operation of the adapted object and returns its result, if any.
 boolean isValid()
          Determines if the model is in a valid state.
 void setAttribute(java.lang.String attribute, java.lang.Object value)
          Sets the value of a named attribute of the adapted object.
 void setObject(javax.wsdl.Service service)
          Sets the object to be adapted to the interface.
 
Methods inherited from class org.savarese.unicorn.ui.AbstractObjectPanelModel
_notifyListeners_, addObjectPanelModelListener, getObject, removeObjectPanelModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebServicePanelModel

public WebServicePanelModel(javax.wsdl.Definition wsdl,
                            javax.wsdl.Service service)
Instantiates a WebServicePanelModel that wraps the provided Web service from the accompanying WSDL definition.

Parameters:
wsdl - The WSDL definition containing the Web service description.
service - The Web service to wrap.
Method Detail

setAttribute

public void setAttribute(java.lang.String attribute,
                         java.lang.Object value)
Description copied from interface: ObjectPanelModel
Sets the value of a named attribute of the adapted object.

Parameters:
attribute - The name of the attribute to set.
value - The new value of the attribute.

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute)
Description copied from interface: ObjectPanelModel
Retrieves a named attribute from the adapted object.

Parameters:
attribute - The name of the attribute to retrieve.
Returns:
The attribute corresponding to the provided name.

setObject

public void setObject(javax.wsdl.Service service)
Description copied from interface: ObjectPanelModel
Sets the object to be adapted to the interface.

Specified by:
setObject in interface ObjectPanelModel<javax.wsdl.Service>
Overrides:
setObject in class AbstractObjectPanelModel<javax.wsdl.Service>
Parameters:
service - The object to be adapted.

invoke

public java.lang.Object invoke(java.lang.String operation,
                               java.lang.Object[] params,
                               java.lang.Class[] types,
                               java.lang.String[] signature)
                        throws java.lang.NoSuchMethodException,
                               org.apache.wsif.WSIFException
Description copied from interface: ObjectPanelModel
Invokes an operation of the adapted object and returns its result, if any.

Parameters:
operation - The name of the operation to invoke.
params - An array of parameters for the operation.
types - An array containing the types of the operation parameters.
signature - A string representation of the types (i.e., the fully qualified class names) of the operation parameters.
Returns:
The result of the operation, if any.
Throws:
java.lang.NoSuchMethodException
org.apache.wsif.WSIFException

getObjectName

public java.lang.String getObjectName()
Description copied from interface: ObjectPanelModel
Returns a string that identifies the object.

Specified by:
getObjectName in interface ObjectPanelModel<javax.wsdl.Service>
Overrides:
getObjectName in class AbstractObjectPanelModel<javax.wsdl.Service>
Returns:
A string that identifies the object.

getObjectInfo

public javax.management.MBeanInfo getObjectInfo()
Description copied from interface: ObjectPanelModel
Returns a description of the object.

Returns:
The a description of the object.

isValid

public boolean isValid()
Description copied from interface: ObjectPanelModel
Determines if the model is in a valid state. A model may be rendered invalid if it has no object, if an exception is occurs during a remote invocation operation, or any number of reasons specific to the model implementation.

Specified by:
isValid in interface ObjectPanelModel<javax.wsdl.Service>
Overrides:
isValid in class AbstractObjectPanelModel<javax.wsdl.Service>
Returns:
True if the model is in a valid state, false if not.

Savarese.Org

Copyright © 2006 Daniel F. Savarese. All Rights Reserved.