com.ibm.xsp.model
Class AbstractDocumentDataSource

java.lang.Object
  extended by com.ibm.xsp.complex.ValueBindingObjectImpl
      extended by com.ibm.xsp.model.AbstractDataSource
          extended by com.ibm.xsp.model.AbstractDocumentDataSource
All Implemented Interfaces:
ComponentBindingObject, ValueBindingObject, DataPublishingObject, DataSource, DocumentDataSource, javax.faces.component.StateHolder
Direct Known Subclasses:
DominoDocumentData

public abstract class AbstractDocumentDataSource
extends AbstractDataSource
implements DocumentDataSource

AbstractDocumentDataSource is a base class intended to be extended by developers who are writing new document centric data sources. It provides support for document centric events and default implementations for some methods defined in DocumentDataSource. It also adds some methods for document specific actions.

This is published because it is in the inheritence heirarchy of a public data source, but it not intended to be subclassed, and the API may change. Not intended to be subclassed.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.xsp.model.AbstractDataSource
AbstractDataSource.RuntimeProperties
 
Field Summary
 
Fields inherited from class com.ibm.xsp.model.AbstractDataSource
NO_VARS
 
Constructor Summary
AbstractDocumentDataSource()
           
 
Method Summary
 void computeDocument(javax.faces.context.FacesContext context)
          Compute the current document
abstract  void doComputeDocument(javax.faces.context.FacesContext context, java.lang.Object document)
          Compute the current document
abstract  void doDeleteDocument(javax.faces.context.FacesContext context, java.lang.Object document)
          Delete the current document
abstract  DocumentDataContainer doNewDocument(javax.faces.context.FacesContext context)
          Create a new document
abstract  DocumentDataContainer doOpenDocument(javax.faces.context.FacesContext context)
          Open the specified document
abstract  boolean doSaveDocument(javax.faces.context.FacesContext context, java.lang.Object document)
          Save the current document
 javax.faces.el.MethodBinding getComputeDocument()
          It is triggered at first right after loading the document (after postOpenDocument), and at the end before saving the document it (after querySaveDocument but before saving the document).
 javax.faces.el.MethodBinding getPostNewDocument()
          Triggered after creating the new document.
 javax.faces.el.MethodBinding getPostOpenDocument()
          Triggered after opening the document.
 javax.faces.el.MethodBinding getPostSaveDocument()
          Triggered after saving the document.
 javax.faces.el.MethodBinding getQueryNewDocument()
          Triggered before creating the new document.
 javax.faces.el.MethodBinding getQueryOpenDocument()
          Triggered before opening the document.
 javax.faces.el.MethodBinding getQuerySaveDocument()
          Triggered before saving the document.
protected  java.lang.Object invoke(javax.faces.context.FacesContext context, javax.faces.el.MethodBinding methodBinding, java.lang.Object[] params, java.lang.Object document)
           
abstract  boolean isReadOnly(java.lang.Object document)
          Is the specified document read only
 DataContainer load(javax.faces.context.FacesContext context)
          Load the associated data container
 DataContainer newDocument(javax.faces.context.FacesContext context)
          Create a new document
 DataContainer openDocument(javax.faces.context.FacesContext context)
          Open the specified document
protected  java.util.List<DataPublisher.ShadowedObject> pushData(javax.faces.context.FacesContext context, java.lang.Object document, boolean isReadOnly)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 boolean save(javax.faces.context.FacesContext context, DataContainer data)
          Save the current state of the data object
 boolean saveDocument(javax.faces.context.FacesContext context)
          Save the current document
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setComputeDocument(javax.faces.el.MethodBinding binding)
          It is triggered at first right after loading the document (after postOpenDocument), and at the end before saving the document it (after querySaveDocument but before saving the document).
 void setPostNewDocument(javax.faces.el.MethodBinding binding)
          Triggered after creating the new document.
 void setPostOpenDocument(javax.faces.el.MethodBinding binding)
          Triggered after opening the document.
 void setPostSaveDocument(javax.faces.el.MethodBinding binding)
          Triggered after saving the document.
 void setQueryNewDocument(javax.faces.el.MethodBinding binding)
          Triggered before creating the new document.
 void setQueryOpenDocument(javax.faces.el.MethodBinding binding)
          Triggered before opening the document.
 void setQuerySaveDocument(javax.faces.el.MethodBinding binding)
          Triggered before saving the document.
 
Methods inherited from class com.ibm.xsp.model.AbstractDataSource
beginRuntimeProperties, composeUniqueId, computeUniqueBeanId, createRuntimeProperties, endRuntimeProperties, getBeanId, getDataContainer, getDataContainer, getDataObject, getEffectiveScope, getRequestParamPrefix, getRuntimeProperties, getScope, getUniqueId, getVar, getVars, getViewRoot, hasRuntimeProperties, initializeRuntimeProperties, isDataShared, isIgnoreRequestParams, isNestedInUIIterator, isReadonly, popData, prefixRequestParam, pushData, putDataContainer, readRequestParams, refresh, removeBean, removeBean, save, setIgnoreRequestParams, setRequestParamPrefix, setScope, setVar
 
Methods inherited from class com.ibm.xsp.complex.ValueBindingObjectImpl
getComponent, getFacesContext, getValueBinding, isTransient, setComponent, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.xsp.model.DocumentDataSource
isDocument, isNewDocument
 
Methods inherited from interface com.ibm.xsp.model.DataSource
getBeanId, getDataContainer, getRequestParamPrefix, getScope, getUniqueId, getVar, getVars, isIgnoreRequestParams, isReadonly, refresh, save, setIgnoreRequestParams, setRequestParamPrefix, setScope, setVar
 
Methods inherited from interface com.ibm.xsp.model.DataPublishingObject
popData, pushData
 

Constructor Detail

AbstractDocumentDataSource

public AbstractDocumentDataSource()
Method Detail

save

public boolean save(javax.faces.context.FacesContext context,
                    DataContainer data)
             throws FacesExceptionEx
Description copied from class: AbstractDataSource
Save the current state of the data object

Specified by:
save in class AbstractDataSource
Throws:
FacesExceptionEx

load

public DataContainer load(javax.faces.context.FacesContext context)
                   throws java.io.IOException
Description copied from class: AbstractDataSource
Load the associated data container

Specified by:
load in class AbstractDataSource
Throws:
java.io.IOException

newDocument

public DataContainer newDocument(javax.faces.context.FacesContext context)
                          throws java.io.IOException
Description copied from interface: DocumentDataSource
Create a new document

Specified by:
newDocument in interface DocumentDataSource
Throws:
java.io.IOException

openDocument

public DataContainer openDocument(javax.faces.context.FacesContext context)
                           throws java.io.IOException
Description copied from interface: DocumentDataSource
Open the specified document

Specified by:
openDocument in interface DocumentDataSource
Throws:
java.io.IOException

saveDocument

public boolean saveDocument(javax.faces.context.FacesContext context)
                     throws FacesExceptionEx
Description copied from interface: DocumentDataSource
Save the current document

Specified by:
saveDocument in interface DocumentDataSource
Throws:
FacesExceptionEx

computeDocument

public void computeDocument(javax.faces.context.FacesContext context)
                     throws FacesExceptionEx
Description copied from interface: DocumentDataSource
Compute the current document

Specified by:
computeDocument in interface DocumentDataSource
Throws:
FacesExceptionEx

setQueryNewDocument

public void setQueryNewDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered before creating the new document.

Specified by:
setQueryNewDocument in interface DocumentDataSource

setQueryOpenDocument

public void setQueryOpenDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered before opening the document.

Specified by:
setQueryOpenDocument in interface DocumentDataSource

setQuerySaveDocument

public void setQuerySaveDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered before saving the document.

Specified by:
setQuerySaveDocument in interface DocumentDataSource

setPostNewDocument

public void setPostNewDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered after creating the new document.

Specified by:
setPostNewDocument in interface DocumentDataSource

setPostOpenDocument

public void setPostOpenDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered after opening the document.

Specified by:
setPostOpenDocument in interface DocumentDataSource

setPostSaveDocument

public void setPostSaveDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
Triggered after saving the document.

