|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DItem
Represents a discrete value or set of values in a document.
The client interface displays items in a document through fields on a form. When a field on a form and an item in a document have the same name, the field displays the item (for example, the Subject field displays the Subject item).
All items in a document are accessible programmatically, regardless of what form is used to display the document in the user interface.
Field Summary | |
---|---|
static int |
ACTIONCD
item type. |
static int |
ASSISTANTINFO
item type. |
static int |
ATTACHMENT
item type. |
static int |
AUTHORS
item type. |
static int |
COLLATION
item type. |
static int |
DATETIMES
item type. |
static int |
EMBEDDEDOBJECT
item type. |
static int |
ERRORITEM
item type. |
static int |
FORMULA
item type. |
static int |
HTML
item type. |
static int |
ICON
item type. |
static int |
LSOBJECT
item type. |
static int |
MIME_PART
item type. |
static int |
NAMES
item type. |
static int |
NOTELINKS
item type. |
static int |
NOTEREFS
item type. |
static int |
NUMBERS
item type. |
static int |
OTHEROBJECT
item type. |
static int |
QUERYCD
item type. |
static int |
READERS
item type. |
static int |
RICHTEXT
item type. |
static int |
SIGNATURE
item type. |
static int |
TEXT
item type. |
static int |
UNAVAILABLE
item type. |
static int |
UNKNOWN
item type. |
static int |
USERDATA
item type. |
static int |
USERID
item type. |
static int |
VIEWMAPDATA
item type. |
static int |
VIEWMAPLAYOUT
item type. |
Method Summary | |
---|---|
java.lang.String |
abstractText(int maxlen,
boolean dropVowels,
boolean userDict)
Abbreviates the contents of a text item. |
void |
appendToTextList(java.util.List values)
For an item that's a text list, adds a new value to the item without erasing any existing values. |
void |
appendToTextList(java.lang.String value)
For an item that's a text list, adds a new value to the item without erasing any existing values. |
boolean |
containsValue(java.util.Calendar value)
Checks whether a value matches at least one of an item's values. |
boolean |
containsValue(double value)
Checks whether a value matches at least one of an item's values. |
boolean |
containsValue(java.lang.Double value)
Checks whether a value matches at least one of an item's values. |
boolean |
containsValue(int value)
Checks whether a value matches at least one of an item's values. |
boolean |
containsValue(java.lang.Integer value)
Checks whether a value matches at least one of an item's values. |
boolean |
containsValue(java.lang.String value)
Checks whether a value matches at least one of an item's values. |
DItem |
copyItemToDocument(DDocument document)
Copies an item to a specified document. |
DItem |
copyItemToDocument(DDocument document,
java.lang.String newName)
Copies an item to a specified document. |
java.io.InputStream |
getInputStream()
InputStream representation of the contents of an EmbeddedObject, Item, or MIMEEntity object. |
java.util.Calendar |
getLastModified()
The date that an item was last modified. |
java.io.Reader |
getReader()
Contents of an EmbeddedObject, Item, or MIMEEntity object in the form of a java.io.Reader object. |
int |
getSize()
Returns the number of values in a item. |
java.lang.String |
getText()
A plain text representation of an item's value. |
java.lang.String |
getText(int maxLen)
A plain text representation of an item's value. |
int |
getType()
The data type of an item. |
java.lang.Object |
getValueCustomData()
Returns as an object the value of an item containing custom data. |
java.lang.Object |
getValueCustomData(java.lang.String type)
Returns as an object the value of an item containing custom data. |
byte[] |
getValueCustomDataBytes(java.lang.String type)
Returns as a byte array the value of an item containing custom data. |
DDateRange |
getValueDateRange()
Returns the value of an item with two Calendar value, a date range. |
java.util.Calendar |
getValueDateTime()
Returns the value of an item with a single Calendar value. |
java.lang.Double |
getValueDouble()
Returns the value of an item with a single double value. |
java.lang.Integer |
getValueInteger()
Returns the value of an item with a single int value. |
int |
getValueLength()
The bytes of internal storage, including overhead, required to store an item. |
java.util.List |
getValues()
Returns the value of an item. |
java.lang.String |
getValueString()
Returns the value of an item with a single text value. |
boolean |
isAuthors()
Indicates whether an item is of type Authors. |
boolean |
isEncrypted()
Indicates whether an item is encrypted. |
boolean |
isNames()
Indicates whether an item is of type Names. |
boolean |
isProtected()
Indicates whether a user needs at least Editor access to modify an item. |
boolean |
isReaders()
Indicates whether an item is of type Readers. |
boolean |
isSaveToDisk()
Indicates whether an item is saved when the document is saved. |
boolean |
isSigned()
Indicates whether a document contains a signature. |
boolean |
isSummary()
Indicates whether an item contains summary or non-summary data. |
void |
setAuthors(boolean flag)
Indicates whether an item is of type Authors. |
void |
setEncrypted(boolean flag)
Indicates whether an item is encrypted. |
void |
setNames(boolean flag)
Indicates whether an item is of type Names. |
void |
setProtected(boolean flag)
Indicates whether a user needs at least Editor access to modify an item. |
void |
setReaders(boolean flag)
Indicates whether an item is of type Readers. |
void |
setSaveToDisk(boolean flag)
Indicates whether an item is saved when the document is saved. |
void |
setSigned(boolean flag)
Indicates whether an item contains a signature the next time the document is signed. |
void |
setSummary(boolean flag)
Indicates whether an item contains summary or non-summary data. |
void |
setValueCustomData(java.lang.Object obj)
Sets the value of an item to custom data from an object. |
void |
setValueCustomData(java.lang.String type,
java.lang.Object obj)
Sets the value of an item to custom data from an object. |
void |
setValueCustomDataBytes(java.lang.String type,
byte[] bytes)
Sets the value of an item to custom data from a byte array. |
void |
setValueDateRange(java.util.Calendar calendar1,
java.util.Calendar calendar2)
Sets the value of an item to a date range. |
void |
setValueDateRange(DDateRange dateRange)
Sets the value of an item to a date range. |
void |
setValueDateTime(java.util.Calendar calendar)
Sets the value of an item to a single datetime value. |
void |
setValueDateTime(java.util.TimeZone timezone)
Sets the value of an item to a single time zone value. |
void |
setValueDouble(double d)
Sets the value of an item to a single numeric value. |
void |
setValueDouble(java.lang.Double d)
Sets the value of an item to a single numeric value. |
void |
setValueInteger(int i)
Sets the value of an item to a single numeric value. |
void |
setValueInteger(java.lang.Integer i)
Sets the value of an item to a single numeric value. |
void |
setValues(java.util.List values)
Sets the value of an item. |
void |
setValueString(java.lang.String value)
Sets the value of an item to a single string value. |
Methods inherited from interface de.bea.domingo.DBaseItem |
---|
getName, remove |
Methods inherited from interface de.bea.domingo.DBase |
---|
equals, hashCode, toString |
Field Detail |
---|
static final int UNKNOWN
static final int RICHTEXT
static final int COLLATION
static final int NOTEREFS
static final int ICON
static final int NOTELINKS
static final int SIGNATURE
static final int USERDATA
static final int QUERYCD
static final int ACTIONCD
static final int ASSISTANTINFO
static final int VIEWMAPDATA
static final int VIEWMAPLAYOUT
static final int LSOBJECT
static final int HTML
static final int MIME_PART
static final int ERRORITEM
static final int UNAVAILABLE
static final int NUMBERS
static final int DATETIMES
static final int NAMES
static final int READERS
static final int AUTHORS
static final int ATTACHMENT
static final int OTHEROBJECT
static final int EMBEDDEDOBJECT
static final int TEXT
static final int FORMULA
static final int USERID
Method Detail |
---|
java.util.List getValues()
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.
void setValues(java.util.List values)
The value of an item in general is a list of values.
Legal types for the list elements are:
java.util.Calendar
java.util.Integer
java.util.Double
java.util.String
values
- the valuesjava.lang.String getValueString()
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.
java.lang.Integer getValueInteger()
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 an 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.
null
java.lang.Double getValueDouble()
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.
A decimal number is rounded down if the fraction is less than 0.5 and up if the fraction is 0.5 or greater.
null
java.util.Calendar getValueDateTime()
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.
null
if the
item doesn't contain a date/time valueDDateRange getValueDateRange()
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.
null
if
the item doesn't contain any date/time value. The second value
may be null
if only one date/time was specified.void setValueString(java.lang.String value)
value
- the value to setvoid setValueInteger(int i)
If you want to simulate an empty field in the Lotus Notes Client, you should use this method with an object argument.
i
- the valuesetValueDouble(java.lang.Double)
void setValueInteger(java.lang.Integer i)
If the value is null
, a TEXT
item with
an empty string value is set. This behavior is the same as the Lotus
Notes Client does with empty fields.
i
- the valuevoid setValueDouble(double d)
If you want to simulate an empty field in the Lotus Notes Client, you should use this method with an object argument.
d
- the valuesetValueDouble(java.lang.Double)
void setValueDouble(java.lang.Double d)
If the value is null
, a TEXT
item with
an empty string value is set. This behavior is the same as the Lotus
Notes Client does with empty fields.
d
- the valuevoid setValueDateTime(java.util.Calendar calendar)
calendar
- the datevoid setValueDateTime(java.util.TimeZone timezone)
timezone
- the time zonevoid setValueDateRange(DDateRange dateRange)
If the value is
null
, a TEXT
item with an empty string
value is set. This behavior is the same as the Lotus Notes Client does
with empty fields.
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.
dateRange
- the date rangevoid setValueDateRange(java.util.Calendar calendar1, java.util.Calendar calendar2)
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.
calendar1
- start date/time of rangecalendar2
- end date/time of rangevoid appendToTextList(java.lang.String value)
value
- The string you want to add to the item.void appendToTextList(java.util.List values)
values
- The string(s) you want to add to the item. Each list
element is an object of type String.appendToTextList(java.lang.String)
boolean containsValue(java.lang.String value)
value
- String value to check for
boolean containsValue(java.lang.Integer value)
value
- integer value to check for
boolean containsValue(int value)
value
- integer value to check for
boolean containsValue(java.lang.Double value)
value
- integer value to check for
boolean containsValue(double value)
value
- integer value to check for
boolean containsValue(java.util.Calendar value)
value
- Calendar value to check for
boolean isSummary()
Items are flagged as containing summary or non-summary data. Summary data can appear in views and folders; non-summary data cannot. In general, items created through the UI are tagged as non-summary if they contain rich text or are very long.
When you create a new item using appendItemValue or replaceItemValue in NotesDocument, the isSummary property for the item is true. If you don't want the item to appear in views and folders, you must change its IsSummary property to false.
You can enable or disable the appearance of an existing item in views and folders by changing its IsSummary property.
An item whose IsSummary property is true may not appear as expected in views and folders if the data is not suitable. For example, a rich text item whose IsSummary property is true generally appears as a question mark.
true
if the item contains summary data
false
if the item contains non-summary datavoid setSummary(boolean flag)
Items are flagged as containing summary or non-summary data. Summary data can appear in views and folders; non-summary data cannot. In general, items created through the UI are tagged as non-summary if they contain rich text or are very long.
When you create a new item using appendItemValue or replaceItemValue in NotesDocument, the isSummary property for the item is true. If you don't want the item to appear in views and folders, you must change its IsSummary property to false.
You can enable or disable the appearance of an existing item in views and folders by changing its IsSummary property.
Example:
DDocument doc; //...set value of doc... doc.replaceItemValue("MyNoSummaryItem", "myValue").setSummary(false);
flag
- true
if the item contains summary data
false
if the item contains non-summary databoolean isReaders()
Usage
A Readers item contains a list of user names
indicating people who have Reader access to a document. A Readers item
returns Item.TEXT
for getType.
true
if the item is of type Readers, else
false
.boolean isNames()
Usage
A Names item contains a list of user names. A
Names item returns Item.TEXT
for getType.
true
if the item is of type Names, else
false
.void setNames(boolean flag)
Usage
A Names item contains a list of user names. A
Readers item returns Item.TEXT
for getType.
Example:
DDocument doc; //...set value of doc... doc.replaceItemValue("MyNames", "[Admin]").setNames(true);
flag
- true
if the item should be of type Names, elsefalse
.void setReaders(boolean flag)
Usage
A Readers item contains a list of user names
indicating people who have Reader access to a document. A Readers item
returns Item.TEXT
for getType.
Example:
DDocument doc; //...set value of doc... doc.replaceItemValue("MyReaders", "[Admin]").setReaders(true);
flag
- true
if the item should be of type Readers,
elsefalse
.boolean isAuthors()
Usage
An Authors item contains a list of user names
indicating people who have Author access to a document. An Authors item
returns Item.TEXT
for getType.
true
if the item is of type Authors, else
false
.boolean isProtected()
true
if you need at least Editor access to modify
the item, false
if you do not need Editor access
to modify the item; you can modify it as long as you have Author
access or bettervoid setAuthors(boolean flag)
Usage
An Authors item contains a list of user names
indicating people who have Author access to a document. An Authors item
returns Item.TEXT
for getType.
Example:
DDocument doc; //...set value of doc... doc.replaceItemValue("MyAuthors", "[Admin]").setAuthors(true);
flag
- true
if the item should be of type Authors,
elsefalse
.void setProtected(boolean flag)
flag
- true
if you need at least Editor access to
modify the item, false
if you do not need
Editor access to modify the item; you can modify it as long as
you have Author access or betterint getSize()
java.lang.String abstractText(int maxlen, boolean dropVowels, boolean userDict)
maxlen
- The maximum length of the abbreviation.dropVowels
- Specify true if you want to drop vowels from the words
in the item. Otherwise, specify false.userDict
- Specify true if you want to use the table of
abbreviations in NOTEABBR.TXT. Otherwise, specify false.
DItem copyItemToDocument(DDocument document)
When you call this method using a RichTextItem object, file attachments, embedded objects, and object links that are contained within the rich-text item are not copied to the destination document.
document
- The document on which to create the item. Cannot be null.
DItem copyItemToDocument(DDocument document, java.lang.String newName)
When you call this method using a RichTextItem object, file attachments, embedded objects, and object links that are contained within the rich-text item are not copied to the destination document.
document
- The document on which to create the item. Cannot be null.newName
- The name of the new item. Specify an empty string ("") if
you want to keep the name of the original item.
java.util.Calendar getLastModified()
java.lang.String getText()
Multiple values in a list are separated by semicolons in the returned string. If an item's value is large, the returned string may be truncated.
For rich-text items, this property skips non-text data such as bitmaps and file attachments.
For HTML items, this property returns null.
java.lang.String getText(int maxLen)
Multiple values in a list are separated by semicolons in the returned string. If an item's value is large, the returned string may be truncated.
For rich-text items, this property skips non-text data such as bitmaps and file attachments.
For HTML items, this property returns null.
maxLen
- Maximum length of returned text
int getType()
int getValueLength()
void setValueCustomData(java.lang.String type, java.lang.Object obj)
The new value replaces the existing value.
To keep the changes, you must call Document.save after calling setValueCustomData.
The custom data cannot exceed 64K.
If you intend to get the custom data through a language binding other than Java, use a "Bytes" method.
type
- A name for the data type. When getting custom data, use this
name for verification.obj
- An object that contains the custom data. The class that
defines this object must implement Serializable. If desired,
you can override readObject and writeObject.void setValueCustomData(java.lang.Object obj)
The new value replaces the existing value.
To keep the changes, you must call Document.save after calling setValueCustomData.
The custom data cannot exceed 64K.
If you intend to get the custom data through a language binding other than Java, use a "Bytes" method.
obj
- An object that contains the custom data. The class that
defines this object must implement Serializable. If desired,
you can override readObject and writeObject.void setValueCustomDataBytes(java.lang.String type, byte[] bytes)
The new value replaces the existing value.
To keep the changes, you must call Document.save after calling setValueCustomData.
The custom data cannot exceed 64K.
If you intend to get the custom data through a language binding other than Java, use a "Bytes" method.
type
- A name for the data type. When getting custom data, use this
name for verification.bytes
- A byte array that contains the custom data.java.lang.Object getValueCustomData(java.lang.String type)
type
- 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.
setValueCustomData(String, Object)
java.lang.Object getValueCustomData()
setValueCustomData(String, Object)
byte[] getValueCustomDataBytes(java.lang.String type)
type
- The name of the data type. This name must match the data type
name specified when the item was written.
setValueCustomDataBytes(String, byte[])
boolean isEncrypted()
If you set this property to true, the item is not actually encrypted
until you call DBaseDocument.encrypt()
on the parent Document.
true
if the item is encrypted, else
false
void setEncrypted(boolean flag)
flag
- true
if the item is encrypted, else
false
boolean isSaveToDisk()
true
(default) if the item is saved when the
document is saved, else false
void setSaveToDisk(boolean flag)
flag
- true
(default) if the item is saved when the
document is saved, else false
boolean isSigned()
use DBaseDocument.getSigner()
and DBaseDocument.getVerifier()
to get the Signer and Verifier for a signed document. To access the
signature itself, you must find the item of type SIGNATURE in the
document.
true
if the document contains one or more
signatures, else false
void setSigned(boolean flag)
flag
- true
if the item is signed when the document
is next signedjava.io.Reader getReader()
This method creates a temporary file. The file is deleted when EmbeddedObject is recycled.
java.io.InputStream getInputStream()
This method creates a temporary file. The file is deleted when EmbeddedObject is recycled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |