|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.monitor.AbstractMonitorEnabled de.bea.domingo.proxy.BaseProxy de.bea.domingo.proxy.BaseDocumentProxy
public abstract class BaseDocumentProxy
Represents a document in a database.
Nested Class Summary | |
---|---|
protected class |
BaseDocumentProxy.ItemsIterator
A ItemsIterator allows iteration over a set of
lotus.domino.Item . |
Nested classes/interfaces inherited from class de.bea.domingo.proxy.BaseProxy |
---|
BaseProxy.DocumentCollectionIterator |
Field Summary |
---|
Fields inherited from class de.bea.domingo.proxy.BaseProxy |
---|
DATETIME_STRING_LENGTH, EMPTY_STRING, MAX_DATETIME_LENGTH, NUM_DATETIME_VALUES, RESOURCES |
Constructor Summary | |
---|---|
protected |
BaseDocumentProxy(NotesProxyFactory theFactory,
DBase parent,
lotus.domino.Document document,
DNotesMonitor monitor)
Constructor for DDocumentImpl. |
Method Summary | |
---|---|
DItem |
appendItemValue(java.lang.String name)
Creates a new empty item in a document. |
DItem |
appendItemValue(java.lang.String name,
java.util.Calendar value)
Creates a new item in a document and sets the item value. |
DItem |
appendItemValue(java.lang.String name,
double value)
Creates a new item in a document and sets the item value. |
DItem |
appendItemValue(java.lang.String name,
int value)
Creates a new item in a document and sets the item value. |
DItem |
appendItemValue(java.lang.String name,
java.util.List values)
Creates a new item in a document and sets the item value. |
DItem |
appendItemValue(java.lang.String name,
java.lang.String value)
Creates a new item in a document and sets the item value. |
boolean |
computeWithForm()
Validates a document by executing the default value, translation, and validation formulas, if any are defined in the document form. |
boolean |
computeWithForm(boolean raiseError)
Validates a document by executing the default value, translation, and validation formulas, if any are defined in the document form. |
void |
copyAllItems(DBaseDocument doc,
boolean replace)
Copies all items in the current document into the destination document. |
DBaseItem |
copyItem(DBaseItem item)
Copies an item into the current document and optionally assigns the copied item a new name. |
DBaseItem |
copyItem(DBaseItem item,
java.lang.String s)
Copies an item into the current document and optionally assigns the copied item a new name. |
DDocument |
createReplyMessage(boolean flag)
Creates a new document that is formatted as a reply to the current document. |
DRichTextItem |
createRichTextItem(java.lang.String name)
Creates a new rich text item in a document. |
void |
encrypt()
Encrypts a document. |
java.lang.String |
generateXML()
Generates an XML representation of a document to the Writer. |
void |
generateXML(java.io.Writer writer)
Generates an XML representation of a document to the Writer. |
DEmbeddedObject |
getAttachment(java.lang.String attachmentName)
Returns a representation of a file attachment. |
java.util.List |
getAttachments()
Returns all embedded objects that are attachments. |
java.util.List |
getAuthors()
The names of the people who have saved a document. |
java.util.List |
getColumnValues()
A list of values, each element of which corresponds to a column value in the document's parent view. |
java.util.Calendar |
getCreated()
The date a document was created. |
(package private) lotus.domino.Document |
getDocument()
Returns the associated Notes document. |
java.util.Iterator |
getEmbeddedObjects()
Returns all embedded objects. |
java.util.List |
getEncryptionKeys()
Returns the key(s) used to encrypt a document. |
DBaseItem |
getFirstItem(java.lang.String itemName)
Returns the first item of a specified name in a document. |
(package private) static BaseDocumentProxy |
getInstance(NotesProxyFactory theFactory,
DBase parent,
lotus.domino.Document document,
DNotesMonitor monitor)
Creates or returns a cached implementation of the requested document interface. |
java.util.Iterator |
getItems()
Iterator for all items in a document. |
java.util.List |
getItemValue(java.lang.String name)
Returns the value of an item. |
java.lang.Object |
getItemValueCustomData(java.lang.String name)
Returns as an object the value of an item containing custom data. |
java.lang.Object |
getItemValueCustomData(java.lang.String name,
java.lang.String s1)
Returns as an object the value of an item containing custom data. |
byte[] |
getItemValueCustomDataBytes(java.lang.String name,
java.lang.String s1)
Returns as a byte array the value of an item containing custom data. |
java.util.Calendar |
getItemValueDate(java.lang.String name)
Returns the value of an item with a single Calendar value. |
DDateRange |
getItemValueDateRange(java.lang.String name)
Returns the value of an item with two Calendar value. |
java.util.List |
getItemValueDateTimeArray(java.lang.String name)
Returns the value of a date-time item in a document. |
java.lang.Double |
getItemValueDouble(java.lang.String name)
Returns the value of an item with a single double value. |
java.lang.Integer |
getItemValueInteger(java.lang.String name)
Returns the value of an item with a single int value. |
int |
getItemValueSize(java.lang.String name)
Returns the number of values of an item. |
java.lang.String |
getItemValueString(java.lang.String name)
Returns the value of an item with a single text value. |
java.util.Calendar |
getLastAccessed()
The date a document was last modified or read. |
java.util.Calendar |
getLastModified()
The date a document was last modified. |
java.util.List |
getLockHolders()
The names of the holders of a lock. |
DDatabase |
getParentDatabase()
Return the database that contains a document. |
java.util.List |
getReceivedItemText()
Gets the text values of the Received items in a mail document. |
java.lang.String |
getSigner()
The name of the person who created the signature, if a document is signed. |
int |
getSize()
The size of a database, in bytes. |
java.lang.String |
getVerifier()
The name of the certificate that verified a signature, if a document is signed. |
boolean |
hasEmbedded()
Indicates whether a document contains one or more embedded objects, object links, or file attachments. |
boolean |
hasItem(java.lang.String name)
Indicates whether an item exists in the document. |
boolean |
isDeleted()
Indicates whether a Document object represents an existing document (not a deletion stub) on an ongoing basis. |
boolean |
isEncrypted()
Indicates whether a document is encrypted. |
boolean |
isEncryptOnSend()
Indicates whether a document is encrypted when mailed. |
boolean |
isProfile()
Indicates whether a Document object is a profile document. |
boolean |
isSaveMessageOnSend()
Indicates whether a document is saved to a database when mailed. |
boolean |
isSentByAgent()
Indicates whether a document was mailed by a Domino program. |
boolean |
isSigned()
Indicates whether a document contains a signature. |
boolean |
isSignOnSend()
Indicates whether a document is signed when mailed. |
boolean |
isValid()
Indicates whether a Document object represents an existing document (not a deletion stub) initially. |
boolean |
lock()
Locks a document. |
boolean |
lock(boolean provisionalOk)
Locks a document. |
boolean |
lock(java.util.List names)
Locks a document. |
boolean |
lock(java.util.List names,
boolean provisionalOk)
Locks a document. |
boolean |
lock(java.lang.String name)
Locks a document. |
boolean |
lock(java.lang.String name,
boolean provisionalOk)
Locks a document. |
boolean |
lockProvisional()
Locks a document provisionally. |
boolean |
lockProvisional(java.util.List names)
Locks a document provisionally. |
boolean |
lockProvisional(java.lang.String name)
Locks a document provisionally. |
void |
recycle()
The recycle method unconditionally destroys an object and returns its memory to the system. |
boolean |
remove()
Permanently removes a document from a database. |
boolean |
remove(boolean force)
Permanently removes a document from a database. |
void |
removeItem(java.lang.String name)
Removes an item from a document. |
boolean |
removePermanently(boolean force)
Permanently deletes a document from a database, doing a hard deletion even if soft deletions are enabled. |
boolean |
renderToRTItem(DRichTextItem richTextItem)
Creates a picture of a document and places it into a rich-text item that you specify. |
DItem |
replaceItemValue(java.lang.String name,
java.util.Calendar value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.util.Calendar calendar1,
java.util.Calendar calendar2)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
DDateRange value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
double value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.lang.Double value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
int value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.lang.Integer value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.util.List values)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.lang.String value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValue(java.lang.String name,
java.util.TimeZone value)
Replaces all items of the specified name with one new item, which is assigned the specified value. |
DItem |
replaceItemValueCustomData(java.lang.String name,
java.lang.Object obj)
Replaces all items of the specified name with one new item, which is assigned custom data from a byte array. |
DItem |
replaceItemValueCustomData(java.lang.String name,
java.lang.String type,
java.lang.Object obj)
Replaces all items of the specified name with one new item, which is assigned custom data from a byte array. |
DItem |
replaceItemValueCustomDataBytes(java.lang.String s,
java.lang.String s1,
byte[] abyte0)
Replaces all items of the specified name with one new item, which is assigned custom data from a byte array. |
boolean |
save()
Saves any changes you have made to a document. |
boolean |
save(boolean force)
Saves any changes you have made to a document. |
boolean |
save(boolean force,
boolean makeresponse)
Saves any changes you have made to a document. |
void |
setEncryptionKeys(java.util.List keys)
Sets the key(s) used to encrypt a document. |
void |
setUniversalID(java.lang.String unid)
The universal ID, which uniquely identifies a document across all replicas of a database. |
void |
unlock()
Unlocks a document. |
Methods inherited from class de.bea.domingo.monitor.AbstractMonitorEnabled |
---|
getMonitor, setMonitor |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.bea.domingo.DBase |
---|
equals, hashCode, toString |
Constructor Detail |
---|
protected BaseDocumentProxy(NotesProxyFactory theFactory, DBase parent, lotus.domino.Document document, DNotesMonitor monitor)
theFactory
- the controlling factoryparent
- the parent objectdocument
- the notes documentmonitor
- the monitorMethod Detail |
---|
static BaseDocumentProxy getInstance(NotesProxyFactory theFactory, DBase parent, lotus.domino.Document document, DNotesMonitor monitor)
theFactory
- the controlling factoryparent
- the parent objectdocument
- the associated Notes documentmonitor
- the monitor
public final DDatabase getParentDatabase()
getParentDatabase
in interface DBaseDocument
DBaseDocument.getParentDatabase()
public final DBaseItem getFirstItem(java.lang.String itemName)
A document may contain more than one item of the same name. To access other than the first item, use the Items property.
If the value of a field is computed for display, the value is not stored as an item and is inaccessible from a Document object. In some cases, you can access the field value another way. For example, if a document has a DateComposed field computed for display with the formula @Created, use getCreated.
Using this method to get normal items (non-rich text)
To get a normal item, explicitly cast the return value from getFirstItem to DItem.
DDocument doc; //...set value of doc... DItem item = (DItem)doc.getFirstItem("Body");
Using this method to get rich text items
To get a rich text item, explicitly cast the return value from getFirstItem to DRichTextItem.
DDocument doc; //...set value of doc... DRichTextItem rtitem = (DRichTextItem)doc.getFirstItem("Body");
getFirstItem
in interface DBaseDocument
itemName
- name of an item
DBaseDocument.getFirstItem(String)
public final java.util.Calendar getCreated()
getCreated
in interface DBaseDocument
DBaseDocument.getCreated()
public final boolean save()
Note
If the document is a DProfileDocument
, a call to the
save
method is only successful to a newly created document
if a item was appended.
save
in interface DBaseDocument
true
of successfully saved, else false
DBaseDocument.save()
public final boolean save(boolean force, boolean makeresponse)
Note
If the document is a DProfileDocument
, a call to the
save
method is only successful to a newly created document
if a item was appended.
save
in interface DBaseDocument
force
- If true, the document is saved even if someone else edits
and saves the document while the program is running. The
last version of the document that was saved wins; the
earlier version is discarded. If false, and someone else
edits the document while the program is running, the
makeresponse argument determines what happens.makeresponse
- If true, the current document becomes a response to
the original document (this is what the replicator does
when there's a replication conflict). If false, the save is
canceled. If the force parameter is true, the makeresponse
parameter has no effect.
true
of successfully saved, else false
DBaseDocument.save(boolean, boolean)
public final DItem appendItemValue(java.lang.String name)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
appendItemValue
in interface DBaseDocument
name
- name of an item
DBaseDocument.appendItemValue(java.lang.String)
public final DItem appendItemValue(java.lang.String name, int value)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
Note
The value given asint
is handled (by Notes) as a type
Number and returned to Java as a Double.
appendItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.appendItemValue(java.lang.String, int)
public final DItem appendItemValue(java.lang.String name, double value)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
appendItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.appendItemValue(java.lang.String, double)
public final DItem replaceItemValue(java.lang.String name, java.util.Calendar value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
The milliseconds are cut off.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item
DBaseDocument.replaceItemValue(java.lang.String, java.util.Calendar)
public final DItem replaceItemValue(java.lang.String name, java.util.TimeZone value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item
DBaseDocument.replaceItemValue(java.lang.String, java.util.TimeZone)
public final DItem replaceItemValue(java.lang.String name, DDateRange value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
If both calendars are null, an item with an empty string is created. If only one calendar is not null, this calendar is stored as a single date value.
The milliseconds are cut off.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item
DBaseDocument.replaceItemValue(java.lang.String, de.bea.domingo.DDateRange)
public final DItem replaceItemValue(java.lang.String name, java.util.Calendar calendar1, java.util.Calendar calendar2)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
If both calendars are null, an item with an empty string is created. If only one calendar is not null, this calendar is stored as a single date value.
The milliseconds are cut off.
replaceItemValue
in interface DBaseDocument
name
- name of an itemcalendar1
- start date/time of rangecalendar2
- end date/time of range
DBaseDocument.replaceItemValue(java.lang.String, java.util.Calendar, java.util.Calendar)
public final DItem replaceItemValue(java.lang.String name, java.util.List values)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalues
- The new value of the item as a list of String, Integer,
Double, or java.util.Calendar elements
DBaseDocument.replaceItemValue(java.lang.String, java.util.List)
public final boolean save(boolean force)
Note
If the document is a DProfileDocument
, a call to the
save
method is only successful to a newly created document
if a item was appended.
save
in interface DBaseDocument
force
- If true, the document is saved even if someone else edits
and saves the document while the program is running. The
last version of the document that was saved wins; the
earlier version is discarded. If false, and someone else
edits the document while the program is running, the
makeresponse argument determines what happens.
true
of successfully saved, else false
DBaseDocument.save(boolean)
public final DRichTextItem createRichTextItem(java.lang.String name)
createRichTextItem
in interface DBaseDocument
name
- The name of the new rich-text item.
DBaseDocument.createRichTextItem(String)
public final boolean remove()
remove
in interface DBaseDocument
true
if the document is successfully removed or if
the document is not contained in a database (then a exception should be
logged),
false
if the document is not deleted because another user
modified it and the force parameter is set to false.DBaseDocument.remove()
public final boolean remove(boolean force)
remove
in interface DBaseDocument
force
- If true, the document is removed even if another user
modifies the document after your program opens it.
If false, the document is not removed if another user
modifies it.
true
if the document is successfully removed or if
the document is not contained in a database (then a exception should be
logged),
false
if the document is not deleted because another user
modified it and the force parameter is set to false.DBaseDocument.remove(boolean)
public final DEmbeddedObject getAttachment(java.lang.String attachmentName)
The Parent property for the returned EmbeddedObject returns null, since it was not accessed through a RichTextItem.
getAttachment
in interface DBaseDocument
attachmentName
- The file name of the file attachment.
DBaseDocument.getAttachment(String)
public final void removeItem(java.lang.String name)
removeItem
in interface DBaseDocument
name
- The name of the item to remove from the document. If more
than one item has the specified name, all items with this name are
removed. If there is no item with the specified name, the method does
nothing.
You can achieve the same result with remove in Item. To keep the changes to the document, you must call save after removing the item.
DBaseDocument.removeItem(String)
public final java.util.List getItemValue(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
If the item has no value, this method returns an empty vector.
If no item with the specified name exists, this method returns an empty vector. It does not throw an exception. Use hasItem to verify the existence of an item.
This property returns the same value(s) for an item as getValues in Item.
getItemValue
in interface DBaseDocument
name
- name of an item
DBaseDocument.getItemValue(String)
public final java.lang.String getItemValueString(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
The value of the item cannot be null, but if the value is numeric or Calendar, this method returns an empty String.
If no item with the specified name exists, this method returns null. It does not throw an exception. Use hasItem to verify the existence of an item.
If the item has multiple values, this method returns the first value.
getItemValueString
in interface DBaseDocument
name
- The name of the item.
DBaseDocument.getItemValueString(java.lang.String)
public final boolean hasItem(java.lang.String name)
hasItem
in interface DBaseDocument
name
- The name of an item.
true
if an item with name exists in the document,
else false
DBaseDocument.hasItem(String)
final lotus.domino.Document getDocument()
public final java.util.Calendar getItemValueDate(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
If value is numeric or text, this method returns null
.
If no item with the specified name exists, this method returns
null
.
It does not throw an exception. Use hasItem to verify the existence of an
item.
If the item has multiple values, this method returns the first value.
getItemValueDate
in interface DBaseDocument
name
- The name of the item.
DBaseDocument.getItemValueDate(java.lang.String)
public final DDateRange getItemValueDateRange(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
If value is numeric or text, this method returns null
.
If no item with the specified name exists, this method returns
null
.
It does not throw an exception. Use hasItem to verify the existence of an
item.
getItemValueDateRange
in interface DBaseDocument
name
- The name of the item.
null
if only one date/time was specified.DBaseDocument.getItemValueDateRange(java.lang.String)
public final java.lang.Integer getItemValueInteger(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
If the value is text and is empty, this method
returns null
.
If the value is text and cannot be converted to am integer, this
method returns null
.
If no item with the specified name exists, this method
returns null
.
It does not throw an exception. Use hasItem to verify the existence of
an item.
If the item has multiple values, this method returns the first value.
A decimal number is rounded down if the fraction is less than 0.5 and up if the fraction is 0.5 or greater.
getItemValueInteger
in interface DBaseDocument
name
- The name of the item.
null
DBaseDocument.getItemValueInteger(java.lang.String)
public final java.lang.Double getItemValueDouble(java.lang.String name)
If multiple items have the same name, this method returns the value of the first item. Use the Items property to get all the items.
If the value is text and is empty, this method
returns null
.
If the value is text and cannot be converted to a double, this
method returns null
.
If no item with the specified name exists, this method returns null
.
It does not throw an exception. Use hasItem to verify the existence of
an item.
If the item has multiple values, this method returns the first value.
getItemValueDouble
in interface DBaseDocument
name
- The name of the item.
null
DBaseDocument.getItemValueDouble(java.lang.String)
public final java.util.List getAuthors()
If a name is hierarchical, this property returns the fully distinguished name.
This property does not return the names of people who have permission to edit a document (as found in an item of type Authors). Therefore, the people returned by the Authors property and the people listed in an Authors item may differ.
getAuthors
in interface DBaseDocument
DBaseDocument.getAuthors()
public final java.util.Calendar getLastAccessed()
The value returned is exact only to the day, not the hour. If the document is edited, the property is always updated. If the document is read more than once during the same 24hour period, the value is only updated the first time accessed.
getLastAccessed
in interface DBaseDocument
DBaseDocument.getLastAccessed()
public final java.util.Calendar getLastModified()
getLastModified
in interface DBaseDocument
DBaseDocument.getLastModified()
public final java.util.Iterator getItems()
Note
Values set asint
, are handled (by Notes) as a type
Number and returned to Java as a Double.
getItems
in interface DBaseDocument
DItem
as well as DRichTextItems
DBaseDocument.getItems()
public final DItem appendItemValue(java.lang.String name, java.util.List values)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
appendItemValue
in interface DBaseDocument
name
- name of an itemvalues
- The value of the new item as a list of String, Integer,
Double, or java.util.Calendar elements
DBaseDocument.appendItemValue(java.lang.String, java.util.List)
public final DItem replaceItemValue(java.lang.String name, int value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.replaceItemValue(java.lang.String, int)
public final DItem replaceItemValue(java.lang.String name, java.lang.Integer value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.replaceItemValue(java.lang.String, java.lang.Integer)
public final DItem replaceItemValue(java.lang.String name, double value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item
DBaseDocument.replaceItemValue(java.lang.String, double)
public final DItem replaceItemValue(java.lang.String name, java.lang.Double value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item
DBaseDocument.replaceItemValue(java.lang.String, java.lang.Double)
public final DItem appendItemValue(java.lang.String name, java.lang.String value)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
appendItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.appendItemValue(java.lang.String, java.lang.String)
public final DItem appendItemValue(java.lang.String name, java.util.Calendar value)
Note
In general, replaceItemValue is favored over appendItemValue. If an
item of the same name already exists in a document, appendItemValue
creates a second item of the same name, and the duplicate items are not
accessible through most methods. If you are creating a new document,
appendItemValue is safe.
appendItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.appendItemValue(java.lang.String, java.util.Calendar)
public final DItem replaceItemValue(java.lang.String name, java.lang.String value)
If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.
replaceItemValue
in interface DBaseDocument
name
- name of an itemvalue
- The value of the new item.
DBaseDocument.replaceItemValue(java.lang.String, java.lang.String)
public final java.util.Iterator getEmbeddedObjects()
The list is empty if the document contains no embedded objects.
Note:
Embedded objects and object links are not supported for OS/2, UNIX, and the Macintosh. File attachments are supported on all platforms.
getEmbeddedObjects
in interface DBaseDocument
DBaseDocument.getEmbeddedObjects()
public final java.util.List getAttachments()
getAttachments
in interface DBaseDocument
DBaseDocument.getAttachments()
public final int getItemValueSize(java.lang.String name)
If multiple items have the same name, this method returns the number of values in the first item. Use the Items property to get all the items.
If the item has no value, this method returns 0
.
If no item with the specified name exists, this method returns
0
. It does not throw an exception. Use hasItem to verify the
existence of an item.
This property returns the same value for an item as getSize() in DItem.
getItemValueSize
in interface DBaseDocument
name
- name of an item
DBaseDocument.getItemValueSize(java.lang.String)
public final void copyAllItems(DBaseDocument doc, boolean replace)
If you are not copying to a newly created document, you should probably specify true for the second parameter. See appendItemValue for a note about appending items to existing documents.
copyAllItems
in interface DBaseDocument
doc
- The destination documentreplace
- If true
, the items in the destination
document are replaced. If false
, the items in the
destination document are appended.DBaseDocument.copyAllItems(de.bea.domingo.DBaseDocument, boolean)
public final boolean computeWithForm(boolean raiseError)
Usage
The form is as follows:
computeWithForm
in interface DBaseDocument
raiseError
- If true, an error is raised if the validation fails. If
false, no error is raised; instead, the method returns false
if validation fails.
true
if there are no errors in the document, else
false
DBaseDocument.computeWithForm(boolean)
public final DBaseItem copyItem(DBaseItem item, java.lang.String s)
copyItem
in interface DBaseDocument
item
- The item, usually from another document, that you want to
copy. Cannot be null.s
- The name to assign to the copied item. Specify null to retain
the existing name of the item.
DBaseDocument.copyItem(de.bea.domingo.DBaseItem, java.lang.String)
public final DBaseItem copyItem(DBaseItem item)
copyItem
in interface DBaseDocument
item
- The item, usually from another document, that you want to
copy. Cannot be null.
DBaseDocument.copyItem(de.bea.domingo.DBaseItem)
public final DDocument createReplyMessage(boolean flag)
The new document does not contain a Subject item. If you want one, the program must explicitly add it to the document.
The new document does not automatically get mailed. If you want to mail it, the program must explicitly call the send method.
createReplyMessage
in interface DBaseDocument
flag
- If true
, the new document recipient list
contains all the recipients of the original. If
false
, the new document recipient list
contains only the sender of the original.
DBaseDocument.createReplyMessage(boolean)
public final void encrypt()
The encrypted document is not saved until you call save. Only the items for which isEncrypted is true are encrypted. Items for which isEncrypted is false remain visible to any user, even if the user does not have the proper encryption key.
If the EncryptionKeys property is set with one or more named keys, those keys are used to encrypt the document. Any user who has one of the encryption keys can decrypt the document. If there are no encryption keys specified, the document is encrypted with the user's public key, in which case only the user who encrypted the document can decrypt it.
If the program is running on a server, it must have permission to use Encrypt.
Since mail encryption works differently, do not use this method if you want to mail an encrypted document. Instead, set the EncryptOnSend property to true, and use the send method.
You cannot use the encrypt method on a Document object returned by getDocumentContext.
encrypt
in interface DBaseDocument
DBaseDocument.encrypt()
public final java.lang.String generateXML()
This method takes the same arguments as the transformXML method in EmbeddedObject, Item, MIMEEntity, and RichTextItem. The transformXML method reads the XML from an item, attachment, MIMEEntity, or rich text item and transforms the XML. The generateXML method generates the XML from the document and then transforms it.
The generateXML method supports the following simple items: Text, Text list, Number, Number list, Datetime, Datetime list
To generate form semantics, you must call computeWithForm method before calling the generateXML method.
generateXML
in interface DBaseDocument
DBaseDocument.generateXML()
public final void generateXML(java.io.Writer writer)
This method takes the same arguments as the transformXML method in EmbeddedObject, Item, MIMEEntity, and RichTextItem. The transformXML method reads the XML from an item, attachment, MIMEEntity, or rich text item and transforms the XML. The generateXML method generates the XML from the document and then transforms it.
The generateXML method supports the following simple items: Text, Text list, Number, Number list, Datetime, Datetime list
To generate form semantics, you must call computeWithForm method before calling the generateXML method.
generateXML
in interface DBaseDocument
writer
- The Writer that will receive the result XML.DBaseDocument.generateXML(java.io.Writer)
public final java.util.List getColumnValues()
getColumnValues
in interface DBaseDocument
DBaseDocument.getColumnValues()
public final java.util.List getEncryptionKeys()
Each element in EncryptionKeys contains the name of an encryption key that you want to use to encrypt the document. The document can be decrypted by any user who posesses one of the keys. If there are no encryption keys specified for a document, the document is encrypted with the current user's public key and can only be decrypted by that user.
You must call the encrypt and save methods to actually encrypt the document. Since encryption works differently when a document is mailed, the EncryptionKeys property has no effect when a document is encrypted when mailed.
The name of each encryption key in a document is stored in a text item called SecretEncryptionKeys. This property returns the contents of the item.
getEncryptionKeys
in interface DBaseDocument
DBaseDocument.getEncryptionKeys()
public final java.lang.Object getItemValueCustomData(java.lang.String name, java.lang.String s1)
getItemValueCustomData
in interface DBaseDocument
name
- The name of the item.s1
- The name of the data type. If specified, this name
must match the data type name specified when the item was
written. If omitted, no name checking occurs
DBaseDocument.getItemValueCustomData(java.lang.String, java.lang.String)
public final java.lang.Object getItemValueCustomData(java.lang.String name)
getItemValueCustomData
in interface DBaseDocument
name
- The name of the item.
DBaseDocument.getItemValueCustomData(java.lang.String)
public final byte[] getItemValueCustomDataBytes(java.lang.String name, java.lang.String s1)
getItemValueCustomDataBytes
in interface DBaseDocument
name
- The name of the item.s1
- The name of the data type. If specified, this name
must match the data type name specified when the item was
written. If omitted, no name checking occurs
DBaseDocument.getItemValueCustomDataBytes(java.lang.String, java.lang.String)
public final java.util.List getItemValueDateTimeArray(java.lang.String name)
getItemValueDateTimeArray
in interface DBaseDocument
name
- The name of the item.
DBaseDocument.getItemValueDateTimeArray(java.lang.String)
public final java.util.List getLockHolders()
If the document is locked, the vector contains the names of the lock holders. The document can be locked by one or more users or groups.
If the document is not locked, the vector contains one element whose value is an empty string ("").
getLockHolders
in interface DBaseDocument
DBaseDocument.getLockHolders()
public final java.util.List getReceivedItemText()
This method applies to Received items generated from an Internet mail message. The items can be in MIME or Notes format.
If the document has no Received items, this method returns a vector of one element whose value is an empty string.
A Received item with an incorrect format (not an Internet mail message) throws an exception.
getReceivedItemText
in interface DBaseDocument
DBaseDocument.getReceivedItemText()
public final java.lang.String getSigner()
If a document is not signed, returns an empty string.
If the signer is not trusted, returns an empty string.
getSigner
in interface DBaseDocument
DBaseDocument.getSigner()
public final int getSize()
getSize
in interface DBaseDocument
DBaseDocument.getSize()
public final java.lang.String getVerifier()
This property is an empty string if the document is not signed.
This property is an empty string if the signer is not trusted.
getVerifier
in interface DBaseDocument
DBaseDocument.getVerifier()
public final boolean hasEmbedded()
Note Embedded objects and object links are not supported for OS/2, UNIX, and the Macintosh. File attachments are.
hasEmbedded
in interface DBaseDocument
true
if the document contains one or more embedded
objects, object links, or file attachments , else
false
DBaseDocument.hasEmbedded()
public final boolean isDeleted()
isDeleted
in interface DBaseDocument
true
if the document is a deletion stub
false
if the document existsDBaseDocument.isDeleted()
public final boolean isEncrypted()
isEncrypted
in interface DBaseDocument
true
if the document is encrypted, else
false
DBaseDocument.isEncrypted()
public final boolean isEncryptOnSend()
isEncryptOnSend
in interface DBaseDocument
true
if the document is encrypted when mailed,
else false
DBaseDocument.isEncryptOnSend()
public final boolean isProfile()
isProfile
in interface DBaseDocument
true
if the document is a profile document, else
false
DBaseDocument.isProfile()
public final boolean isSaveMessageOnSend()
isSaveMessageOnSend
in interface DBaseDocument
true
if the document is saved when mailed, else
false
DBaseDocument.isSaveMessageOnSend()
public final boolean isSentByAgent()
isSentByAgent
in interface DBaseDocument
true
if the document was mailed by a program, else
false
DBaseDocument.isSentByAgent()
public final boolean isSigned()
isSigned
in interface DBaseDocument
true
if the document contains one or more
signatures, else false
DBaseDocument.isSigned()
public final boolean isSignOnSend()
isSignOnSend
in interface DBaseDocument
true
if the document is signed when mailed, else
false
DBaseDocument.isSignOnSend()
public final boolean isValid()
isValid
in interface DBaseDocument
true
if the document represents an existing
document, else false
DBaseDocument.isValid()
public final boolean lock()
lock
in interface DBaseDocument
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock()
public final boolean lock(boolean provisionalOk)
lock
in interface DBaseDocument
provisionalOk
- true
to permit the placement of a
provisional lock, false
(default) to not permit
a provisional lock
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock(boolean)
public final boolean lock(java.util.List names, boolean provisionalOk)
IsDocumentLockingEnabled in Database must be true or this method throws an exception.
This method:
The following actions occur depending on the current lock status:
If the document is modified by another user before the lock can be placed, this method throws an exception.
lock
in interface DBaseDocument
names
- The names of the lock holders. Each lock holder must be a
user or group. Defaults to one lock holder: the effective
user. The empty string ("") is not permitted.provisionalOk
- true
to permit the placement of a
provisional lock, false
(default) to not permit
a provisional lock
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock(java.util.List, boolean)
public final boolean lock(java.util.List names)
lock
in interface DBaseDocument
names
- the names of the lock holders
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock(java.util.List)
public final boolean lock(java.lang.String name, boolean provisionalOk)
lock
in interface DBaseDocument
name
- the name of the lock holderprovisionalOk
- true
to permit the placement of a
provisional lock, false
(default) to not permit
a provisional lock
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock(java.lang.String, boolean)
public final boolean lock(java.lang.String name)
lock
in interface DBaseDocument
name
- the name of the lock holder
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lock(java.lang.String)
public final boolean lockProvisional()
lockProvisional
in interface DBaseDocument
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lockProvisional()
public final boolean lockProvisional(java.util.List names)
lockProvisional
in interface DBaseDocument
names
- The names of the lock holders. Each lock holder must be a
user or group. Defaults to one lock holder: the effective
user. The empty string ("") is not permitted.
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lockProvisional(java.util.List)
public final boolean lockProvisional(java.lang.String name)
lockProvisional
in interface DBaseDocument
name
- The name of the lock holders. The lock holder must be a user
or group. Defaults to the effective user. The empty string
("") is not permitted.
true
if the lock is placed, false
if the lock is not placedDBaseDocument.lockProvisional(java.lang.String)
public final boolean removePermanently(boolean force)
This method does a hard deletion even if "Allow soft deletions" is enabled. See remove to do a soft deletion.
If you access a NotesDocument object through the Document property of NotesUIDocument, you can't delete the back-end document. If you could, the UI rendition would have no basis. You must access the document strictly through the back-end.
A deleted document cannot be used as a basis for navigation in a view or a document collection.
You cannot use the remove method on a Document object returned by
DAgentContext.getDocumentContext()
.
removePermanently
in interface DBaseDocument
force
- If true
, the document is deleted even if
another user modifies the document after the program opens it.
If false
, the document is not deleted if
another user modifies it.
true
if the document is successfully deleted,
false
if the document is not deleted, because
another user modified it and the force parameter is set to falseDBaseDocument.removePermanently(boolean)
public final boolean renderToRTItem(DRichTextItem richTextItem)
The picture is created using both the document and its form. Therefore, the input translation and validation formulas of the form are executed.
If the target rich text item is in a new document, you must save the document before calling renderToRTItem.
renderToRTItem
in interface DBaseDocument
richTextItem
- The destination for the picture. Cannot be null.
true
, the method is successful. If
false
, the method is not successful and the rich
text item remains unchanged. This can happen if an input
validation formula fails on the document form.DBaseDocument.renderToRTItem(de.bea.domingo.DRichTextItem)
public final DItem replaceItemValueCustomData(java.lang.String name, java.lang.Object obj)
replaceItemValueCustomData
in interface DBaseDocument
name
- the name of the itemobj
- object that contains the custom data. The class that defines
this object must implement Serializable. If desired, you can
override readObject and writeObject.
DBaseDocument.replaceItemValueCustomData(java.lang.String, java.lang.Object)
public final DItem replaceItemValueCustomData(java.lang.String name, java.lang.String type, java.lang.Object obj)
replaceItemValueCustomData
in interface DBaseDocument
name
- the name of the itemtype
- name for the data type. When getting custom data, use this
name for verification.obj
- object that contains the custom data. The class that defines
this object must implement Serializable. If desired, you can
override readObject and writeObject.
DBaseDocument.replaceItemValueCustomData(java.lang.String, java.lang.String, java.lang.Object)
public final DItem replaceItemValueCustomDataBytes(java.lang.String s, java.lang.String s1, byte[] abyte0)
replaceItemValueCustomDataBytes
in interface DBaseDocument
s
- the name of the items1
- name for the data type. When getting custom data, use this
name for verification.abyte0
- byte array that contains the custom data
DBaseDocument.replaceItemValueCustomDataBytes(java.lang.String, java.lang.String, byte[])
public final void setEncryptionKeys(java.util.List keys)
setEncryptionKeys
in interface DBaseDocument
keys
- the key(s) used to encrypt a documentDBaseDocument.setEncryptionKeys(java.util.List)
public final void setUniversalID(java.lang.String unid)
If two documents in replica databases share the same universal ID, the documents are replicas.
If you modify the UNID of an existing document, it becomes a new document.
Saving a document with the same UNID as an existing document an exception.
setUniversalID
in interface DBaseDocument
unid
- The universal ID is also known as the unique ID or UNID.DBaseDocument.setUniversalID(java.lang.String)
public final void unlock()
DDatabase.isDocumentLockingEnabled()
in Database must be true or this
method throws an exception. This method throws an exception if the
current user is not one of the lock holders and does not have lock
breaking authority.
unlock
in interface DBaseDocument
DBaseDocument.unlock()
public final boolean computeWithForm()
Usage
The form is as follows:
computeWithForm
in interface DBaseDocument
true
if there are no errors in the document, else
false
DBaseDocument.computeWithForm()
public final void recycle()
DBaseDocument
Different to the Notes Java-API, usually it is not necessary to use this method. One remaining case might be a document that was changed in another session (e.g. by a server agent) while still keeping a reference to the document.
recycle
in interface DBaseDocument
DBaseDocument.recycle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |