org.sourcejammer.server.plugin
Class SJServerProjectChangeAdapter
java.lang.Object
|
+--org.sourcejammer.server.plugin.SJServerProjectChangeAdapter
- All Implemented Interfaces:
- SJServerPlugin, SJServerProjectChangeListener
- Direct Known Subclasses:
- ExampleProjectListenerPlugin
- public abstract class SJServerProjectChangeAdapter
- extends java.lang.Object
- implements SJServerProjectChangeListener
Title: $FileName: SJServerProjectChangeAdapter.java$
- Version:
- $VerNum: 3$
- Author:
- $AuthorName: Rob MacGrogan$
$Description: Convenient adapter of
SJServerProjectChangeListener. Implements all methods and
provides simplified access to params and a working
directory.$
$KeyWordsOff: $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
params
private java.util.Map params
workDirectory
private java.io.File workDirectory
SJServerProjectChangeAdapter
public SJServerProjectChangeAdapter()
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.
projectAdded
public void projectAdded(SJServerProjectEvent ev)
- Specified by:
projectAdded
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectAdded(SJServerProjectEvent)
projectRenamed
public void projectRenamed(SJServerProjectEvent ev)
- Specified by:
projectRenamed
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectRenamed(SJServerProjectEvent)
projectRemoved
public void projectRemoved(SJServerProjectEvent ev)
- Specified by:
projectRemoved
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectRemoved(SJServerProjectEvent)
projectDeleted
public void projectDeleted(SJServerProjectEvent ev)
- Specified by:
projectDeleted
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectDeleted(SJServerProjectEvent)
projectRestored
public void projectRestored(SJServerProjectEvent ev)
- Specified by:
projectRestored
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectRestored(SJServerProjectEvent)
initPlugin
public void initPlugin(java.util.Map params)
throws MissingParamException
- Description copied from interface:
SJServerPlugin
- Called after plugin is constructed. Any params in the config file
are passed in as a HashMap of name/value pairs.
If a plugin always requires a parameter but it is not included in the map,
a MissingParamException will be thrown containing the name of the missing
param.
- Specified by:
initPlugin
in interface SJServerPlugin
MissingParamException
- See Also:
SJServerPlugin.initPlugin(Map)
projectMoved
public void projectMoved(SJServerProjectEvent ev)
- Specified by:
projectMoved
in interface SJServerProjectChangeListener
- See Also:
SJServerProjectChangeListener.projectMoved(SJServerProjectEvent)
Copyright © 2003 Soucejammer project.