com.swfit.core.xhtml.publish
Class XHTMLPublishedObjectList

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--com.swfit.core.xhtml.publish.XHTMLPublishedObjectList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
XHTMLPubObjLstDefault

public abstract class XHTMLPublishedObjectList
extends java.util.Hashtable

The abstract XHTMLPublishedObjectList is a list of XHTMLPublishedObjects, with various ways of storing, retrieving and sorting the objects. All subclasses must implement the blankXHTMLPublishedObject() method.

Since:
SWFIT1.0
Version:
$Revision: 1.1 $ $Date: 2003/02/02 20:47:25 $
Author:
Olaf Havnes
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 java.lang.String CAT
           
static int CREATED_SORT
           
static int DEFAULT_SORT
           
static int DESCRIPTION_SORT
           
static java.lang.String MAX_CODE
          For storing and retrieving the XHTMLPublishedObjectList
static int MAX_DESCRIPTION_SIZE
           
static int MODIFIED_SORT
           
static java.lang.String NUM
          For storing and retrieving the XHTMLPublishedObjectList
static int ORDER_SORT
           
protected  XHTMLPublishFolder publish_folder
          The resources under a publish folder.
static java.lang.String[] SORT_METHOD_TYPES
           
static int[] SORT_METHODS
           
 java.lang.String SSI_DISABLE
           
 
Constructor Summary
XHTMLPublishedObjectList(XHTMLPublishFolder publish_folder, java.io.File data_file)
          Build the XHTMLPublishedObjectList from various inputs.
 
Method Summary
 XHTMLPublishedObject[] all(boolean filter_published)
          Sort the XHTMLPublishedObject sideways, upside down and any other way.
 XHTMLPublishedObject[] allSorted(boolean filter_published, int which_comparator)
           
 XHTMLArticleRenderer articleRenderer()
           
 XHTMLPublishedObjectList authorList()
           
protected abstract  XHTMLPublishedObject blankObject(int id)
          All subclasses must implement this method to put their mark on the XHTMLPublishedObject.
 XHTMLPublishedObjectList categoryList()
           
 XHTMLPublishedObject[] categorySorted()
          The more complex comparing methods.
protected static java.lang.String chopDescription(java.lang.String description)
           
 XHTMLPublishedObject createXHTMLPublishedObject()
          Create and initiate a new XHTMLPublishedObject, incrementing the max_code int.
 XHTMLPublishedObject createXHTMLPublishedObject(int id)
          Create and initiate a new XHTMLPublishedObject with a given id.
 java.io.File dataFile(XHTMLPublishedObject xpobj)
           
abstract  java.io.File defaultXHTMLRepresentation()
          All XHTMLPublishedObjectLists should point to some XHTML representation so that searches will have somewhere to point no matter what kind of list it is.
protected abstract  java.lang.String describeObject(XHTMLPublishedObject xpobj)
           
 java.lang.String describeXHTMLPublishedObject(XHTMLPublishedObject xpobj)
          All subclasses must implement this method to generate a description of the the XHTMLPublishedObject for the forms.
 java.lang.String[][] descriptionAndID(boolean filter_published, int which_comparator)
          This method will only be used when generating forms.
protected abstract  java.lang.StringBuffer displayObject(java.lang.StringBuffer str_b, XHTMLPublishedObject xpobj)
          All subclasses must implement this method to generate a brief XHTML list of all the XHTMLPublishedObjects.
 java.lang.String displayObject(XHTMLPublishedObject xpobj)
           
abstract  XHTMLPublishedObject[] displaySorted()
          Generates a XHTML file that contains a searchable representation of all the published objects in this list.
 void doSort(java.lang.Object[] objects, int which_comparator)
           
abstract  void exportXHTMLPublishedObject(XHTMLPublishedObject xpobj)
          Export a XHTMLPublishedObject.
 java.io.File FlashFile(java.lang.String name)
           
abstract  void generateOutLists()
          Should this XHTMLPublishedObjectList generate some lists to be used by flash / SSI ?
 XHTMLPublishedObject getAuthor(int i)
           
 XHTMLPublishedObject getCategory(int i)
           
 XHTMLPublishedObject getMedia(int i)
           
 XHTMLPublishedObject getXHTMLPublishedObject(int id)
           
 java.io.File ImageListFile(java.lang.String prefix, int size)
           
 void loadData()
          Read the data from disk, parse and sort.
 XHTMLPublishedObjectList mediaList()
           
 int newCode()
           
protected abstract  java.lang.String objectListTitle(XHTMLPublishedObject xpobj)
          All XHTMLPublishedObjectLists must implement this method to sub-sort the list of XHTMLPublishedObject.
 java.lang.String objectURLString(XHTMLPublishedObject xpobj)
          The different URLs and outfiles applied to a specific XHTMLPublishedObject.
abstract  java.lang.String[][] outFiles()
          Should the content of this XHTMLPublishedObjectLists be exported to a set of flash digestable files?
 XHTMLPublishedObject[] outfileSorted()
          The more complex comparing methods.
protected abstract  void prepareGet(XHTMLPublishedObject xpobj)
           
protected abstract  void preparePut(XHTMLPublishedObject xpobj)
           
protected abstract  void prepareRemove(XHTMLPublishedObject xpobj)
           
 XHTMLPublishedObject putXHTMLPublishedObject(XHTMLPublishedObject xpobj)
          Wraps around the hashtable methods.
 XHTMLPublishedObject removeXHTMLPublishedObject(int id)
           
 void saveDefaultXHTMLRepresentation()
           
abstract  java.lang.String searchXHTMLPublishedObject(XHTMLPublishedObject xpobj)
          All subclasses must implement this method to generate appropriate searchable text.
 void setAuthorList(XHTMLPublishedObjectList author_list)
           
 void setCategoryList(XHTMLPublishedObjectList category_list)
           
 void setMediaList(XHTMLPublishedObjectList media_list)
           
 void storeData()
          Write the data to disk.
 java.lang.String subFolder()
          What sub folder is the resources stored in ?
abstract  java.lang.String typeCode()
          What kind of lis is this ?
 java.io.File XHTMLFile(XHTMLPublishedObject xpobj)
           
 java.io.File XHTMLListFile(java.lang.String name)
           
abstract  java.io.File XHTMLRepresentation(XHTMLPublishedObject xpobj)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_CODE

public static final java.lang.String MAX_CODE
For storing and retrieving the XHTMLPublishedObjectList

NUM

public static final java.lang.String NUM
For storing and retrieving the XHTMLPublishedObjectList

MAX_DESCRIPTION_SIZE

public static final int MAX_DESCRIPTION_SIZE

publish_folder

protected final XHTMLPublishFolder publish_folder
The resources under a publish folder.

DESCRIPTION_SORT

public static final int DESCRIPTION_SORT

ORDER_SORT

public static final int ORDER_SORT

CREATED_SORT

public static final int CREATED_SORT

MODIFIED_SORT

public static final int MODIFIED_SORT

DEFAULT_SORT

public static final int DEFAULT_SORT

SORT_METHODS

public static final int[] SORT_METHODS

SORT_METHOD_TYPES

public static final java.lang.String[] SORT_METHOD_TYPES

CAT

public final java.lang.String CAT

SSI_DISABLE

public final java.lang.String SSI_DISABLE
Constructor Detail

XHTMLPublishedObjectList

public XHTMLPublishedObjectList(XHTMLPublishFolder publish_folder,
                                java.io.File data_file)
Build the XHTMLPublishedObjectList from various inputs.
Method Detail

chopDescription

protected static final java.lang.String chopDescription(java.lang.String description)

descriptionAndID

public final java.lang.String[][] descriptionAndID(boolean filter_published,
                                                   int which_comparator)
This method will only be used when generating forms.

describeXHTMLPublishedObject

public final java.lang.String describeXHTMLPublishedObject(XHTMLPublishedObject xpobj)
All subclasses must implement this method to generate a description of the the XHTMLPublishedObject for the forms.

describeObject

protected abstract java.lang.String describeObject(XHTMLPublishedObject xpobj)

objectListTitle

protected abstract java.lang.String objectListTitle(XHTMLPublishedObject xpobj)
                                             throws java.io.IOException
All XHTMLPublishedObjectLists must implement this method to sub-sort the list of XHTMLPublishedObject.

displayObject

protected abstract java.lang.StringBuffer displayObject(java.lang.StringBuffer str_b,
                                                        XHTMLPublishedObject xpobj)
                                                 throws java.io.IOException
All subclasses must implement this method to generate a brief XHTML list of all the XHTMLPublishedObjects.

displayObject

public final java.lang.String displayObject(XHTMLPublishedObject xpobj)
                                     throws java.io.IOException

searchXHTMLPublishedObject

public abstract java.lang.String searchXHTMLPublishedObject(XHTMLPublishedObject xpobj)
All subclasses must implement this method to generate appropriate searchable text.

createXHTMLPublishedObject

public XHTMLPublishedObject createXHTMLPublishedObject()
                                                throws java.io.IOException
Create and initiate a new XHTMLPublishedObject, incrementing the max_code int.

createXHTMLPublishedObject

public XHTMLPublishedObject createXHTMLPublishedObject(int id)
Create and initiate a new XHTMLPublishedObject with a given id.

