org.xoe.editor.data
Class Main

org.xoe.servlet.XoeServlet
  |
  +--org.xoe.editor.data.Main
All Implemented Interfaces:
Constants, IApplication, IService, IViewable, ServiceFactory

public abstract class Main
extends XoeServlet
implements ServiceFactory


Field Summary
protected  String currentState
           
protected static String DEFAULT
           
protected  org.xoe.core.dom.XDocument defaultMenu
           
protected static String DISPLAYING_ITEM
           
protected static String EDITING_ITEM
           
protected static String EDITING_NOTE
           
protected static String ITEM_TEMPLATE
           
protected  org.xoe.display.dom.xhtml.Dialog itemConfirmDeleteDialog
           
protected  org.xoe.core.dom.XDocument itemDisplayMenu
           
protected  org.xoe.core.dom.XDocument itemDisplayTitle
           
protected  org.xoe.core.dom.XDocument itemDisplayView
           
protected  org.xoe.core.dom.XDocument itemEditMenu
           
protected  org.xoe.core.dom.XDocument itemEditTitle
           
protected  org.xoe.core.dom.XDocument itemEditView
           
protected  org.xoe.core.dom.XDocument itemSelectMenu
           
protected  org.xoe.core.dom.XDocument itemSelectTitle
           
protected  org.xoe.core.dom.XDocument itemSelectView
           
protected  org.w3c.dom.Element menuFrame
           
protected  org.xoe.display.dom.xhtml.Dialog noteConfirmDeleteDialog
           
protected  org.xoe.core.dom.XDocument noteEditMenu
           
protected  org.xoe.core.dom.XDocument noteEditTitle
           
protected  org.xoe.core.dom.XDocument noteEditView
           
protected  String previousState
           
protected static String SELECTING_ITEM
           
protected  org.xoe.core.xpath.XPathContext xpathContext
           
 
Fields inherited from class org.xoe.servlet.XoeServlet
clipboardServiceQuery, defaultCallback, historyServiceQuery, propagateHistory, USER_CONFIG_FILENAME, userConfig
 
Fields inherited from interface org.xoe.services.IApplication
FEATURE_CONFIG, FUNCTIONALITY, INTERFACE
 
Fields inherited from interface org.xoe.core.Constants
ACTION_ATTR, ADD, ADD_APP, AMPERSAND_KEY, AMPERSAND_SYMBOL, AMPERSAND_SYMBOL_STRING, APOSTROPHE_KEY, APOSTROPHE_SYMBOL, ASCENDING_SORT, BACK, BANNER_ATTR, BEEP, BEEP_PROPERTY, CONTEXT_ATTR, COPYRIGHT_KEY, COPYRIGHT_SYMBOL, COUNTRY_PROPERTY, DATA_DOC, DEFAULT_BOOTSTRAP, DEFAULT_NAMESPACE, DEFAULT_THEME, DEFAULT_THEMES_DIR, DEFAULT_VIEW, DELETE, DESCENDING_SORT, DISPLAY, DISPLAY_VIEW, DOCTYPE_NAME_NS_XHTML, DOUBLE_QUOTE_KEY, DOUBLE_QUOTE_SYMBOL, EDIT, EDIT_ITEM_VIEW, EXTENSION_ALL, EXTENSION_DTD, EXTENSION_HTML, EXTENSION_LNK, EXTENSION_WML, EXTENSION_XHTML, EXTENSION_XML, EXTENSION_XOE, EXTENSION_XOE_CONFIG, EXTENSION_ZIP, FEATURE_DOCTYPE_NAME_NS, FEATURE_EXTENSION, FEATURE_MIMETYPE, FILE_PROTOCOL, FORWARD, FUNCTION_CONTENT_HANDLER, GREATER_THAN_KEY, GREATER_THAN_SYMBOL, HIDE_IF_ATTR, HOMEDIR_PROPERTY, HREF_ATTR, INSERT_BEFORE_ATTR, LANGUAGE_PROPERTY, LAUNCH, LESSER_THAN_KEY, LESSER_THAN_SYMBOL, LOADTHEME, LOGGING_PROPERTY, MID_DOT_KEY, MID_DOT_SYMBOL, MIMETYPE_ALL, MIMETYPE_APPLICATION_XOE, MIMETYPE_APPLICATION_ZIP, MIMETYPE_STASHDIR, MIMETYPE_TEXT_HTML, MIMETYPE_TEXT_PLAIN, MIMETYPE_TEXT_VND_TVT_LNK, MIMETYPE_TEXT_WML, MIMETYPE_TEXT_XML, MIMETYPE_TEXT_XML_DTD, MIMETYPE_UNKNOWN, NAME_ATTR, NAMESPACE_SEPARATOR, NEW, NEW_ITEM_VIEW, NO_PATH, NON_BREAKING_SPACE_KEY, NON_BREAKING_SPACE_SYMBOL, NUM_LAST_APPS, ONCHANGE_ATTR, ONCLICK_ATTR, ONKEYPRESS_ATTR, ONLOAD_ATTR, ONMOUSEDOWN_ATTR, ONMOUSEOUT_ATTR, ONMOUSEOVER_ATTR, ONMOUSEUP_ATTR, PACKAGE_ARCHIVE_ROOT, PARENT_FRAME, PKG_ARCHIVE_ATTR, PKG_URI_ATTR, PKG_WORKSPACE_ATTR, PREVIOUS_DIR, PROPERTY_PREFIX, QUERY_DELIMITER, REFRESH, RESET, SAVE, SCREEN_COLORS_PROPERTY, SCREEN_HEIGHT_PROPERTY, SCREEN_TYPE_PROPERTY, SCREEN_WIDTH_PROPERTY, SCRIPT_PROPERTY, SCRIPT_SUPPORT, SELECT, SORT_BANNER_ATTR, SORT_ORDER_ATTR, SRC_ATTR, STASH_DIR_PROPERTY, STASH_FILE_SEPARATOR, STASH_PROTOCOL, STOP, STYLE_ATTR, TEMP_DIR, THEME_PROPERTY, THEMES_DIR_PROPERTY, TOP, TRIGGER_ATTR, UNICODE_DECIMAL_SYMBOL, UNICODE_HEX_SYMBOL, UNKNOWN_ICON, UNSET_NODE_TYPE, URL_CONTEXT_ATTR, USER_NAME, USERDIR_PROPERTY, VALUE_ATTR, WML_NAMESPACE, XHTML_NAMESPACE, XML, XML_PREFIX_NAMESPACE, XMLNS, XMLNS_NAMESPACE, XOE_CONFIG_DOCTYPE_NAME_NS, XOE_LOCALIZE, XPATH_ATTR
 
Constructor Summary
Main()
           
 
Method Summary
protected  org.xoe.display.dom.xhtml.Dialog buildDialog(org.xoe.core.dom.XDocument dialogView)
           
protected  void changeState(String newState)
           
protected  void createNewItem()
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          the default behaviour of XoeServlet is to render the file default.xhtml
protected  org.w3c.dom.Node fetchItem(String itemDocURI)
           
protected abstract  boolean foundData(org.w3c.dom.Node n, String value)
          return true if enough data exists to consider this a true data element
protected  org.w3c.dom.Node getCurrentItem()
           
protected abstract  String getDoctypeName()
           
protected  String getFileNamePrefix()
           
protected abstract  String getFileNamePrefix(org.xoe.core.dom.XDocument file)
          return a unique string to use as the stash name for a new item
protected  org.xoe.display.dom.xhtml.Dialog getItemConfirmDeleteDialog()
           
protected  org.xoe.core.dom.XDocument getItemDisplayView()
           
protected  org.xoe.core.dom.XDocument getItemDocument()
           
protected  org.xoe.core.dom.XDocument getItemEditView()
           
protected abstract  String getItemNamespaceURI()
           
protected  org.xoe.core.dom.XDocument getItemSelectView()
           
protected  org.xoe.display.dom.xhtml.Dialog getNoteConfirmDeleteDialog()
           
protected  org.xoe.core.dom.XDocument getNoteEditView()
           
protected  URL getNoteIconURL()
           
protected  org.xoe.core.dom.XDocument getPage(String viewNameParam, String defaultName)
           
