|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.bea.domingo.monitor.AbstractMonitorEnabled
de.bea.domingo.proxy.BaseProxy
de.bea.domingo.proxy.BaseItemProxy
de.bea.domingo.proxy.ItemProxy
public final class ItemProxy
This class represents the Domino-Class Item.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.bea.domingo.proxy.BaseProxy |
|---|
BaseProxy.DocumentCollectionIterator |
| Field Summary | |
|---|---|
static int |
MAX_VALUE_SIZE
Maximum size of an items value. |
static int |
VALUE_SEPERATOR_SIZE
Size of a multiple value separator. |
static int |
VALUE_SIZE_CALENDAR
Value size of date/time value stored in a Notes item. |
static int |
VALUE_SIZE_NUMBER
Value size of numeric value stored in a Notes item. |
| Fields inherited from class de.bea.domingo.proxy.BaseProxy |
|---|
DATETIME_STRING_LENGTH, EMPTY_STRING, MAX_DATETIME_LENGTH, NUM_DATETIME_VALUES, RESOURCES |
| Fields inherited from interface de.bea.domingo.DItem |
|---|
ACTIONCD, ASSISTANTINFO, ATTACHMENT, AUTHORS, COLLATION, DATETIMES, EMBEDDEDOBJECT, ERRORITEM, FORMULA, HTML, ICON, LSOBJECT, MIME_PART, NAMES, NOTELINKS, NOTEREFS, NUMBERS, OTHEROBJECT, QUERYCD, READERS, RICHTEXT, SIGNATURE, TEXT, UNAVAILABLE, UNKNOWN, USERDATA, USERID, VIEWMAPDATA, VIEWMAPLAYOUT |
| Constructor Summary | |
|---|---|
protected |
ItemProxy(NotesProxyFactory theFactory,
DBase parent,
lotus.domino.Item theItem,
DNotesMonitor monitor)
Constructor for DItemImpl. |
| 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 value)
Sets the value of an item to a date range. |
void |
setValueDateTime(java.util.Calendar value)
Sets the value of an item to a single datetime value. |
void |
setValueDateTime(java.util.TimeZone value)
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 class de.bea.domingo.proxy.BaseItemProxy |
|---|
getInstance, getItem, getName, remove, toString |
| Methods inherited from class de.bea.domingo.monitor.AbstractMonitorEnabled |
|---|
getMonitor, setMonitor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.bea.domingo.DBaseItem |
|---|
getName, remove |
| Methods inherited from interface de.bea.domingo.DBase |
|---|
equals, hashCode, toString |
| Field Detail |
|---|
public static final int MAX_VALUE_SIZE
public static final int VALUE_SEPERATOR_SIZE
public static final int VALUE_SIZE_NUMBER
public static final int VALUE_SIZE_CALENDAR
| Constructor Detail |
|---|
protected ItemProxy(NotesProxyFactory theFactory,
DBase parent,
lotus.domino.Item theItem,
DNotesMonitor monitor)
theFactory - the controlling factoryparent - the parent objecttheItem - the Notes item objectmonitor - the monitor| Method Detail |
|---|
public 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.
getValues in interface DItemDItem.getValues()public java.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.
getValueString in interface DItemDItem.getValueString()public 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.
getValueInteger in interface DItemnullDItem.getValueInteger()public 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.
getValueDouble in interface DItemnullDItem.getValueDouble()public 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.
getValueDateTime in interface DItemnull if the
item doesn't contain a date/time valueDItem.getValueDateTime()public DDateRange 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.
getValueDateRange in interface DItemnull if
the item doesn't contain any date/time value. The second value
may be null if only one date/time was specified.DItem.getValueDateRange()public void appendToTextList(java.lang.String value)
appendToTextList in interface DItemvalue - The string you want to add to the item.DItem.appendToTextList(java.lang.String)public void appendToTextList(java.util.List values)
appendToTextList in interface DItemvalues - The string(s) you want to add to the item. Each list
element is an object of type String.DItem.appendToTextList(java.util.List)public boolean containsValue(java.lang.String value)
containsValue in interface DItemvalue - String value to check for
DItem.containsValue(java.lang.String)public boolean containsValue(java.lang.Integer value)
containsValue in interface DItemvalue - integer value to check for
DItem.containsValue(java.lang.Integer)public boolean containsValue(int value)
containsValue in interface DItemvalue - integer value to check for
DItem.containsValue(int)public boolean containsValue(java.lang.Double value)
containsValue in interface DItemvalue - integer value to check for
DItem.containsValue(java.lang.Double)public boolean containsValue(double value)
containsValue in interface DItemvalue - integer value to check for
DItem.containsValue(double)public boolean containsValue(java.util.Calendar value)
containsValue in interface DItemvalue - Calendar value to check for
DItem.containsValue(java.util.Calendar)public void setValueDateTime(java.util.Calendar value)
setValueDateTime in interface DItemvalue - the dateDItem.setValueDateTime(java.util.Calendar)public void setValueDateRange(DDateRange value)
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.
setValueDateRange in interface DItemvalue - the date rangeDItem.setValueDateRange(de.bea.domingo.DDateRange)
public void 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.
setValueDateRange in interface DItemcalendar1 - start date/time of rangecalendar2 - end date/time of rangeDItem.setValueDateRange(java.util.Calendar, java.util.Calendar)public void 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.
setValueDouble in interface DItemd - the valueDItem.setValueDouble(double)public 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.
setValueDouble in interface DItemd - the valueDItem.setValueDouble(java.lang.Double)public void 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.
setValueInteger in interface DItemi - the valueDItem.setValueInteger(int)public 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.
setValueInteger in interface DItemi - the valueDItem.setValueInteger(java.lang.Integer)public 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.Calendarjava.util.Integerjava.util.Doublejava.util.String
setValues in interface DItemvalues - the valuesDItem.setValues(java.util.List)public void setValueString(java.lang.String value)
setValueString in interface DItemvalue - the value to setDItem.setValueString(java.lang.String)public 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.
isSummary in interface DItemtrue if the item contains summary data
false if the item contains non-summary dataDItem.isSummary()public void 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);
setSummary in interface DItemflag - true if the item contains summary data
false if the item contains non-summary dataDItem.setSummary(boolean)public boolean isNames()
Usage
A Names item contains a list of user names. A
Names item returns Item.TEXT for getType.
isNames in interface DItemtrue if the item is of type Names, else
false.DItem.isNames()public 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);
setNames in interface DItemflag - true if the item should be of type Names, elsefalse.DItem.setNames(boolean)public boolean 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.
isReaders in interface DItemtrue if the item is of type Readers, else
false.DItem.isReaders()public 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);
setReaders in interface DItemflag - true if the item should be of type Readers,
elsefalse.DItem.setReaders(boolean)public 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.
isAuthors in interface DItemtrue if the item is of type Authors, else
false.DItem.isAuthors()public void 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);
setAuthors in interface DItemflag - true if the item should be of type Authors,
elsefalse.DItem.setAuthors(boolean)public int getSize()
getSize in interface DItemDItem.getSize()public boolean isProtected()
isProtected in interface DItemtrue 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 betterDItem.isProtected()public void setProtected(boolean flag)
setProtected in interface DItemflag - 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 betterDItem.setProtected(boolean)
public java.lang.String abstractText(int maxlen,
boolean dropVowels,
boolean userDict)
abstractText in interface DItemmaxlen - 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.abstractText(int, boolean, boolean)public 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.
copyItemToDocument in interface DItemdocument - The document on which to create the item. Cannot be null.
DItem.copyItemToDocument(de.bea.domingo.DDocument)
public 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.
copyItemToDocument in interface DItemdocument - 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.
DItem.copyItemToDocument(de.bea.domingo.DDocument, java.lang.String)public java.util.Calendar getLastModified()
getLastModified in interface DItemDItem.getLastModified()public 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.
getText in interface DItemDItem.getText()public 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.
getText in interface DItemmaxLen - Maximum length of returned text
DItem.getText(int)public int getType()
getType in interface DItemDItem.getType()public int getValueLength()
getValueLength in interface DItemDItem.getValueLength()
public 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.
setValueCustomData in interface DItemtype - 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.DItem.setValueCustomData(java.lang.String, java.lang.Object)public 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.
setValueCustomData in interface DItemobj - An object that contains the custom data. The class that
defines this object must implement Serializable. If desired,
you can override readObject and writeObject.DItem.setValueCustomData(java.lang.Object)
public 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.
setValueCustomDataBytes in interface DItemtype - A name for the data type. When getting custom data, use this
name for verification.bytes - A byte array that contains the custom data.DItem.setValueCustomDataBytes(java.lang.String, byte[])public java.lang.Object getValueCustomData(java.lang.String type)
getValueCustomData in interface DItemtype - 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.
DItem.getValueCustomData(java.lang.String)public java.lang.Object getValueCustomData()
getValueCustomData in interface DItemDItem.getValueCustomData()public byte[] getValueCustomDataBytes(java.lang.String type)
getValueCustomDataBytes in interface DItemtype - The name of the data type. This name must match the data type
name specified when the item was written.
DItem.getValueCustomDataBytes(java.lang.String)public boolean isEncrypted()
If you set this property to true, the item is not actually encrypted
until you call DBaseDocument.encrypt() on the parent Document.
isEncrypted in interface DItemtrue if the item is encrypted, else
falseDItem.isEncrypted()public void setEncrypted(boolean flag)
setEncrypted in interface DItemflag - true if the item is encrypted, else
falseDItem.setEncrypted(boolean)public boolean isSaveToDisk()
isSaveToDisk in interface DItemtrue (default) if the item is saved when the
document is saved, else falseDItem.isSaveToDisk()public void setSaveToDisk(boolean flag)
setSaveToDisk in interface DItemflag - true (default) if the item is saved when the
document is saved, else falseDItem.setSaveToDisk(boolean)public 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.
isSigned in interface DItemtrue if the document contains one or more
signatures, else falseDItem.isSigned()public void setSigned(boolean flag)
setSigned in interface DItemflag - true if the item is signed when the document
is next signedDItem.setSigned(boolean)public java.io.Reader getReader()
getReader in interface DItemThis method creates a temporary file. The file is deleted when EmbeddedObject is recycled.
DItem.getReader()public java.io.InputStream getInputStream()
This method creates a temporary file. The file is deleted when EmbeddedObject is recycled.
getInputStream in interface DItemDItem.getInputStream()public void setValueDateTime(java.util.TimeZone value)
setValueDateTime in interface DItemvalue - the time zoneDItem.setValueDateTime(java.util.TimeZone)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||