exportXHTMLPublishedObject

public abstract void exportXHTMLPublishedObject(XHTMLPublishedObject xpobj)
                                         throws java.io.IOException
Export a XHTMLPublishedObject.

blankObject

protected abstract XHTMLPublishedObject blankObject(int id)
All subclasses must implement this method to put their mark on the XHTMLPublishedObject.

defaultXHTMLRepresentation

public abstract java.io.File defaultXHTMLRepresentation()
All XHTMLPublishedObjectLists should point to some XHTML representation so that searches will have somewhere to point no matter what kind of list it is.

XHTMLRepresentation

public abstract java.io.File XHTMLRepresentation(XHTMLPublishedObject xpobj)

outFiles

public abstract java.lang.String[][] outFiles()
Should the content of this XHTMLPublishedObjectLists be exported to a set of flash digestable files?

typeCode

public abstract java.lang.String typeCode()
What kind of lis is this ?

subFolder

public final java.lang.String subFolder()
What sub folder is the resources stored in ?

displaySorted

public abstract XHTMLPublishedObject[] displaySorted()
Generates a XHTML file that contains a searchable representation of all the published objects in this list.

saveDefaultXHTMLRepresentation

public final void saveDefaultXHTMLRepresentation()
                                          throws java.io.IOException

generateOutLists

public abstract void generateOutLists()
                               throws java.io.IOException
Should this XHTMLPublishedObjectList generate some lists to be used by flash / SSI ?

putXHTMLPublishedObject

public XHTMLPublishedObject putXHTMLPublishedObject(XHTMLPublishedObject xpobj)
                                             throws java.io.IOException
Wraps around the hashtable methods.

preparePut

protected abstract void preparePut(XHTMLPublishedObject xpobj)
                            throws java.io.IOException

getXHTMLPublishedObject

public XHTMLPublishedObject getXHTMLPublishedObject(int id)
                                             throws java.io.IOException

prepareGet

protected abstract void prepareGet(XHTMLPublishedObject xpobj)
                            throws java.io.IOException

removeXHTMLPublishedObject

public XHTMLPublishedObject removeXHTMLPublishedObject(int id)
                                                throws java.io.IOException

prepareRemove

protected abstract void prepareRemove(XHTMLPublishedObject xpobj)
                               throws java.io.IOException

newCode

public int newCode()
            throws java.io.IOException

articleRenderer

public final XHTMLArticleRenderer articleRenderer()

loadData

public final void loadData()
                    throws java.io.IOException
Read the data from disk, parse and sort.

storeData

public final void storeData()
                     throws java.io.IOException
Write the data to disk.

all

public final XHTMLPublishedObject[] all(boolean filter_published)
Sort the XHTMLPublishedObject sideways, upside down and any other way. Maybe these arrays should be cached for faster access ?

allSorted

public final XHTMLPublishedObject[] allSorted(boolean filter_published,
                                              int which_comparator)

doSort

public final void doSort(java.lang.Object[] objects,
                         int which_comparator)

outfileSorted

public final XHTMLPublishedObject[] outfileSorted()
The more complex comparing methods. Sort by index and then by outfile.

categorySorted

public final XHTMLPublishedObject[] categorySorted()
The more complex comparing methods. Sort by modified date and then by category.

setCategoryList

public final void setCategoryList(XHTMLPublishedObjectList category_list)

categoryList

public final XHTMLPublishedObjectList categoryList()

getCategory

public final XHTMLPublishedObject getCategory(int i)
                                       throws java.io.IOException

setAuthorList

public final void setAuthorList(XHTMLPublishedObjectList author_list)

authorList

public final XHTMLPublishedObjectList authorList()

getAuthor

public final XHTMLPublishedObject getAuthor(int i)
                                     throws java.io.IOException

setMediaList

public final void setMediaList(XHTMLPublishedObjectList media_list)

mediaList

public final XHTMLPublishedObjectList mediaList()

getMedia

public final XHTMLPublishedObject getMedia(int i)
                                    throws java.io.IOException

objectURLString

public final java.lang.String objectURLString(XHTMLPublishedObject xpobj)
                                       throws java.io.IOException
The different URLs and outfiles applied to a specific XHTMLPublishedObject.

dataFile

public final java.io.File dataFile(XHTMLPublishedObject xpobj)

XHTMLFile

public final java.io.File XHTMLFile(XHTMLPublishedObject xpobj)

FlashFile

public final java.io.File FlashFile(java.lang.String name)

XHTMLListFile

public final java.io.File XHTMLListFile(java.lang.String name)

ImageListFile

public final java.io.File ImageListFile(java.lang.String prefix,
                                        int size)


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.