protected  void handleItem_cancelDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_confirmDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_createNew(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_display(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_edit(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_remove(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_save(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleItem_select(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleMenu()
           
protected  void handleNote_cancelDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleNote_confirmDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleNote_edit(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleNote_remove(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void handleNote_save(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
abstract  IService newInstance()
           
protected  void removeCurrentItem()
           
protected  void restoreTitle()
           
protected  void route(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void saveCurrentItem()
           
protected  void saveEdits(javax.servlet.http.HttpServletRequest req)
           
protected  boolean saveEdits(javax.servlet.http.HttpServletRequest req, org.w3c.dom.Node contextNode)
           
protected  void setCurrentItem(org.w3c.dom.Node item)
           
protected  void setItemDisplayMenu()
           
protected  void setItemDisplayTitle()
           
protected  void setItemEditMenu()
           
protected  void setItemEditTitle()
           
protected  void setItemSelectMenu()
           
protected  void setItemSelectTitle()
           
protected  void setMenu(org.w3c.dom.Document doc)
           
protected  void setNoteEditMenu()
           
protected  void setNoteEditTitle()
           
 void setXPathContext(org.xoe.core.xpath.XPathContext xpathContext)
           
 
Methods inherited from class org.xoe.servlet.XoeServlet
createCallbacks, createCallbacks, doesPropagateHistory, getArchiveURI, getBackURLString, getDataDir, getDisplayedDocument, getDocumentViewer, getFeatures, getFileFromPackageWorkspace, getFunctionalities, getInformation, getInterfaces, getPackageName, getPackageURI, getRelativeDocument, getRelativeSrc, getServletFeatures, getServletFunctionalities, getServletInterfaces, getTitleDocument, getURLParameter, getUserConfig, getViewableDocument, getWorkspaceURI, handleClipboard, handleHistory, init, init, populateFields, populateFields, redirect, setDisplayedDocument, setPropagateHistory, setTitleDocument, trackHistory
 

Field Detail

DEFAULT

protected static final String DEFAULT

SELECTING_ITEM

protected static final String SELECTING_ITEM

DISPLAYING_ITEM

protected static final String DISPLAYING_ITEM

EDITING_ITEM

protected static final String EDITING_ITEM

EDITING_NOTE

protected static final String EDITING_NOTE

ITEM_TEMPLATE

protected static final String ITEM_TEMPLATE

currentState

protected String currentState

previousState

protected String previousState

defaultMenu

protected org.xoe.core.dom.XDocument defaultMenu

menuFrame

protected org.w3c.dom.Element menuFrame

itemSelectView

protected org.xoe.core.dom.XDocument itemSelectView

itemSelectTitle

protected org.xoe.core.dom.XDocument itemSelectTitle

itemSelectMenu

protected org.xoe.core.dom.XDocument itemSelectMenu

itemDisplayView

protected org.xoe.core.dom.XDocument itemDisplayView

itemDisplayTitle

protected org.xoe.core.dom.XDocument itemDisplayTitle

itemDisplayMenu

protected org.xoe.core.dom.XDocument itemDisplayMenu

itemEditView

protected org.xoe.core.dom.XDocument itemEditView

itemEditTitle

protected org.xoe.core.dom.XDocument itemEditTitle

itemEditMenu

protected org.xoe.core.dom.XDocument itemEditMenu

itemConfirmDeleteDialog

protected org.xoe.display.dom.xhtml.Dialog itemConfirmDeleteDialog

noteEditView

protected org.xoe.core.dom.XDocument noteEditView

noteEditTitle

protected org.xoe.core.dom.XDocument noteEditTitle

noteEditMenu

protected org.xoe.core.dom.XDocument noteEditMenu

noteConfirmDeleteDialog

protected org.xoe.display.dom.xhtml.Dialog noteConfirmDeleteDialog

xpathContext

protected org.xoe.core.xpath.XPathContext xpathContext
Constructor Detail

Main

public Main()
Method Detail

newInstance

public abstract IService newInstance()
Specified by:
newInstance in interface ServiceFactory

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     IOException
Description copied from class: XoeServlet
the default behaviour of XoeServlet is to render the file default.xhtml
Overrides:
doGet in class XoeServlet

changeState

protected void changeState(String newState)

restoreTitle

protected void restoreTitle()
                     throws IOException

getItemNamespaceURI

protected abstract String getItemNamespaceURI()

getDoctypeName

protected abstract String getDoctypeName()

handleItem_select

protected void handleItem_select(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws javax.servlet.ServletException,
                                 IOException

handleItem_display

protected void handleItem_display(javax.servlet.http.HttpServletRequest req,
                                  javax.servlet.http.HttpServletResponse res)
                           throws javax.servlet.ServletException,
                                  IOException

handleItem_edit

protected void handleItem_edit(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
                        throws javax.servlet.ServletException,
                               IOException

handleItem_save

protected void handleItem_save(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
                        throws javax.servlet.ServletException,
                               IOException

handleItem_confirmDelete

protected void handleItem_confirmDelete(javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res)
                                 throws javax.servlet.ServletException,
                                        IOException

handleItem_cancelDelete

protected void handleItem_cancelDelete(javax.servlet.http.HttpServletRequest req,
                                       javax.servlet.http.HttpServletResponse res)
                                throws javax.servlet.ServletException,
                                       IOException

handleItem_remove

protected void handleItem_remove(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws javax.servlet.ServletException,
                                 IOException

handleItem_createNew

protected void handleItem_createNew(javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws javax.servlet.ServletException,
                                    IOException

handleNote_edit

protected void handleNote_edit(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
                        throws javax.servlet.ServletException,
                               IOException

handleNote_save

protected void handleNote_save(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
                        throws javax.servlet.ServletException,
                               IOException

handleNote_confirmDelete

protected void handleNote_confirmDelete(javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res)
                                 throws javax.servlet.ServletException,
                                        IOException

handleNote_cancelDelete

protected void handleNote_cancelDelete(javax.servlet.http.HttpServletRequest req,
                                       javax.servlet.http.HttpServletResponse res)
                                throws javax.servlet.ServletException,
                                       IOException

handleNote_remove

protected void handleNote_remove(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws javax.servlet.ServletException,
                                 IOException

route

protected void route(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     IOException

handleMenu

protected void handleMenu()
                   throws javax.servlet.ServletException,
                          IOException

setMenu

protected void setMenu(org.w3c.dom.Document doc)

getPage

protected org.xoe.core.dom.XDocument getPage(String viewNameParam,
                                             String defaultName)

getItemSelectView

protected org.xoe.core.dom.XDocument getItemSelectView()
                                                throws IOException

setItemSelectTitle

protected void setItemSelectTitle()
                           throws IOException

setItemSelectMenu

protected void setItemSelectMenu()
                          throws IOException

getItemDisplayView

protected org.xoe.core.dom.XDocument getItemDisplayView()
                                                 throws IOException

setItemDisplayTitle

protected void setItemDisplayTitle()
                            throws IOException

setItemDisplayMenu

protected void setItemDisplayMenu()
                           throws IOException

getItemEditView

protected org.xoe.core.dom.XDocument getItemEditView()
                                              throws IOException

setItemEditTitle

protected void setItemEditTitle()
                         throws IOException

setItemEditMenu

protected void setItemEditMenu()
                        throws IOException

getNoteEditView

protected org.xoe.core.dom.XDocument getNoteEditView()
                                              throws IOException

setNoteEditTitle

protected void setNoteEditTitle()
                         throws IOException

setNoteEditMenu

protected void setNoteEditMenu()
                        throws IOException

buildDialog

protected org.xoe.display.dom.xhtml.Dialog buildDialog(org.xoe.core.dom.XDocument dialogView)

getItemConfirmDeleteDialog

protected org.xoe.display.dom.xhtml.Dialog getItemConfirmDeleteDialog()
                                                               throws IOException

getNoteConfirmDeleteDialog

protected org.xoe.display.dom.xhtml.Dialog getNoteConfirmDeleteDialog()
                                                               throws IOException

foundData

protected abstract boolean foundData(org.w3c.dom.Node n,
                                     String value)
return true if enough data exists to consider this a true data element

saveEdits

protected void saveEdits(javax.servlet.http.HttpServletRequest req)
                  throws IOException

saveEdits

protected boolean saveEdits(javax.servlet.http.HttpServletRequest req,
                            org.w3c.dom.Node contextNode)
                     throws IOException

saveCurrentItem

protected void saveCurrentItem()
                        throws IOException

getFileNamePrefix

protected String getFileNamePrefix()

getFileNamePrefix

protected abstract String getFileNamePrefix(org.xoe.core.dom.XDocument file)
return a unique string to use as the stash name for a new item

removeCurrentItem

protected void removeCurrentItem()
                          throws IOException

setXPathContext

public void setXPathContext(org.xoe.core.xpath.XPathContext xpathContext)

getNoteIconURL

protected URL getNoteIconURL()

createNewItem

protected void createNewItem()
                      throws javax.servlet.ServletException,
                             IOException

fetchItem

protected org.w3c.dom.Node fetchItem(String itemDocURI)
                              throws javax.servlet.ServletException,
                                     IOException

getCurrentItem

protected org.w3c.dom.Node getCurrentItem()

setCurrentItem

protected void setCurrentItem(org.w3c.dom.Node item)

getItemDocument

protected org.xoe.core.dom.XDocument getItemDocument()