org.sourcejammer.server.plugin
Class SJServerActionAdapter

java.lang.Object
  |
  +--org.sourcejammer.server.plugin.SJServerActionAdapter
All Implemented Interfaces:
SJServerAction, SJServerPlugin

public abstract class SJServerActionAdapter
extends java.lang.Object
implements SJServerAction

Title: $FileName: SJServerActionAdapter.java$

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

$Description: For convenience, this adapter is provided. It implements the SJServerAction interface.$
$KeyWordsOff: $

Field Summary
private  java.util.Map params
           
private  java.io.File workDirectory
           
 
Constructor Summary
SJServerActionAdapter()
           
 
Method Summary
abstract  void actionPerformed(org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response, ArchiveContext arch)
           
protected  java.lang.String getParameter(java.lang.String name)
          Returns the requested parameter as a String.
 java.io.File getWorkDirectory()
          Returns a pointer to the work directory for this plugin.
 void initPlugin(java.util.Map params)
          Warning! If you override this method, be sure to call super.initPlugin().
 void setWorkDirectory(java.io.File workDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

params

private java.util.Map params

workDirectory

private java.io.File workDirectory
Constructor Detail

SJServerActionAdapter

public SJServerActionAdapter()
Method Detail

setWorkDirectory

public final void setWorkDirectory(java.io.File workDirectory)
Specified by:
setWorkDirectory in interface SJServerPlugin

getWorkDirectory

public java.io.File getWorkDirectory()
Returns a pointer to the work directory for this plugin. The directory will only be used by this plugin. A new directory will be created for each Archive this plugin is added to. No files in this directory will be added, removed, or modified by SourceJammer or any other plugins.

Please use common sense in dealing with this directory. Do not store files here unless you really need them. Delete files when you are finished with them.

For temp files, you are probably better off using SourceJammer's TempDirectoryManager (in org.sourcejammer.util in the lib package). SJ periodically wipes the temp directory clean so you don't have to worry about that.

Specified by:
getWorkDirectory in interface SJServerPlugin

getParameter

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


actionPerformed

public abstract void actionPerformed(org.sourcejammer.project.view.SJRequest request,
                                     org.sourcejammer.project.view.SJResponse response,
                                     ArchiveContext arch)
Specified by:
actionPerformed in interface SJServerAction
See Also:
SJServerAction.actionPerformed(SJRequest, SJResponse, ArchiveContext)

initPlugin

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

Specified by:
initPlugin in interface SJServerPlugin
MissingParamException


Copyright © 2003 Soucejammer project.