org.sourcejammer.client.plugin
Class SJClientActionAdapter

java.lang.Object
  |
  +--org.sourcejammer.client.plugin.SJClientActionAdapter
All Implemented Interfaces:
SJClientAction, SJClientPlugin
Direct Known Subclasses:
TestActionPlugin

public abstract class SJClientActionAdapter
extends java.lang.Object
implements SJClientAction

Title: $FileName: SJClientActionAdapter.java$

Version:
$VerNum: 2$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

Abstract implementation of SJClientAction. Provides useful methods. It is highly recommended that your plugins extend this adapter.

Field Summary
private  java.util.HashMap params
           
 
Constructor Summary
SJClientActionAdapter()
           
 
Method Summary
abstract  void actionPerformed(GUIContext context)
           
protected  org.sourcejammer.project.view.SJRequest getBaseRequest()
          Returns SJRequest with archive, user, and session info already set.
protected  java.lang.String getParameter(java.lang.String name)
          Returns the requested parameter as a String.
 void initPlugin(java.util.HashMap params)
          Warning! If you override this method, be sure to call super.initPlugin().
 void mapType(java.lang.String nameSpaceURI, java.lang.String part, java.lang.Class javaType)
          If your plugin needs to send or receive any objects of customized clases to/from the server, you must register each class by calling this method from the initPlugin() method.

First of all, the custom class must be availble to (in the classpath of) both client and server.
protected  org.sourcejammer.project.view.SJResponse sendRequest(java.lang.String serverPluginName, org.sourcejammer.project.view.SJRequest request)
          Send request to server and run specified plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

params

private java.util.HashMap params
Constructor Detail

SJClientActionAdapter

public SJClientActionAdapter()
Method Detail

getParameter

protected java.lang.String getParameter(java.lang.String name)
Returns the requested parameter as a String.


initPlugin

public void initPlugin(java.util.HashMap params)
Warning! If you override this method, be sure to call super.initPlugin().

Specified by:
initPlugin in interface SJClientPlugin

mapType

public void mapType(java.lang.String nameSpaceURI,
                    java.lang.String part,
                    java.lang.Class javaType)
If your plugin needs to send or receive any objects of customized clases to/from the server, you must register each class by calling this method from the initPlugin() method.

First of all, the custom class must be availble to (in the classpath of) both client and server. Second, the class must be deployed on the server. Third, you must call this method once for each custom class, passing the Namespace URI and part specified for the class when you deployed.

Each class should only be registered once, system-wide. If you use the same class in multiple plugins, be sure to register the class in only one of your plugins.

Please refer to the Apache SOAP documentation for further details.


getBaseRequest

protected org.sourcejammer.project.view.SJRequest getBaseRequest()
Returns SJRequest with archive, user, and session info already set.


sendRequest

protected org.sourcejammer.project.view.SJResponse sendRequest(java.lang.String serverPluginName,
                                                               org.sourcejammer.project.view.SJRequest request)
                                                        throws org.sourcejammer.util.SourceJammerConnectionException,
                                                               GUICommandException
Send request to server and run specified plugin.

org.sourcejammer.util.SourceJammerConnectionException
GUICommandException

actionPerformed

public abstract void actionPerformed(GUIContext context)
Specified by:
actionPerformed in interface SJClientAction
See Also:
SJClientAction.actionPerformed(GUIContext)


Copyright 2003 Soucejammer project.