Specified by:
setPostSaveDocument in interface DocumentDataSource

setComputeDocument

public void setComputeDocument(javax.faces.el.MethodBinding binding)
Description copied from interface: DocumentDataSource
It is triggered at first right after loading the document (after postOpenDocument), and at the end before saving the document it (after querySaveDocument but before saving the document). This event is useful to compute field values, either for use in GUI presentation (after loading the document), or to save values in the document itself (before saving the document).

Specified by:
setComputeDocument in interface DocumentDataSource

getQueryNewDocument

public javax.faces.el.MethodBinding getQueryNewDocument()
Description copied from interface: DocumentDataSource
Triggered before creating the new document.

Specified by:
getQueryNewDocument in interface DocumentDataSource
Returns:
binding

getQueryOpenDocument

public javax.faces.el.MethodBinding getQueryOpenDocument()
Description copied from interface: DocumentDataSource
Triggered before opening the document.

Specified by:
getQueryOpenDocument in interface DocumentDataSource
Returns:
binding

getQuerySaveDocument

public javax.faces.el.MethodBinding getQuerySaveDocument()
Description copied from interface: DocumentDataSource
Triggered before saving the document.

Specified by:
getQuerySaveDocument in interface DocumentDataSource
Returns:
binding

getPostNewDocument

public javax.faces.el.MethodBinding getPostNewDocument()
Description copied from interface: DocumentDataSource
Triggered after creating the new document.

Specified by:
getPostNewDocument in interface DocumentDataSource
Returns:
binding

getPostOpenDocument

public javax.faces.el.MethodBinding getPostOpenDocument()
Description copied from interface: DocumentDataSource
Triggered after opening the document.

Specified by:
getPostOpenDocument in interface DocumentDataSource
Returns:
binding

getPostSaveDocument

public javax.faces.el.MethodBinding getPostSaveDocument()
Description copied from interface: DocumentDataSource
Triggered after saving the document.

Specified by:
getPostSaveDocument in interface DocumentDataSource
Returns:
binding

getComputeDocument

public javax.faces.el.MethodBinding getComputeDocument()
Description copied from interface: DocumentDataSource
It is triggered at first right after loading the document (after postOpenDocument), and at the end before saving the document it (after querySaveDocument but before saving the document). This event is useful to compute field values, either for use in GUI presentation (after loading the document), or to save values in the document itself (before saving the document).

Specified by:
getComputeDocument in interface DocumentDataSource
Returns:
binding

invoke

protected java.lang.Object invoke(javax.faces.context.FacesContext context,
                                  javax.faces.el.MethodBinding methodBinding,
                                  java.lang.Object[] params,
                                  java.lang.Object document)

pushData

protected java.util.List<DataPublisher.ShadowedObject> pushData(javax.faces.context.FacesContext context,
                                                                java.lang.Object document,
                                                                boolean isReadOnly)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractDataSource

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractDataSource

doNewDocument

public abstract DocumentDataContainer doNewDocument(javax.faces.context.FacesContext context)
                                             throws FacesExceptionEx
Create a new document

Throws:
FacesExceptionEx

doOpenDocument

public abstract DocumentDataContainer doOpenDocument(javax.faces.context.FacesContext context)
                                              throws FacesExceptionEx
Open the specified document

Throws:
FacesExceptionEx

doDeleteDocument

public abstract void doDeleteDocument(javax.faces.context.FacesContext context,
                                      java.lang.Object document)
                               throws FacesExceptionEx
Delete the current document

Throws:
FacesExceptionEx

doSaveDocument

public abstract boolean doSaveDocument(javax.faces.context.FacesContext context,
                                       java.lang.Object document)
                                throws FacesExceptionEx
Save the current document

Returns:
TODO
Throws:
FacesExceptionEx

doComputeDocument

public abstract void doComputeDocument(javax.faces.context.FacesContext context,
                                       java.lang.Object document)
                                throws FacesExceptionEx
Compute the current document

Throws:
FacesExceptionEx

isReadOnly

public abstract boolean isReadOnly(java.lang.Object document)
Is the specified document read only

Parameters:
document -
Returns: