1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.bea.domingo;
24
25 import java.io.InputStream;
26 import java.io.Reader;
27 import java.util.Calendar;
28 import java.util.List;
29 import java.util.TimeZone;
30
31 /***
32 * Represents a discrete value or set of values in a document.
33 *
34 * <p>The client interface displays items in a document through fields on a
35 * form. When a field on a form and an item in a document have the same name,
36 * the field displays the item (for example, the Subject field displays the
37 * Subject item).</p> <p>All items in a document are accessible
38 * programmatically, regardless of what form is used to display the document in
39 * the user interface.</p>
40 *
41 * @author <a href=mailto:markus.toennis@bea.de>Marcus Toennis</a>
42 */
43 public interface DItem extends DBaseItem {
44
45 /*** item type. */
46 int UNKNOWN = 0;
47
48 /*** item type. */
49 int RICHTEXT = 1;
50
51 /*** item type. */
52 int COLLATION = 2;
53
54 /*** item type. */
55 int NOTEREFS = 4;
56
57 /*** item type. */
58 int ICON = 6;
59
60 /*** item type. */
61 int NOTELINKS = 7;
62
63 /*** item type. */
64 int SIGNATURE = 8;
65
66 /*** item type. */
67 int USERDATA = 14;
68
69 /*** item type. */
70 int QUERYCD = 15;
71
72 /*** item type. */
73 int ACTIONCD = 16;
74
75 /*** item type. */
76 int ASSISTANTINFO = 17;
77
78 /*** item type. */
79 int VIEWMAPDATA = 18;
80
81 /*** item type. */
82 int VIEWMAPLAYOUT = 19;
83
84 /*** item type. */
85 int LSOBJECT = 20;
86
87 /*** item type. */
88 int HTML = 21;
89
90 /*** item type. */
91 int MIME_PART = 25;
92
93 /*** item type. */
94 int ERRORITEM = 256;
95
96 /*** item type. */
97 int UNAVAILABLE = 512;
98
99 /*** item type. */
100 int NUMBERS = 768;
101
102 /*** item type. */
103 int DATETIMES = 1024;
104
105 /*** item type. */
106 int NAMES = 1074;
107
108 /*** item type. */
109 int READERS = 1075;
110
111 /*** item type. */
112 int AUTHORS = 1076;
113
114 /*** item type. */
115 int ATTACHMENT = 1084;
116
117 /*** item type. */
118 int OTHEROBJECT = 1085;
119
120 /*** item type. */
121 int EMBEDDEDOBJECT = 1090;
122
123 /*** item type. */
124 int TEXT = 1280;
125
126 /*** item type. */
127 int FORMULA = 1536;
128
129 /*** item type. */
130 int USERID = 1792;
131
132 /***
133 * Returns the value of an item.
134 *
135 * <p>If multiple items have the same name, this method returns the value
136 * of the first item. Use the Items property to get all the items.</p> <p>If
137 * the item has no value, this method returns an empty vector.</p> <p>If
138 * no item with the specified name exists, this method returns an empty
139 * vector. It does not throw an exception. Use hasItem to verify the
140 * existence of an item.</p> <p>This property returns the same value(s)
141 * for an item as getValues in Item.</p>
142 *
143 * @return The value or values contained in the item. The data type of the
144 * value depends on the data type of the item.
145 */
146 List getValues();
147
148 /***
149 * Sets the value of an item. <p>The value of an item in general is a list
150 * of values. <p>Legal types for the list elements are:<br/> <ul> <li><code>java.util.Calendar</code></li>
151 * <li><code>java.util.Integer</code></li> <li><code>java.util.Double</code></li>
152 * <li><code>java.util.String</code></li> </ul></p>
153 *
154 * @param values the values
155 */
156 void setValues(List values);
157
158 /***
159 * Returns the value of an item with a single text value.
160 *
161 * <p>If multiple items have the same name, this method returns the value
162 * of the first item. Use the Items property to get all the items.</p> <p>
163 * The value of the item cannot be null, but if the value is numeric or
164 * Calendar, this method returns an empty String.</p> <p>If no item with
165 * the specified name exists, this method returns null. It does not throw an
166 * exception. Use hasItem to verify the existence of an item.</p> <p>If
167 * the item has multiple values, this method returns the first value.</p>
168 *
169 * @return The value of the item as a String.
170 */
171 String getValueString();
172
173 /***
174 * Returns the value of an item with a single int value.
175 *
176 * <p>If multiple items have the same name, this method returns the value
177 * of the first item. Use the Items property to get all the items.</p> <p>If
178 * the value is text and is empty, this method returns <code>null</code>.</p>
179 * <p>If the value is text and cannot be converted to an integer, this
180 * method returns <code>null</code>.</p> <p>If no item with the
181 * specified name exists, this method returns <code>null</code>. It does
182 * not throw an exception. Use hasItem to verify the existence of an item.</p>
183 * <p>If the item has multiple values, this method returns the first value.</p>
184 * <p>A decimal number is rounded down if the fraction is less than 0.5 and
185 * up if the fraction is 0.5 or greater.</p>
186 *
187 * @return The value of the item, rounded to the nearest integer or
188 * <code>null</code>
189 */
190 Integer getValueInteger();
191
192 /***
193 * Returns the value of an item with a single double value.
194 *
195 * <p>If multiple items have the same name, this method returns the value
196 * of the first item. Use the Items property to get all the items.</p> <p>If
197 * the value is text and is empty, this method returns <code>null</code>.</p>
198 * <p>If the value is text and cannot be converted to a double, this method
199 * returns <code>null</code>.</p> <p>If no item with the specified name
200 * exists, this method returns <code>null</code>. It does not throw an
201 * exception. Use hasItem to verify the existence of an item.</p> <p>If
202 * the item has multiple values, this method returns the first value.</p>
203 * <p>A decimal number is rounded down if the fraction is less than 0.5 and
204 * up if the fraction is 0.5 or greater.</p>
205 *
206 * @return The value of the item, rounded to the nearest integer or
207 * <code>null</code>
208 */
209 Double getValueDouble();
210
211 /***
212 * Returns the value of an item with a single Calendar value.
213 * The date/time value of the item is stored in the calendar in the default
214 * time zone of the client.
215 *
216 * <p>If multiple items have the same name, this method returns the value
217 * of the first item. Use the Items property to get all the items.</p> <p>If
218 * value is numeric or text, this method returns <code>null</code>.</p>
219 * <p>If no item with the specified name exists, this method returns
220 * <code>null</code>. It does not throw an exception. Use hasItem to
221 * verify the existence of an item.</p> <p>If the item has multiple
222 * values, this method returns the first value.</p>
223 *
224 * @return The value of the item as a Calendar or <code>null</code> if the
225 * item doesn't contain a date/time value
226 */
227 Calendar getValueDateTime();
228
229 /***
230 * Returns the value of an item with two Calendar value, a date range.
231 *
232 * <p>If multiple items have the same name, this method returns the value
233 * of the first item. Use the Items property to get all the items.</p> <p>If
234 * value is numeric or text, this method returns <code>null</code>.</p>
235 * <p>If no item with the specified name exists, this method returns
236 * <code>null</code>. It does not throw an exception. Use hasItem to
237 * verify the existence of an item.</p>
238 *
239 * @return The value of the item as a DDateRange or <code>null</code> if
240 * the item doesn't contain any date/time value. The second value
241 * may be <code>null</code> if only one date/time was specified.
242 */
243 DDateRange getValueDateRange();
244
245 /***
246 * Sets the value of an item to a single string value.
247 *
248 * @param value the value to set
249 */
250 void setValueString(String value);
251
252 /***
253 * Sets the value of an item to a single numeric value.
254 *
255 * <p>If you want to simulate an empty field in the Lotus Notes Client, you
256 * should use this method with an object argument.
257 *
258 * @param i the value
259 * @see de.bea.domingo.DItem#setValueDouble(java.lang.Double)
260 */
261 void setValueInteger(int i);
262
263 /***
264 * Sets the value of an item to a single numeric value.
265 *
266 * <p>If the value is <code>null</code>, a <code>TEXT</code> item with
267 * an empty string value is set. This behavior is the same as the Lotus
268 * Notes Client does with empty fields.</p>
269 *
270 * @param i the value
271 */
272 void setValueInteger(Integer i);
273
274 /***
275 * Sets the value of an item to a single numeric value.
276 *
277 * <p>If you want to simulate an empty field in the Lotus Notes Client, you
278 * should use this method with an object argument.
279 *
280 * @param d the value
281 * @see de.bea.domingo.DItem#setValueDouble(java.lang.Double)
282 */
283 void setValueDouble(double d);
284
285 /***
286 * Sets the value of an item to a single numeric value.
287 *
288 * <p>If the value is <code>null</code>, a <code>TEXT</code> item with
289 * an empty string value is set. This behavior is the same as the Lotus
290 * Notes Client does with empty fields.</p>
291 *
292 * @param d the value
293 */
294 void setValueDouble(Double d);
295
296 /***
297 * Sets the value of an item to a single datetime value. The milliseconds
298 * are cut off.
299 *
300 * @param calendar the date
301 */
302 void setValueDateTime(Calendar calendar);
303
304 /***
305 * Sets the value of an item to a single time zone value.
306 *
307 * @param timezone the time zone
308 */
309 void setValueDateTime(TimeZone timezone);
310
311 /***
312 * Sets the value of an item to a date range. <p>If the value is
313 * <code>null</code>, a <code>TEXT</code> item with an empty string
314 * value is set. This behavior is the same as the Lotus Notes Client does
315 * with empty fields.</p> <p>If both calendars are null, an item with an
316 * empty string is created. If only one calendar is not null, this calendar
317 * is stored as a single date value.</p> The milliseconds are cut off.
318 *
319 * @param dateRange the date range
320 */
321 void setValueDateRange(DDateRange dateRange);
322
323 /***
324 * Sets the value of an item to a date range. <p>If both calendars are
325 * null, an item with an empty string is created. If only one calendar is
326 * not null, this calendar is stored as a single date value.</p> The
327 * milliseconds are cut off.
328 *
329 * @param calendar1 start date/time of range
330 * @param calendar2 end date/time of range
331 */
332 void setValueDateRange(Calendar calendar1, Calendar calendar2);
333
334 /***
335 * For an item that's a text list, adds a new value to the item without
336 * erasing any existing values.
337 *
338 * @param value The string you want to add to the item.
339 */
340 void appendToTextList(String value);
341
342 /***
343 * For an item that's a text list, adds a new value to the item without
344 * erasing any existing values.
345 *
346 * @param values The string(s) you want to add to the item. Each list
347 * element is an object of type String.
348 * @see #appendToTextList(java.lang.String)
349 */
350 void appendToTextList(List values);
351
352 /***
353 * Checks whether a value matches at least one of an item's values.
354 *
355 * @param value String value to check for
356 * @return <tt>true</tt> if the value matches one of the values in the
357 * item
358 */
359 boolean containsValue(String value);
360
361 /***
362 * Checks whether a value matches at least one of an item's values.
363 *
364 * @param value integer value to check for
365 * @return <tt>true</tt> if the value matches one of the values in the
366 * item
367 */
368 boolean containsValue(Integer value);
369
370 /***
371 * Checks whether a value matches at least one of an item's values.
372 *
373 * @param value integer value to check for
374 * @return <tt>true</tt> if the value matches one of the values in the
375 * item
376 */
377 boolean containsValue(int value);
378
379 /***
380 * Checks whether a value matches at least one of an item's values.
381 *
382 * @param value integer value to check for
383 * @return <tt>true</tt> if the value matches one of the values in the
384 * item
385 */
386 boolean containsValue(Double value);
387
388 /***
389 * Checks whether a value matches at least one of an item's values.
390 *
391 * @param value integer value to check for
392 * @return <tt>true</tt> if the value matches one of the values in the
393 * item
394 */
395 boolean containsValue(double value);
396
397 /***
398 * Checks whether a value matches at least one of an item's values.
399 *
400 * @param value Calendar value to check for
401 * @return <tt>true</tt> if the value matches one of the values in the
402 * item
403 */
404 boolean containsValue(Calendar value);
405
406 /***
407 * Indicates whether an item contains summary or non-summary data.
408 *
409 * <p>Items are flagged as containing summary or non-summary data. Summary
410 * data can appear in views and folders; non-summary data cannot. In
411 * general, items created through the UI are tagged as non-summary if they
412 * contain rich text or are very long.</p>
413 *
414 * <p>When you create a new item using appendItemValue or replaceItemValue
415 * in NotesDocument, the isSummary property for the item is true. If you
416 * don't want the item to appear in views and folders, you must change its
417 * IsSummary property to false.</p>
418 *
419 * <p>You can enable or disable the appearance of an existing item in views
420 * and folders by changing its IsSummary property.</p>
421 *
422 * <p>An item whose IsSummary property is true may not appear as expected
423 * in views and folders if the data is not suitable. For example, a rich
424 * text item whose IsSummary property is true generally appears as a
425 * question mark.</p>
426 *
427 * @return <code>true</code> if the item contains summary data
428 * <code>false</code> if the item contains non-summary data
429 */
430 boolean isSummary();
431
432 /***
433 * Indicates whether an item contains summary or non-summary data.
434 *
435 * <p>Items are flagged as containing summary or non-summary data. Summary
436 * data can appear in views and folders; non-summary data cannot. In
437 * general, items created through the UI are tagged as non-summary if they
438 * contain rich text or are very long.</p>
439 *
440 * <p>When you create a new item using appendItemValue or replaceItemValue
441 * in NotesDocument, the isSummary property for the item is true. If you
442 * don't want the item to appear in views and folders, you must change its
443 * IsSummary property to false.</p>
444 *
445 * <p>You can enable or disable the appearance of an existing item in views
446 * and folders by changing its IsSummary property.</p>
447 *
448 * <p>Example:<br/>
449 *
450 * <pre>
451 * DDocument doc;
452 * //...set value of doc...
453 * doc.replaceItemValue("MyNoSummaryItem", "myValue").setSummary(false);
454 * </pre>
455 *
456 * </p>
457 *
458 * @param flag <code>true</code> if the item contains summary data
459 * <code>false</code> if the item contains non-summary data
460 */
461 void setSummary(boolean flag);
462
463 /***
464 * Indicates whether an item is of type Readers.
465 *
466 * <p><b>Usage</b><br/> A Readers item contains a list of user names
467 * indicating people who have Reader access to a document. A Readers item
468 * returns <code>Item.TEXT</code> for getType.</p>
469 *
470 * @return <code>true</code> if the item is of type Readers, else
471 * <code>false</code>.
472 */
473 boolean isReaders();
474
475 /***
476 * Indicates whether an item is of type Names.
477 *
478 * <p><b>Usage</b><br/> A Names item contains a list of user names. A
479 * Names item returns <code>Item.TEXT</code> for getType.</p>
480 *
481 * @return <code>true</code> if the item is of type Names, else
482 * <code>false</code>.
483 */
484 boolean isNames();
485
486 /***
487 * Indicates whether an item is of type Names.
488 *
489 * <p><b>Usage</b><br/> A Names item contains a list of user names. A
490 * Readers item returns <code>Item.TEXT</code> for getType.
491 *
492 * <p>Example:<br/>
493 *
494 * <pre>
495 * DDocument doc;
496 * //...set value of doc...
497 * doc.replaceItemValue("MyNames", "[Admin]").setNames(true);
498 * </pre>
499 *
500 * </p>
501 *
502 * @param flag <code>true</code> if the item should be of type Names, else<code>false</code>.
503 */
504 void setNames(boolean flag);
505
506 /***
507 * Indicates whether an item is of type Readers.
508 *
509 * <p><b>Usage</b><br/> A Readers item contains a list of user names
510 * indicating people who have Reader access to a document. A Readers item
511 * returns <code>Item.TEXT</code> for getType.
512 *
513 * <p>Example:<br/>
514 *
515 * <pre>
516 * DDocument doc;
517 * //...set value of doc...
518 * doc.replaceItemValue("MyReaders", "[Admin]").setReaders(true);
519 * </pre>
520 *
521 * </p>
522 *
523 * @param flag <code>true</code> if the item should be of type Readers,
524 * else<code>false</code>.
525 */
526 void setReaders(boolean flag);
527
528 /***
529 * Indicates whether an item is of type Authors.
530 *
531 * <p><b>Usage</b><br/> An Authors item contains a list of user names
532 * indicating people who have Author access to a document. An Authors item
533 * returns <code>Item.TEXT</code> for getType.
534 *
535 * @return <code>true</code> if the item is of type Authors, else
536 * <code>false</code>.
537 */
538 boolean isAuthors();
539
540 /***
541 * Indicates whether a user needs at least Editor access to modify an item.
542 *
543 * @return <code>true</code> if you need at least Editor access to modify
544 * the item, <code>false</code> if you do not need Editor access
545 * to modify the item; you can modify it as long as you have Author
546 * access or better
547 */
548 boolean isProtected();
549
550 /***
551 * Indicates whether an item is of type Authors.
552 *
553 * <p><b>Usage</b><br/> An Authors item contains a list of user names
554 * indicating people who have Author access to a document. An Authors item
555 * returns <code>Item.TEXT</code> for getType.
556 *
557 * <p>Example:<br/>
558 *
559 * <pre>
560 * DDocument doc;
561 * //...set value of doc...
562 * doc.replaceItemValue("MyAuthors", "[Admin]").setAuthors(true);
563 * </pre>
564 *
565 * </p>
566 *
567 * @param flag <code>true</code> if the item should be of type Authors,
568 * else<code>false</code>.
569 */
570 void setAuthors(boolean flag);
571
572 /***
573 * Indicates whether a user needs at least Editor access to modify an item.
574 *
575 * @param flag <code>true</code> if you need at least Editor access to
576 * modify the item, <code>false</code> if you do not need
577 * Editor access to modify the item; you can modify it as long as
578 * you have Author access or better
579 */
580 void setProtected(boolean flag);
581
582 /***
583 * Returns the number of values in a item.
584 *
585 * @return number of values in an item.
586 */
587 int getSize();
588
589 /***
590 * Abbreviates the contents of a text item.
591 *
592 * @param maxlen The maximum length of the abbreviation.
593 * @param dropVowels Specify true if you want to drop vowels from the words
594 * in the item. Otherwise, specify false.
595 * @param userDict Specify true if you want to use the table of
596 * abbreviations in NOTEABBR.TXT. Otherwise, specify false.
597 * @return The contents of the item, with vowels dropped and abbreviations
598 * substituted (if specified), then truncated to fit to maximum length.
599 */
600 String abstractText(int maxlen, boolean dropVowels, boolean userDict);
601
602 /***
603 * Copies an item to a specified document. <p>When you call this method
604 * using a RichTextItem object, file attachments, embedded objects, and
605 * object links that are contained within the rich-text item are not copied
606 * to the destination document.</p>
607 *
608 * @param document The document on which to create the item. Cannot be null.
609 * @return The new item.
610 */
611 DItem copyItemToDocument(DDocument document);
612
613 /***
614 * Copies an item to a specified document. <p>When you call this method
615 * using a RichTextItem object, file attachments, embedded objects, and
616 * object links that are contained within the rich-text item are not copied
617 * to the destination document.</p>
618 *
619 * @param document The document on which to create the item. Cannot be null.
620 * @param newName The name of the new item. Specify an empty string ("") if
621 * you want to keep the name of the original item.
622 * @return The new item.
623 */
624 DItem copyItemToDocument(DDocument document, String newName);
625
626 /***
627 * The date that an item was last modified.
628 *
629 * @return The date that an item was last modified
630 */
631 Calendar getLastModified();
632
633 /***
634 * A plain text representation of an item's value.
635 *
636 * <p>Multiple values in a list are separated by semicolons in the returned
637 * string. If an item's value is large, the returned string may be
638 * truncated.</p> <p>For rich-text items, this property skips non-text
639 * data such as bitmaps and file attachments.</p> <p>For HTML items, this
640 * property returns null.</p>
641 *
642 * @return plain text representation of an item's value
643 */
644 String getText();
645
646 /***
647 * A plain text representation of an item's value.
648 *
649 * <p>Multiple values in a list are separated by semicolons in the returned
650 * string. If an item's value is large, the returned string may be
651 * truncated.</p> <p>For rich-text items, this property skips non-text
652 * data such as bitmaps and file attachments.</p> <p>For HTML items, this
653 * property returns null.</p>
654 *
655 * @param maxLen Maximum length of returned text
656 * @return plain text representation of an item's value
657 */
658 String getText(int maxLen);
659
660 /***
661 * The data type of an item.
662 *
663 * @return type of an item
664 */
665 int getType();
666
667 /***
668 * The bytes of internal storage, including overhead, required to store an item.
669 *
670 * @return length of value
671 */
672 int getValueLength();
673
674 /***
675 * Sets the value of an item to custom data from an object.
676 *
677 * <p>The new value replaces the existing value.</p>
678 *
679 * <p>To keep the changes, you must call Document.save after calling
680 * setValueCustomData.</p>
681 *
682 * <p>The custom data cannot exceed 64K.</p>
683 *
684 * <p>If you intend to get the custom data through a language binding other
685 * than Java, use a "Bytes" method.</p>
686 *
687 * @param type A name for the data type. When getting custom data, use this
688 * name for verification.
689 * @param obj An object that contains the custom data. The class that
690 * defines this object must implement Serializable. If desired,
691 * you can override readObject and writeObject.
692 *
693 * @since Lotus Notes/Domino Release 6
694 */
695 void setValueCustomData(String type, Object obj);
696
697 /***
698 * Sets the value of an item to custom data from an object.
699 *
700 * <p>The new value replaces the existing value.</p>
701 *
702 * <p>To keep the changes, you must call Document.save after calling
703 * setValueCustomData.</p>
704 *
705 * <p>The custom data cannot exceed 64K.</p>
706 *
707 * <p>If you intend to get the custom data through a language binding other
708 * than Java, use a "Bytes" method.</p>
709 *
710 * @param obj An object that contains the custom data. The class that
711 * defines this object must implement Serializable. If desired,
712 * you can override readObject and writeObject.
713 *
714 * @since Lotus Notes/Domino Release 6
715 */
716 void setValueCustomData(Object obj);
717
718 /***
719 * Sets the value of an item to custom data from a byte array.
720 *
721 * <p>The new value replaces the existing value.</p>
722 *
723 * <p>To keep the changes, you must call Document.save after calling
724 * setValueCustomData.</p>
725 *
726 * <p>The custom data cannot exceed 64K.</p>
727 *
728 * <p>If you intend to get the custom data through a language binding other
729 * than Java, use a "Bytes" method.</p>
730 *
731 * @param type A name for the data type. When getting custom data, use this
732 * name for verification.
733 * @param bytes A byte array that contains the custom data.
734 *
735 * @since Lotus Notes/Domino Release 6
736 */
737 void setValueCustomDataBytes(String type, byte[] bytes);
738
739 /***
740 * Returns as an object the value of an item containing custom data.
741 *
742 * @param type The name of the data type. If specified, this name must match
743 * the data type name specified when the item was written. If
744 * omitted, no name checking occurs.
745 * @return An object that receives the value of the item. Must have the same
746 * class definition as the object written to the item.
747 *
748 * @see #setValueCustomData(String, Object)
749 */
750 Object getValueCustomData(String type);
751
752 /***
753 * Returns as an object the value of an item containing custom data.
754 *
755 * @return An object that receives the value of the item. Must have the same
756 * class definition as the object written to the item.
757 *
758 * @see #setValueCustomData(String, Object)
759 */
760 Object getValueCustomData();
761
762 /***
763 * Returns as a byte array the value of an item containing custom data.
764 *
765 * @param type The name of the data type. This name must match the data type
766 * name specified when the item was written.
767 * @return A byte array that receives the value of the item.
768 *
769 * @see #setValueCustomDataBytes(String, byte[])
770 */
771 byte[] getValueCustomDataBytes(String type);
772
773 /***
774 * Indicates whether an item is encrypted.
775 *
776 * <p>If you set this property to true, the item is not actually encrypted
777 * until you call {@link DDocument#encrypt()} on the parent Document.</p>
778 *
779 * @return <code>true</code> if the item is encrypted, else
780 * <code>false</code>
781 */
782 boolean isEncrypted();
783
784 /***
785 * Indicates whether an item is encrypted.
786 *
787 * @param flag <code>true</code> if the item is encrypted, else
788 * <code>false</code>
789 */
790 void setEncrypted(boolean flag);
791
792 /***
793 * Indicates whether an item is saved when the document is saved.
794 *
795 * @return flag <code>true</code> (default) if the item is saved when the
796 * document is saved, else <code>false</code>
797 */
798 boolean isSaveToDisk();
799
800 /***
801 * Indicates whether an item is saved when the document is saved.
802 *
803 * @param flag <code>true</code> (default) if the item is saved when the
804 * document is saved, else <code>false</code>
805 */
806 void setSaveToDisk(boolean flag);
807
808 /***
809 * Indicates whether a document contains a signature.
810 *
811 * <p>use {@link DDocument#getSigner()} and {@link DDocument#getVerifier()}
812 * to get the Signer and Verifier for a signed document. To access the
813 * signature itself, you must find the item of type SIGNATURE in the
814 * document.</p>
815 *
816 * @return <code>true</code> if the document contains one or more
817 * signatures, else <code>false</code>
818 */
819 boolean isSigned();
820
821 /***
822 * Indicates whether an item contains a signature the next time the document
823 * is signed.
824 *
825 * @param flag <code>true</code> if the item is signed when the document
826 * is next signed
827 */
828 void setSigned(boolean flag);
829
830 /***
831 * Contents of an EmbeddedObject, Item, or MIMEEntity object in the form of
832 * a java.io.Reader object.
833 *
834 * @return Contents of an EmbeddedObject, Item, or MIMEEntity object in the
835 * form of a java.io.Reader object
836 *
837 * <p>This method creates a temporary file. The file is deleted when
838 * EmbeddedObject is recycled.</p>
839 */
840 Reader getReader();
841
842 /***
843 * InputStream representation of the contents of an EmbeddedObject, Item, or
844 * MIMEEntity object.
845 *
846 * <p>This method creates a temporary file. The file is deleted when
847 * EmbeddedObject is recycled.</p>
848 *
849 * @return InputStream representation of the contents of an EmbeddedObject,
850 * Item, or MIMEEntity object
851 */
852 InputStream getInputStream();
853 }