org.sourcejammer.server.plugin
Class SJServerFileChangeAdapter

java.lang.Object
  |
  +--org.sourcejammer.server.plugin.SJServerFileChangeAdapter
All Implemented Interfaces:
SJServerFileChangeListener, SJServerPlugin
Direct Known Subclasses:
ExampleFileListenerPlugin

public abstract class SJServerFileChangeAdapter
extends java.lang.Object
implements SJServerFileChangeListener

Title: $FileName: SJServerFileChangeAdapter.java$

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

$Description: A default adapter for SJServerFileChangeListener. Provides empty methods for all event methods in the listener interface. Also provides access to a work directory on the server's filesystem.$
$KeyWordsOff: $

Field Summary
private  java.util.Map params
           
private  java.io.File workDirectory
           
 
Constructor Summary
SJServerFileChangeAdapter()
           
 
Method Summary
 void fileAdded(SJServerFileEvent ev)
          Target is new parent Project of file.
 void fileBranched(SJServerFileEvent ev)
          Target is parent Project in which file was branched.
 void fileCheckedIn(SJServerFileEvent ev)
           
 void fileCheckedOut(SJServerFileEvent ev)
           
 void fileCheckedOutUndone(SJServerFileEvent ev)
           
 void fileCopied(SJServerFileEvent ev)
          Target is new parent Project of file.
 void fileDeleted(SJServerFileEvent ev)
          Target is parent Project from which file was deleted.
 void fileDescriptionModified(SJServerFileEvent ev)
           
 void fileMoved(SJServerFileEvent ev)
          Target is new parent Project of file.
 void fileRemoved(SJServerFileEvent ev)
          Target is parent Project from which file was removed.
 void fileRenamed(SJServerFileEvent ev)
           
 void fileRestored(SJServerFileEvent ev)
           
 void fileRolledBackToPreviousVersion(SJServerFileEvent ev)
           
 void fileShared(SJServerFileEvent ev)
          Target is new parent Project of file.
 void fileShareRemoved(SJServerFileEvent ev)
          Target is parent Project from which file share was removed.
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 latestVersionRequested(SJServerFileEvent ev)
           
 void setWorkDirectory(java.io.File workDirectory)
           
 void specificVesionRequested(SJServerFileEvent ev)
           
 
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

SJServerFileChangeAdapter

public SJServerFileChangeAdapter()
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.


fileAdded

public void fileAdded(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is new parent Project of file.

Specified by:
fileAdded in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileAdded(SJServerFileEvent)

latestVersionRequested

public void latestVersionRequested(SJServerFileEvent ev)
Specified by:
latestVersionRequested in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.latestVersionRequested(SJServerFileEvent)

specificVesionRequested

public void specificVesionRequested(SJServerFileEvent ev)
Specified by:
specificVesionRequested in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.specificVesionRequested(SJServerFileEvent)

fileCheckedOut

public void fileCheckedOut(SJServerFileEvent ev)
Specified by:
fileCheckedOut in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileCheckedOut(SJServerFileEvent)

fileCheckedIn

public void fileCheckedIn(SJServerFileEvent ev)
Specified by:
fileCheckedIn in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileCheckedIn(SJServerFileEvent)

fileCopied

public void fileCopied(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is new parent Project of file.

Specified by:
fileCopied in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileCopied(SJServerFileEvent)

fileMoved

public void fileMoved(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is new parent Project of file.

Specified by:
fileMoved in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileMoved(SJServerFileEvent)

fileRenamed

public void fileRenamed(SJServerFileEvent ev)
Specified by:
fileRenamed in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileRenamed(SJServerFileEvent)

fileShared

public void fileShared(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is new parent Project of file.

Specified by:
fileShared in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileShared(SJServerFileEvent)

fileBranched

public void fileBranched(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is parent Project in which file was branched.

Specified by:
fileBranched in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileBranched(SJServerFileEvent)

fileDescriptionModified

public void fileDescriptionModified(SJServerFileEvent ev)
Specified by:
fileDescriptionModified in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileDescriptionModified(SJServerFileEvent)

fileRemoved

public void fileRemoved(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is parent Project from which file was removed.

Specified by:
fileRemoved in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileRemoved(SJServerFileEvent)

fileDeleted

public void fileDeleted(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is parent Project from which file was deleted.

Specified by:
fileDeleted in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileDeleted(SJServerFileEvent)

fileShareRemoved

public void fileShareRemoved(SJServerFileEvent ev)
Description copied from interface: SJServerFileChangeListener
Target is parent Project from which file share was removed.

Specified by:
fileShareRemoved in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileShareRemoved(SJServerFileEvent)

fileCheckedOutUndone

public void fileCheckedOutUndone(SJServerFileEvent ev)
Specified by:
fileCheckedOutUndone in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileCheckedOutUndone(SJServerFileEvent)

fileRolledBackToPreviousVersion

public void fileRolledBackToPreviousVersion(SJServerFileEvent ev)
Specified by:
fileRolledBackToPreviousVersion in interface SJServerFileChangeListener
See Also:
SJServerFileChangeListener.fileRolledBackToPreviousVersion(SJServerFileEvent)

fileRestored

public void fileRestored(SJServerFileEvent ev)
Specified by:
fileRestored in interface SJServerFileChangeListener

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.