## org.w3c.jigedit.filters
Class PutListResource

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

public class PutListResource
extends FramedResource

Field Summary
`protected static int` `ATTR_AUTO_DELETE` Attribute index - The auto delete flag
`protected static int` `ATTR_AUTO_PUBLISH` Attribute index - The auto publish flag
`protected static int` `ATTR_FILE` Attribute index - The file used to store the modification list.
`protected static int` `ATTR_MAX_PUBLISHED` Attribute index - The max number of published entries stored
`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`
`static int` `FILE_CF` status: conflict
`static int` `FILE_DEL` status: deleted
`static int` `FILE_MG` status: File merged
`static int` `FILE_PB` status: File published
`static int` `FILE_UC` status: File unchanged
`protected static Serializer` `serializer`

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, co, id`

Fields inherited from class org.w3c.tools.resources.AttributeHolder
`attributes, values`

Constructor Summary
`PutListResource()`

Method Summary
`protected void` `addDelEntry(DeletedEntry e)` Add an entry into the putlist
`protected void` `addEntry(PutedEntry e)` Add an entry into the putlist
`protected void` `addPubEntry(PutedEntry e)` Add a published entry into the putlist.
`int` `confirmDelete(Request request)`
`protected int` `delete(DeletedEntry de)` Delete the file relative to the given entry.
`boolean` `getAutoDeleteFlag()` Get our auto delete flag.
`boolean` `getAutoPublishFlag()` Get our auto publish flag.
`java.io.File` `getCvsSpace()` Get this user's local CVS space root directory.
`protected java.util.Enumeration` `getDelEntries()` Get the deleted entries.
`protected java.util.Enumeration` `getDelEntriesKeys()` Get the deleted entries keys
`protected DeletedEntry` `getDelEntry(java.lang.String key)` Get the deleted entry relative to the given key.
`java.io.File` `getDelFile()` Get the file to use to store the edited list of deleted files.
`protected java.util.Enumeration` `getEntries()` Get the modified entries.
`protected java.util.Enumeration` `getEntriesKeys()` Get the modified entries keys
`protected PutedEntry` `getEntry(java.lang.String key)` Get the modified entry relative to the given key.
`java.io.File` `getFile()` Get the file to use to store the edited list of files.
`int` `getMaxPublishedEntryStored()` Get the max number of published entries stored in the putlist.
`java.io.File` `getPubFile()` Get the file to use to store the edited list of published files.
`protected java.util.Enumeration` `getPublishedEntries()` Get the published entries.
`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)` Initialize the frames of that framed resource.
`protected DeletedEntry` `lookupDelEntry(Request request)`
`protected PutedEntry` `lookupEntry(Request request)`
`void` `notifyUnload()` This resource is being unloaded.
`protected int` `publish(PutedEntry pe)` Publish the file relative to the given entry.
`protected void` `readDelList()` Restore the deleted list from the file.
`protected void` `readList()` Restore the list from the file.
`protected void` `readPubList()` Restore the published list from the file.
`void` `registerDeleteRequest(Request request)`
`int` `registerRequest(Request request)` Register the given request, which must has a PUT method.
`protected void` `removeDelEntry(java.lang.String key)` Remove a deleted entry from the putlist
`protected void` `removeEntry(java.lang.String key)` Remove a modified entry from the putlist
`protected void` `removeOldestPublishedEntry()` Remove the oldest published entry from the putlist.
`protected void` `removePubEntry(java.lang.String key)` Remove a published entry from the putlist
`protected void` `removeUnconfirmedDelEntries()`
`protected void` `setAutoDelete(boolean onoff)` Enable or disable the auto delete feature.
`protected void` `setAutoPublish(boolean onoff)` Enable or disable the auto publish feature.
`protected void` `setMaxPublishedEntryStored(int max)` Set the max number of published entries stored in the putlist.
`protected void` `write(java.io.File file, java.util.Enumeration enum)`
`protected void` `writeDelList()` Dump the current list of [ublished files back to disk.
`protected void` `writeList()` Dump the current list of edited files back to disk.
`protected void` `writePubList()` Dump the current list of published files back to disk.

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, setSilentValue, setSilentValue, 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, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetIdentifier, unsafeGetValue, updateAttributes`

Methods inherited from class org.w3c.tools.resources.AttributeHolder
`definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeGetString`

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

### FILE_PB

    public static final int FILE_PB

  status: File published

### FILE_UC

    public static final int FILE_UC

  status: File unchanged

### FILE_MG

    public static final int FILE_MG

  status: File merged

### FILE_CF

    public static final int FILE_CF

  status: conflict

### FILE_DEL

    public static final int FILE_DEL

  status: deleted

### 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.

### ATTR_AUTO_PUBLISH

    protected static int ATTR_AUTO_PUBLISH

  Attribute index - The auto publish flag

### ATTR_AUTO_DELETE

    protected static int ATTR_AUTO_DELETE

  Attribute index - The auto delete flag

### ATTR_MAX_PUBLISHED

    protected static int ATTR_MAX_PUBLISHED

  Attribute index - The max number of published entries stored

### serializer

    protected static Serializer serializer

Constructor Detail

### PutListResource

    public PutListResource()

Method Detail

### getAutoPublishFlag

    public boolean getAutoPublishFlag()

  Get our auto publish flag.
  Returns:
    a boolean.

### setAutoPublish

    protected void setAutoPublish(boolean onoff)

  Enable or disable the auto publish feature.
  Parameters:
    `onoff` - if onoff is true auto publish is enable.

