|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.model.domino.wrapped.DominoDocument
public class DominoDocument
NotesXspDocument represents a Domino Document in XPages
Nested Class Summary | |
---|---|
static class |
DominoDocument.AttachmentValueHolder
Stores information about an attachment to a field and the operation performed on that attachment. |
class |
DominoDocument.FieldValueHolder
Stores information about a field (a Domino Item proxy) and the operation performed on that field. |
static class |
DominoDocument.XmlDocument
Experimental XML support (DO NOT USE) |
Constructor Summary | |
---|---|
DominoDocument()
This method is provided for object serialization/deserialization and should only be used for those purposes. |
Method Summary | |
---|---|
void |
afterDeserializing(com.ibm.xsp.model.domino.DominoDocumentDataContainer container)
Serialization mechanism. |
void |
beforeSerializing()
Serialization mechanism. |
void |
checkDocumentValidity()
Check if the document is still valid as an action might have deleted it |
void |
closeMIMEEntities(boolean persist,
java.lang.String fieldName)
If the fieldName is a RichTextItem - close the MIME Entities for the field |
void |
discardWrappedObject()
Discards the wrapped Document. |
org.w3c.dom.Document |
getAttachmentAsXML(java.lang.String fieldName,
java.lang.String attachmentName,
boolean readOnly)
Gets the content of a field attachment as an in memory XML Document. |
java.util.List<FileRowData> |
getAttachmentList(java.lang.String fieldName)
Get the list of attachments for the field specified |
java.util.Map<java.lang.String,DominoDocument.FieldValueHolder> |
getChangedFields()
Return list of changed fields |
java.lang.String |
getComputeWithFormNamed()
Return the Form name for ComputeWithForm |
java.lang.String |
getDBName()
Return the name of Database that stores the Document |
lotus.domino.Document |
getDocument()
Return the wrapped Document |
lotus.domino.Document |
getDocument(boolean applyChanges)
Return the wrapped document |
java.lang.String |
getDocumentId()
Return the Note Id |
java.util.List<FileRowData> |
getEmbeddedImagesList(java.lang.String fieldName)
Return the List of images attached to this Document |
org.w3c.dom.Document |
getFieldAsXML(java.lang.String fieldName,
boolean readOnly)
DO NOT USE |
java.lang.String |
getForm()
Get the name of the Form associated with this Document |
java.util.Vector |
getItemValue(java.lang.String name)
Return the value(s) stored in the field name |
com.ibm.jscript.std.ArrayObject |
getItemValueArray(java.lang.String name)
Return the value(s) for a field name as an Array |
java.util.Date |
getItemValueDate(java.lang.String name)
Return the value stored in field name as a Date
Returns null if the field is not a DataTime. |
lotus.domino.DateTime |
getItemValueDateTime(java.lang.String name)
Return the values stored in field name as a DateTime
Returns null if the field is not a number. |
double |
getItemValueDouble(java.lang.String name)
Return the values stored in field name as a double
Returns 0 if the field is not a number. |
int |
getItemValueInteger(java.lang.String name)
Return the values stored in field name as an int
Returns 0 if the fields is not a number. |
java.lang.String |
getItemValueString(java.lang.String name)
Returns the value stored in field name as a String. |
java.lang.String |
getNoteID()
Return the Note Id |
lotus.domino.Database |
getParentDatabase()
Return the Database that stores the Document |
java.lang.String |
getParentDatabaseFileName()
Return the File Path for the Database that stores the Document |
java.lang.String |
getParentId()
Return the parent id of the Document |
java.lang.String |
getPersistenceFolder(java.lang.String fieldName)
Get the Folder name for persistence data in the form DominoDoc-[9999]-[filedName] |
DominoRichTextItem |
getRichTextItem(java.lang.String fieldName)
Get the RichTextItem for this field. |
java.lang.String |
getSaveLinksAs()
Save links in the document as HTTP:(UseWeb) or NOTES:(UseNotes) |
java.lang.Class |
getType(java.lang.Object key)
Return the data type of the specified key |
lotus.domino.Document |
getValidDocument()
Check if the document is valid and the we return it else, return a null pointer in that case |
java.lang.Object |
getValue(java.lang.Object fieldName)
Return the value of the Item named fieldName . |
boolean |
hasItem(java.lang.String fieldName)
Return true if the document has a field fieldName |
boolean |
isAllowDeletedDocs()
Return true if deleted documents are allowed. |
boolean |
isEditable()
Returns true if the document is editable |
boolean |
isNewNote()
Return true if the Document is a new Document |
boolean |
isReadOnly(java.lang.Object key)
Indicate whether this Document is ReadOnly or is Editable |
boolean |
isResponse()
Return true if the Document is a response Document |
void |
recycle()
Recycle. |
void |
removeAllAttachments(java.lang.String fieldName)
Remove all attachement from the specified field |
boolean |
removeAttachment(java.lang.String fieldName,
java.lang.String attachmentName)
Remove an attachment associated with a field |
void |
removeItem(java.lang.String fieldName)
Removes the item fieldName from the document |
void |
replaceItemValue(java.lang.String fieldName,
java.lang.Object value)
Replace the current value of item fieldName in the document
with value |
void |
restoreWrappedDocument()
Restore the wrapped document from the Database. |
boolean |
save()
Save any changes to the Document (and compute any fields, if required) |
void |
setAllowDeletedDocs(boolean deletedDocs)
Set whether Document is allowed deleted documents |
void |
setDocument(lotus.domino.Document document)
Set this document to be the wrapped document |
void |
setEditable(boolean isEditable)
Set true the document can be edited |
void |
setRichTextItem(java.lang.String fieldName,
DominoRichTextItem drti)
Add this field name and its RichTextItem value o the list of RichTextsItems |
void |
setValue(java.lang.Object fieldName,
java.lang.Object value)
DataObject setValue implementation. |
static DominoDocument |
wrap(java.lang.String database,
lotus.domino.Database db,
java.lang.String parentId,
java.lang.String form,
java.lang.String computeWithForm,
java.lang.String concurrencyMode,
boolean allowDeletedDocs,
java.lang.String saveLinksAs)
Create a new DominoDocument(NotesXspDocument) that wraps a lotus.domino.document |
static DominoDocument |
wrap(java.lang.String database,
lotus.domino.Document document,
java.lang.String computeWithForm,
java.lang.String concurrencyMode,
boolean allowDeletedDocs,
java.lang.String saveLinksAs)
Create a new DominoDocument(NotesXspDocument) that wraps a lotus.domino.document |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DominoDocument()
Method Detail |
---|
public static DominoDocument wrap(java.lang.String database, lotus.domino.Document document, java.lang.String computeWithForm, java.lang.String concurrencyMode, boolean allowDeletedDocs, java.lang.String saveLinksAs)
database
- document
- computeWithForm
- concurrencyMode
- allowDeletedDocs
- saveLinksAs
- Save links in the document as HTTP:(UseWeb) or NOTES:(UseNotes)
public static DominoDocument wrap(java.lang.String database, lotus.domino.Database db, java.lang.String parentId, java.lang.String form, java.lang.String computeWithForm, java.lang.String concurrencyMode, boolean allowDeletedDocs, java.lang.String saveLinksAs)
database
- db
- parentId
- form
- computeWithForm
- concurrencyMode
- allowDeletedDocs
- saveLinksAs
-
public java.lang.String getPersistenceFolder(java.lang.String fieldName)
fieldName
-
public java.lang.String getDBName()
public java.lang.String getComputeWithFormNamed()
public boolean isAllowDeletedDocs()
true
if deleted documents are allowed.
true
if deleted documents are allowedpublic java.lang.String getSaveLinksAs()
public void setAllowDeletedDocs(boolean deletedDocs)
deletedDocs
- public lotus.domino.Document getDocument()
public final lotus.domino.Document getValidDocument() throws lotus.domino.NotesException
lotus.domino.NotesException
public void checkDocumentValidity()
public void setDocument(lotus.domino.Document document)
document
- public lotus.domino.Document getDocument(boolean applyChanges) throws lotus.domino.NotesException
applyChanges
- Apply any changes to the wrapped document before returning it
lotus.domino.NotesException
public void restoreWrappedDocument()
public void recycle() throws lotus.domino.NotesException
lotus.domino.NotesException
public void discardWrappedObject()
public void closeMIMEEntities(boolean persist, java.lang.String fieldName) throws lotus.domino.NotesException
persist
- fieldName
-
lotus.domino.NotesException
public java.lang.String getForm() throws lotus.domino.NotesException
lotus.domino.NotesException
public boolean isEditable()
public void setEditable(boolean isEditable)
isEditable
- public java.lang.String getParentId()
public java.util.Vector getItemValue(java.lang.String name) throws lotus.domino.NotesException
name
lotus.domino.NotesException
public com.ibm.jscript.std.ArrayObject getItemValueArray(java.lang.String name) throws lotus.domino.NotesException, com.ibm.jscript.InterpretException
name
as an Array
lotus.domino.NotesException
com.ibm.jscript.InterpretException
public java.lang.String getItemValueString(java.lang.String name) throws lotus.domino.NotesException
name
as a String. If it is a multi-valued
field, only the first values is returned. If it is a RichTextField, then contents
are returned as text.
lotus.domino.NotesException
public int getItemValueInteger(java.lang.String name) throws lotus.domino.NotesException
name
as an int
Returns 0 if the fields is not a number.
lotus.domino.NotesException
public double getItemValueDouble(java.lang.String name) throws lotus.domino.NotesException
name
as a double
Returns 0 if the field is not a number.
lotus.domino.NotesException
public lotus.domino.DateTime getItemValueDateTime(java.lang.String name) throws lotus.domino.NotesException
name
as a DateTime
Returns null
if the field is not a number.
lotus.domino.NotesException
public java.util.Date getItemValueDate(java.lang.String name) throws lotus.domino.NotesException
name
as a Date
Returns null
if the field is not a DataTime.
lotus.domino.NotesException
public java.lang.String getNoteID() throws lotus.domino.NotesException
lotus.domino.NotesException
public java.lang.String getDocumentId()
public lotus.domino.Database getParentDatabase() throws lotus.domino.NotesException
lotus.domino.NotesException
public java.lang.String getParentDatabaseFileName() throws lotus.domino.NotesException
lotus.domino.NotesException
public boolean hasItem(java.lang.String fieldName) throws lotus.domino.NotesException
true
if the document has a field fieldName
lotus.domino.NotesException
public boolean isNewNote() throws lotus.domino.NotesException
true
if the Document is a new Document
lotus.domino.NotesException
public boolean isResponse() throws lotus.domino.NotesException
true
if the Document is a response Document
lotus.domino.NotesException
public void removeItem(java.lang.String fieldName) throws lotus.domino.NotesException
fieldName
from the document
lotus.domino.NotesException
public void replaceItemValue(java.lang.String fieldName, java.lang.Object value) throws lotus.domino.NotesException
fieldName
in the document
with value
lotus.domino.NotesException
public boolean save() throws lotus.domino.NotesException
lotus.domino.NotesException
public java.lang.Object getValue(java.lang.Object fieldName)
fieldName
. What is returned
depends on the datatype of the fields. Could be a String value, or an MIME
entity if the item is a RichTextItem.
getValue
in interface com.ibm.xsp.model.DataObject
public java.lang.Class getType(java.lang.Object key)
key
getType
in interface com.ibm.xsp.model.DataObject
public void setValue(java.lang.Object fieldName, java.lang.Object value)
setValue
in interface com.ibm.xsp.model.DataObject
public boolean isReadOnly(java.lang.Object key)
isReadOnly
in interface com.ibm.xsp.model.DataObject
public java.util.Map<java.lang.String,DominoDocument.FieldValueHolder> getChangedFields()
public java.util.List<FileRowData> getAttachmentList(java.lang.String fieldName) throws lotus.domino.NotesException
lotus.domino.NotesException
public java.util.List<FileRowData> getEmbeddedImagesList(java.lang.String fieldName) throws lotus.domino.NotesException
lotus.domino.NotesException
public boolean removeAttachment(java.lang.String fieldName, java.lang.String attachmentName) throws lotus.domino.NotesException
lotus.domino.NotesException
public void removeAllAttachments(java.lang.String fieldName) throws lotus.domino.NotesException
lotus.domino.NotesException
public DominoRichTextItem getRichTextItem(java.lang.String fieldName)
null
if the
field is not a RichTextItem
fieldName
-
public void setRichTextItem(java.lang.String fieldName, DominoRichTextItem drti)
fieldName
- drti
- public void beforeSerializing()
public void afterDeserializing(com.ibm.xsp.model.domino.DominoDocumentDataContainer container)
public org.w3c.dom.Document getFieldAsXML(java.lang.String fieldName, boolean readOnly) throws lotus.domino.NotesException, com.ibm.commons.xml.XMLException
DO NOT USE
Gets the content of a field as an in memory XML Document.
fieldName
- the field that contains the XML as textreadOnly
- indicates if the document is readonly. If so, the changes are not saved back with the document.
lotus.domino.NotesException
com.ibm.commons.xml.XMLException
public org.w3c.dom.Document getAttachmentAsXML(java.lang.String fieldName, java.lang.String attachmentName, boolean readOnly) throws lotus.domino.NotesException, com.ibm.commons.xml.XMLException
fieldName
- the field that contains the XML as textattachmentName
- the attachment that contains the XML as textreadOnly
- indicates if the document is readonly. If so, the changes are not saved back with the document.
lotus.domino.NotesException
com.ibm.commons.xml.XMLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |