org.w3c.jigsaw.filters
Class PutListResource

java.lang.Object
  |
  +--org.w3c.tools.resources.AttributeHolder
        |
        +--org.w3c.tools.resources.Resource
              |
              +--org.w3c.tools.resources.FramedResource
                    |
                    +--org.w3c.jigsaw.filters.PutListResource

public class PutListResource
extends org.w3c.tools.resources.FramedResource


Field Summary
protected static int ATTR_FILE
          Attribute index - The file used to store the modification list.
protected static int ATTR_ROOT
          Attribute index - The web server public space.
protected static int ATTR_SPACE
          Attribute index - The user's local space.
protected static boolean debug
           
 
Fields inherited from class org.w3c.tools.resources.FramedResource
ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener
 
Fields inherited from class org.w3c.tools.resources.Resource
ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL
 
Fields inherited from class org.w3c.tools.resources.AttributeHolder
attributes, slowpickle, values
 
Constructor Summary
PutListResource()
           
 
Method Summary
 void addEntry(PutedEntry e)
           
 void addPubEntry(PutedEntry e)
           
 java.io.File getCvsSpace()
          Get this user's local CVS space root directory.
 java.io.File getFile()
          Get the file to use to store the edited list of files.
 java.io.File getPubFile()
           
 java.io.File getRoot()
          Get the root directory of the public server to update.
protected  java.io.File getServerFile(java.io.File file)
          Compute the path of the public file for the given local file.
 void initialize(java.lang.Object[] values)
           
 PutedEntry lookupEntry(org.w3c.jigsaw.http.Request request)
           
 void notifyUnload()
           
 void readList()
          Restore the list from the file.
 void readPubList()
          Restore the published list from the file.
 void registerRequest(org.w3c.jigsaw.http.Request request)
          Register the given request, which must has a PUT method.
 void writeList()
          Dump the current list of edited files back to disk.
 void writePubList()
           
 
Methods inherited from class org.w3c.tools.resources.FramedResource
addAttributeChangedListener, addStructureChangedListener, collectFramesReference, delete, disableEvent, displayEvent, enableEvent, eventDisabled, fireAttributeChangeEvent, fireStructureChangedEvent, fireStructureChangedEvent, frameAdded, frameModified, frameRemoved, getClone, getFrame, getFrame, getFrameReference, getFrameReference, getFramesReference, getOid, lookup, markModified, perform, performFrames, postAttributeChangeEvent, postEvent, postStructureChangedEvent, postStructureChangedEvent, processEvent, registerFrame, registerFrameIfNone, removeAttributeChangedListener, removeStructureChangedListener, setValue, unregisterFrame
 
Methods inherited from class org.w3c.tools.resources.Resource
acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getLastModified, getParent, getResourceReference, getServer, getSpace, getSpaceEntry, getStoreEntry, getURLPath, getValue, getValue, isInitialized, setContext, setContext, setValue, updateAttributes
 
Methods inherited from class org.w3c.tools.resources.AttributeHolder
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, initialize, lookupAttribute, pickle, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unpickle, unpickle, unpickle, unpickleInstance, unpickleInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static final boolean debug

ATTR_FILE

protected static int ATTR_FILE
Attribute index - The file used to store the modification list.

ATTR_SPACE

protected static int ATTR_SPACE
Attribute index - The user's local space.

ATTR_ROOT

protected static int ATTR_ROOT
Attribute index - The web server public space.
Constructor Detail

PutListResource

public PutListResource()
Method Detail

getServerFile

protected java.io.File getServerFile(java.io.File file)
Compute the path of the public file for the given local file. This method uses the space and root attributes to translate the path of the given file from the user's local space to the public (server) space.
Returns:
A File instance, or null.

getFile

public java.io.File getFile()
Get the file to use to store the edited list of files.
Returns:
The file.

getPubFile

public java.io.File getPubFile()

getRoot

public java.io.File getRoot()
Get the root directory of the public server to update.
Returns:
The root directory of the public server space, supposed to be controled by CVS.

getCvsSpace

public java.io.File getCvsSpace()
Get this user's local CVS space root directory.
Returns:
The usre's root of the CVS local space, assumed to be under CVS control.

writeList

public void writeList()
Dump the current list of edited files back to disk.

writePubList

public void writePubList()

readList

public void readList()
Restore the list from the file.

readPubList

public void readPubList()
Restore the published list from the file.

addEntry

public void addEntry(PutedEntry e)

addPubEntry

public void addPubEntry(PutedEntry e)

lookupEntry

public PutedEntry lookupEntry(org.w3c.jigsaw.http.Request request)

registerRequest

public void registerRequest(org.w3c.jigsaw.http.Request request)
Register the given request, which must has a PUT method.
Parameters:
file - The modified file.

notifyUnload

public void notifyUnload()
Overrides:
notifyUnload in class org.w3c.tools.resources.FramedResource

initialize

public void initialize(java.lang.Object[] values)
Overrides:
initialize in class org.w3c.tools.resources.FramedResource