### getAutoDeleteFlag

    public boolean getAutoDeleteFlag()

  Get our auto delete flag.
  Returns:
    a boolean.

### setAutoDelete

    protected void setAutoDelete(boolean onoff)

  Enable or disable the auto delete feature.
  Parameters:
    `onoff` - if onoff is true auto publish is enable.

### getMaxPublishedEntryStored

    public int getMaxPublishedEntryStored()

  Get the max number of published entries stored in the putlist.
  Returns:
    an int.

### setMaxPublishedEntryStored

    protected void setMaxPublishedEntryStored(int max)

  Set the max number of published entries stored in the putlist.
  Parameters:
    `max` - This number.

### getEntries

    protected java.util.Enumeration getEntries()

  Get the modified entries.
  Returns:
    an enumeration of PutedEntry
  See Also:
    `PutedEntry`

### getEntriesKeys

    protected java.util.Enumeration getEntriesKeys()

  Get the modified entries keys
  Returns:
    an enumeration of String

### getEntry

    protected PutedEntry getEntry(java.lang.String key)

  Get the modified entry relative to the given key.
  Parameters:
    `key` - The key relative to the PutedEntry
  Returns:
    a PutedEntry
  See Also:
    `PutedEntry`

### addEntry

    protected void addEntry(PutedEntry e)

  Add an entry into the putlist
  Parameters:
    `e` - the entry to add

### removeEntry

    protected void removeEntry(java.lang.String key)

  Remove a modified entry from the putlist
  Parameters:
    `key` - the key of the entry to remove

### getDelEntries

    protected java.util.Enumeration getDelEntries()

  Get the deleted entries.
  Returns:
    an enumeration of DeletedEntry
  See Also:
    `DeletedEntry`

### getDelEntriesKeys

    protected java.util.Enumeration getDelEntriesKeys()

  Get the deleted entries keys
  Returns:
    an enumeration of String

### getDelEntry

    protected DeletedEntry getDelEntry(java.lang.String key)

  Get the deleted entry relative to the given key.
  Parameters:
    `key` - The key relative to the DeletedEntry
  Returns:
    a DeletedEntry
  See Also:
    `DeletedEntry`

### addDelEntry

    protected void addDelEntry(DeletedEntry e)

  Add an entry into the putlist
  Parameters:
    `e` - the entry to add

### removeDelEntry

    protected void removeDelEntry(java.lang.String key)

  Remove a deleted entry from the putlist
  Parameters:
    `key` - the key of the entry to remove

### getPublishedEntries

    protected java.util.Enumeration getPublishedEntries()

  Get the published entries.
  Returns:
    an enumeration of PutedEntry
  See Also:
    `PutedEntry`

### removeOldestPublishedEntry

    protected void removeOldestPublishedEntry()

  Remove the oldest published entry from the putlist.

### addPubEntry

    protected void addPubEntry(PutedEntry e)

  Add a published entry into the putlist.
  Parameters:
    `e` - The published entry to add.
  See Also:
    `PutedEntry`

### removePubEntry

    protected void removePubEntry(java.lang.String key)

  Remove a published entry from the putlist
  Parameters:
    `key` - the key of the entry to remove

### 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()

  Get the file to use to store the edited list of published files.
  Returns:
    The file.

### getDelFile

    public java.io.File getDelFile()

  Get the file to use to store the edited list of deleted files.
  Returns:
    The file.

### 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.

### write

    protected void write(java.io.File file,
                         java.util.Enumeration enum)

### writeList

    protected void writeList()

  Dump the current list of edited files back to disk.

### writePubList

    protected void writePubList()

  Dump the current list of published files back to disk.

### writeDelList

    protected void writeDelList()

  Dump the current list of [ublished files back to disk.

### removeUnconfirmedDelEntries

    protected void removeUnconfirmedDelEntries()

### readList

    protected void readList()

  Restore the list from the file.

### readPubList

    protected void readPubList()

  Restore the published list from the file.

### readDelList

    protected void readDelList()

  Restore the deleted list from the file.

### lookupEntry

    protected PutedEntry lookupEntry(Request request)

### lookupDelEntry

    protected DeletedEntry lookupDelEntry(Request request)

### registerRequest

    public int registerRequest(Request request)

  Register the given request, which must has a PUT method.
  Parameters:
    `file` - The modified file.

### registerDeleteRequest

    public void registerDeleteRequest(Request request)

### confirmDelete

    public int confirmDelete(Request request)

### delete

    protected int delete(DeletedEntry de)

  Delete the file relative to the given entry.
  Parameters:
    `entry` - The DeletedEntry.
  Returns:
    FILE_UC, FILE_DEL

### publish

    protected int publish(PutedEntry pe)

  Publish the file relative to the given entry.
  Parameters:
    `entry` - The PutedEntry.
  Returns:
    FILE_UC, FILE_CF, FILE_PB, FILE_MG

### notifyUnload

    public void notifyUnload()

  Description copied from class: FramedResource
  This resource is being unloaded. The resource is being unloaded from memory, perform any additional cleanup required.
  Overrides:
    notifyUnload in class FramedResource

### initialize

    public void initialize(java.lang.Object[] values)

  Description copied from class: FramedResource
  Initialize the frames of that framed resource.
  Overrides:
    initialize in class FramedResource
  Tags copied from class: FramedResource
  Parameters:
    `values` - Default attribute values.