View Javadoc

1   /*
2    * This file is part of Domingo
3    * an Open Source Java-API to Lotus Notes/Domino
4    * hosted at http://domingo.sourceforge.net
5    *
6    * Copyright (c) 2003-2007 Beck et al. projects GmbH Munich, Germany (http://www.bea.de)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 2.1 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, write to the Free Software
20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21   */
22  
23  package de.bea.domingo.mock;
24  
25  import java.io.Writer;
26  import java.util.ArrayList;
27  import java.util.Calendar;
28  import java.util.Hashtable;
29  import java.util.Iterator;
30  import java.util.List;
31  import java.util.Map;
32  import java.util.TimeZone;
33  
34  import de.bea.domingo.DBaseDocument;
35  import de.bea.domingo.DBaseItem;
36  import de.bea.domingo.DDatabase;
37  import de.bea.domingo.DDateRange;
38  import de.bea.domingo.DDocument;
39  import de.bea.domingo.DEmbeddedObject;
40  import de.bea.domingo.DItem;
41  import de.bea.domingo.DRichTextItem;
42  import de.bea.domingo.DView;
43  
44  /***
45   * Transient mock implementation of interface DDocument.
46   *
47   * @author <a href=mailto:christian.wied@bea.de>Christian Wied</a>
48   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
49   */
50  public final class MockDocument implements DDocument {
51  
52      /*** serial version ID for serialization. */
53      private static final long serialVersionUID = 3257009860418679352L;
54  
55      /*** List of authors of a document. */
56      private List authors = new ArrayList();
57  
58      /*** Map of all items of a document. */
59      private Map items = new Hashtable();
60  
61      /***
62       * {@inheritDoc}
63       *
64       * @see de.bea.domingo.DDocument#isNewNote()
65       */
66      public boolean isNewNote() {
67          return false;
68      }
69  
70      /***
71       * {@inheritDoc}
72       *
73       * @see de.bea.domingo.DDocument#getUniversalID()
74       */
75      public String getUniversalID() {
76          return null;
77      }
78  
79      /***
80       * {@inheritDoc}
81       *
82       * @see de.bea.domingo.DDocument#getNoteID()
83       */
84      public String getNoteID() {
85          return null;
86      }
87  
88      /***
89       * {@inheritDoc}
90       *
91       * @see de.bea.domingo.DDocument#send(java.lang.String)
92       */
93      public void send(final String recipient) {
94          throw new UnsupportedOperationException("send() not supported in MockDocument");
95      }
96  
97      /***
98       * {@inheritDoc}
99       *
100      * @see de.bea.domingo.DDocument#send(java.util.List)
101      */
102     public void send(final List recipients) {
103         throw new UnsupportedOperationException("send() not supported in MockDocument");
104     }
105 
106     /***
107      * {@inheritDoc}
108      *
109      * @see de.bea.domingo.DDocument#copyToDatabase(de.bea.domingo.DDatabase)
110      */
111     public DDocument copyToDatabase(final DDatabase database) {
112         throw new UnsupportedOperationException("copyToDatabase() not supported in MockDocument");
113     }
114 
115     /***
116      * {@inheritDoc}
117      *
118      * @see de.bea.domingo.DDocument#isResponse()
119      */
120     public boolean isResponse() {
121         return false;
122     }
123 
124     /***
125      * {@inheritDoc}
126      *
127      * @see de.bea.domingo.DDocument#getParentDocumentUNID()
128      */
129     public String getParentDocumentUNID() {
130         return null;
131     }
132 
133     /***
134      * {@inheritDoc}
135      *
136      * @see de.bea.domingo.DDocument#getParentDocument()
137      */
138     public DDocument getParentDocument() {
139         return null;
140     }
141 
142     /***
143      * {@inheritDoc}
144      *
145      * @see de.bea.domingo.DDocument#makeResponse(de.bea.domingo.DDocument)
146      */
147     public void makeResponse(final DDocument doc) {
148     }
149 
150     /***
151      * {@inheritDoc}
152      *
153      * @see de.bea.domingo.DDocument#getResponses()
154      */
155     public Iterator getResponses() {
156         return null;
157     }
158 
159     /***
160      * {@inheritDoc}
161      *
162      * @see de.bea.domingo.DDocument#setSaveMessageOnSend(boolean)
163      */
164     public void setSaveMessageOnSend(final boolean saveMessageOnSend) {
165     }
166 
167     /***
168      * {@inheritDoc}
169      *
170      * @see de.bea.domingo.DDocument#setEncryptOnSend(boolean)
171      */
172     public void setEncryptOnSend(final boolean flag) {
173     }
174 
175     /***
176      * {@inheritDoc}
177      *
178      * @see de.bea.domingo.DDocument#setSignOnSend(boolean)
179      */
180     public void setSignOnSend(final boolean flag) {
181     }
182 
183     /***
184      * {@inheritDoc}
185      *
186      * @see de.bea.domingo.DDocument#sign()
187      */
188     public void sign() {
189     }
190 
191     /***
192      * {@inheritDoc}
193      *
194      * @see de.bea.domingo.DBaseDocument#getFirstItem(java.lang.String)
195      */
196     public DBaseItem getFirstItem(final String name) {
197         return null;
198     }
199 
200     /***
201      * {@inheritDoc}
202      *
203      * @see de.bea.domingo.DBaseDocument#getItems()
204      */
205     public Iterator getItems() {
206         return null;
207     }
208 
209     /***
210      * {@inheritDoc}
211      *
212      * @see de.bea.domingo.DBaseDocument#getCreated()
213      */
214     public Calendar getCreated() {
215         return null;
216     }
217 
218     /***
219      * {@inheritDoc}
220      *
221      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String)
222      */
223     public DItem appendItemValue(final String name) {
224         return new MockItem();
225     }
226 
227     /***
228      * {@inheritDoc}
229      *
230      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
231      *      java.lang.String)
232      */
233     public DItem appendItemValue(final String name, final String value) {
234         List valueList = new ArrayList(1);
235         valueList.add(0, value);
236         items.put(name.toLowerCase(), valueList);
237         return new MockItem();
238     }
239 
240     /***
241      * {@inheritDoc}
242      *
243      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String, int)
244      */
245     public DItem appendItemValue(final String name, final int value) {
246         List valueList = new ArrayList(1);
247         valueList.add(0, new Integer(value));
248         items.put(name.toLowerCase(), valueList);
249         return new MockItem();
250     }
251 
252     /***
253      * {@inheritDoc}
254      *
255      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
256      *      double)
257      */
258     public DItem appendItemValue(final String name, final double value) {
259         List valueList = new ArrayList(1);
260         valueList.add(0, new Double(value));
261         items.put(name.toLowerCase(), valueList);
262         return new MockItem();
263     }
264 
265     /***
266      * {@inheritDoc}
267      *
268      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
269      *      java.util.Calendar)
270      */
271     public DItem appendItemValue(final String name, final Calendar value) {
272         List valueList = new ArrayList(1);
273         valueList.add(0, value);
274         items.put(name.toLowerCase(), valueList);
275         return new MockItem();
276     }
277 
278     /***
279      * {@inheritDoc}
280      *
281      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
282      *      java.util.List)
283      */
284     public DItem appendItemValue(final String name, final List values) {
285         items.remove(name.toLowerCase());
286         items.put(name.toLowerCase(), values);
287         return new MockItem();
288     }
289 
290     /***
291      * {@inheritDoc}
292      *
293      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
294      *      java.lang.String)
295 h     */
296     public DItem replaceItemValue(final String name, final String value) {
297         items.remove(name.toLowerCase());
298         List valueList = new ArrayList(1);
299         valueList.add(0, value);
300         items.put(name.toLowerCase(), valueList);
301         return new MockItem();
302     }
303 
304     /***
305      * {@inheritDoc}
306      *
307      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String, int)
308      */
309     public DItem replaceItemValue(final String name, final int value) {
310         items.remove(name.toLowerCase());
311         List valueList = new ArrayList(1);
312         valueList.add(0, new Integer(value));
313         items.put(name.toLowerCase(), valueList);
314         return new MockItem();
315     }
316 
317     /***
318      * {@inheritDoc}
319      *
320      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
321      *      double)
322      */
323     public DItem replaceItemValue(final String name, final double value) {
324         items.remove(name.toLowerCase());
325         List valueList = new ArrayList(1);
326         valueList.add(0, new Double(value));
327         items.put(name.toLowerCase(), valueList);
328         return new MockItem();
329     }
330 
331     /***
332      * {@inheritDoc}
333      *
334      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
335      *      java.util.Calendar)
336      */
337     public DItem replaceItemValue(final String name, final Calendar value) {
338         items.remove(name.toLowerCase());
339         List valueList = new ArrayList(1);
340         valueList.add(0, value);
341         items.put(name.toLowerCase(), valueList);
342         return new MockItem();
343     }
344 
345     /***
346      * {@inheritDoc}
347      *
348      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
349      *      java.util.List)
350      */
351     public DItem replaceItemValue(final String name, final List values) {
352         items.remove(name.toLowerCase());
353         items.put(name.toLowerCase(), values);
354         return new MockItem();
355     }
356 
357     /***
358      * {@inheritDoc}
359      *
360      * @see de.bea.domingo.DBaseDocument#save()
361      */
362     public boolean save() {
363         return false;
364     }
365 
366     /***
367      * {@inheritDoc}
368      *
369      * @see de.bea.domingo.DBaseDocument#save(boolean)
370      */
371     public boolean save(final boolean force) {
372         return false;
373     }
374 
375     /***
376      * {@inheritDoc}
377      *
378      * @see de.bea.domingo.DBaseDocument#save(boolean, boolean)
379      */
380     public boolean save(final boolean force, final boolean makeresponse) {
381         return false;
382     }
383 
384     /***
385      * {@inheritDoc}
386      *
387      * @see de.bea.domingo.DBaseDocument#getAttachment(java.lang.String)
388      */
389     public DEmbeddedObject getAttachment(final String filename) {
390         return null;
391     }
392 
393     /***
394      * {@inheritDoc}
395      *
396      * @see de.bea.domingo.DBaseDocument#getEmbeddedObjects()
397      */
398     public Iterator getEmbeddedObjects() {
399         return null;
400     }
401 
402     /***
403      * {@inheritDoc}
404      *
405      * @see de.bea.domingo.DBaseDocument#getAttachments()
406      */
407     public List getAttachments() {
408         return null;
409     }
410 
411     /***
412      * {@inheritDoc}
413      *
414      * @see de.bea.domingo.DBaseDocument#removeItem(java.lang.String)
415      */
416     public void removeItem(final String name) {
417         items.remove(name.toLowerCase());
418     }
419 
420     /***
421      * {@inheritDoc}
422      *
423      * @see de.bea.domingo.DBaseDocument#remove()
424      */
425     public boolean remove() {
426         return remove(false);
427     }
428 
429     /***
430      * {@inheritDoc}
431      *
432      * @see de.bea.domingo.DBaseDocument#remove(boolean)
433      */
434     public boolean remove(final boolean force) {
435         return false;
436     }
437 
438     /***
439      * {@inheritDoc}
440      *
441      * @see de.bea.domingo.DBaseDocument#createRichTextItem(java.lang.String)
442      */
443     public DRichTextItem createRichTextItem(final String name) {
444         return null;
445     }
446 
447     /***
448      * {@inheritDoc}
449      *
450      * @see de.bea.domingo.DBaseDocument#getItemValue(java.lang.String)
451      */
452     public List getItemValue(final String name) {
453         return (List) items.get(name.toLowerCase());
454     }
455 
456     /***
457      * {@inheritDoc}
458      *
459      * @see de.bea.domingo.DBaseDocument#getItemValueString(java.lang.String)
460      */
461     public String getItemValueString(final String name) {
462         List valueList = (List) items.get(name.toLowerCase());
463         if (valueList != null && valueList.size() > 0) {
464             return valueList.get(0).toString();
465         } else {
466             return "";
467         }
468     }
469 
470     /***
471      * {@inheritDoc}
472      *
473      * @see de.bea.domingo.DBaseDocument#getItemValueDate(java.lang.String)
474      */
475     public Calendar getItemValueDate(final String name) {
476         List valueList = (List) items.get(name.toLowerCase());
477         if (valueList != null && valueList.size() > 0 && valueList.get(0) instanceof Calendar) {
478             return (Calendar) valueList.get(0);
479         } else {
480             return null;
481         }
482     }
483 
484     /***
485      * {@inheritDoc}
486      *
487      * @see de.bea.domingo.DBaseDocument#getItemValueInteger(java.lang.String)
488      */
489     public Integer getItemValueInteger(final String name) {
490         List valueList = (List) items.get(name.toLowerCase());
491         if (valueList != null && valueList.size() > 0) {
492             if (valueList.get(0) instanceof Integer) {
493                 return (Integer) valueList.get(0);
494             } else if (valueList.get(0) instanceof Number) {
495                 return new Integer(((Number) valueList.get(0)).intValue());
496             }
497         }
498         return null;
499     }
500 
501     /***
502      * {@inheritDoc}
503      *
504      * @see de.bea.domingo.DBaseDocument#getItemValueDouble(java.lang.String)
505      */
506     public Double getItemValueDouble(final String name) {
507         List valueList = (List) items.get(name.toLowerCase());
508         if (valueList != null && valueList.size() > 0) {
509             if (valueList.get(0) instanceof Double) {
510                 return (Double) valueList.get(0);
511             } else if (valueList.get(0) instanceof Number) {
512                 return new Double(((Number) valueList.get(0)).doubleValue());
513             }
514         }
515         return null;
516     }
517 
518     /***
519      * {@inheritDoc}
520      *
521      * @see de.bea.domingo.DBaseDocument#hasItem(java.lang.String)
522      */
523     public boolean hasItem(final String name) {
524         return items.containsKey(name.toLowerCase());
525     }
526 
527     /***
528      * {@inheritDoc}
529      *
530      * @see de.bea.domingo.DBaseDocument#getAuthors()
531      */
532     public List getAuthors() {
533         return authors;
534     }
535 
536     /***
537      * {@inheritDoc}
538      *
539      * @see de.bea.domingo.DBaseDocument#getLastAccessed()
540      */
541     public Calendar getLastAccessed() {
542         return Calendar.getInstance();
543     }
544 
545     /***
546      * {@inheritDoc}
547      *
548      * @see de.bea.domingo.DBaseDocument#getLastModified()
549      */
550     public Calendar getLastModified() {
551         return Calendar.getInstance();
552     }
553 
554     /***
555      * {@inheritDoc}
556      *
557      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
558      *      java.lang.Integer)
559      */
560     public DItem replaceItemValue(final String name, final Integer value) {
561         return replaceItemValue(name.toLowerCase(), value.intValue());
562     }
563 
564     /***
565      * {@inheritDoc}
566      *
567      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
568      *      java.lang.Double)
569      */
570     public DItem replaceItemValue(final String name, final Double value) {
571         return replaceItemValue(name.toLowerCase(), value.doubleValue());
572     }
573 
574     /***
575      * {@inheritDoc}
576      *
577      * @see de.bea.domingo.DBaseDocument#getItemValueSize(java.lang.String)
578      */
579     public int getItemValueSize(final String name) {
580         return getItemValue(name.toLowerCase()).size();
581     }
582 
583     /***
584      * {@inheritDoc}
585      *
586      * @see de.bea.domingo.DBaseDocument#getParentDatabase()
587      */
588     public DDatabase getParentDatabase() {
589         throw new UnsupportedOperationException("getParentDatabase() not supported in MockDocument");
590     }
591 
592     /***
593      * {@inheritDoc}
594      *
595      * @see java.lang.Object#toString()
596      */
597     public String toString() {
598         return items.toString();
599     }
600 
601     /***
602      * {@inheritDoc}
603      *
604      * @see de.bea.domingo.DBaseDocument#copyAllItems(de.bea.domingo.DBaseDocument,
605      *      boolean)
606      */
607     public void copyAllItems(final DBaseDocument doc, final boolean replace) {
608         throw new UnsupportedOperationException("copyAllItems() not supported in MockDocument");
609     }
610 
611     /***
612      * {@inheritDoc}
613      *
614      * @see de.bea.domingo.DBaseDocument#recycle()
615      */
616     public void recycle() {
617     }
618 
619     /***
620      * {@inheritDoc}
621      *
622      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
623      *      de.bea.domingo.DDateRange)
624      */
625     public DItem replaceItemValue(final String name, final DDateRange value) {
626         throw new UnsupportedOperationException("replaceItemValue() not supported in MockDocument");
627     }
628 
629     /***
630      * {@inheritDoc}
631      *
632      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String, java.util.TimeZone)
633      */
634     public DItem replaceItemValue(final String name, final TimeZone value) {
635         throw new UnsupportedOperationException("replaceItemValue() not supported in MockDocument");
636     }
637 
638     /***
639      * {@inheritDoc}
640      *
641      * @see de.bea.domingo.DBaseDocument#getItemValueDateRange(java.lang.String)
642      */
643     public DDateRange getItemValueDateRange(final String name) {
644         throw new UnsupportedOperationException("getItemValueDateRange() not supported in MockDocument");
645     }
646 
647     /***
648      * {@inheritDoc}
649      *
650      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
651      *      java.util.Calendar, java.util.Calendar)
652      */
653     public DItem replaceItemValue(final String name, final Calendar calendar1, final Calendar calendar2) {
654         throw new UnsupportedOperationException("replaceItemValue() not supported in MockDocument");
655     }
656 
657     /***
658      * {@inheritDoc}
659      *
660      * @see de.bea.domingo.DDocument#replaceHTML(java.lang.String,
661      *      java.lang.String)
662      */
663     public void replaceHTML(final String name, final String value) {
664         throw new UnsupportedOperationException("replaceHTML() not supported in MockDocument");
665     }
666 
667     /***
668      * {@inheritDoc}
669      *
670      * @see de.bea.domingo.DBaseDocument#computeWithForm(boolean)
671      */
672     public boolean computeWithForm(final boolean raiseError) {
673         throw new UnsupportedOperationException("computeWithForm(boolean) not supported in MockDocument");
674     }
675 
676     /***
677      * {@inheritDoc}
678      *
679      * @see de.bea.domingo.DBaseDocument#computeWithForm()
680      */
681     public boolean computeWithForm() {
682         throw new UnsupportedOperationException("computeWithForm() not supported in MockDocument");
683     }
684 
685     /***
686      * {@inheritDoc}
687      *
688      * @see de.bea.domingo.DDocument#getFTSearchScore()
689      */
690     public int getFTSearchScore() {
691         throw new UnsupportedOperationException("computeWithForm() not supported in MockDocument");
692     }
693 
694     /***
695      * {@inheritDoc}
696      *
697      * @see de.bea.domingo.DDocument#getParentView()
698      */
699     public DView getParentView() {
700         throw new UnsupportedOperationException("not supported in MockDocument");
701     }
702 
703     /***
704      * {@inheritDoc}
705      *
706      * @see de.bea.domingo.DDocument#getFolderReferences()
707      */
708     public List getFolderReferences() {
709         throw new UnsupportedOperationException("not supported in MockDocument");
710     }
711 
712     /***
713      * {@inheritDoc}
714      *
715      * @see de.bea.domingo.DDocument#putInFolder(java.lang.String)
716      */
717     public void putInFolder(final String s) {
718         throw new UnsupportedOperationException("not supported in MockDocument");
719     }
720 
721     /***
722      * {@inheritDoc}
723      *
724      * @see de.bea.domingo.DDocument#putInFolder(java.lang.String, boolean)
725      */
726     public void putInFolder(final String s, final boolean flag) {
727         throw new UnsupportedOperationException("not supported in MockDocument");
728     }
729 
730     /***
731      * {@inheritDoc}
732      *
733      * @see de.bea.domingo.DDocument#removeFromFolder(java.lang.String)
734      */
735     public void removeFromFolder(final String s) {
736         throw new UnsupportedOperationException("not supported in MockDocument");
737     }
738 
739     /***
740      * {@inheritDoc}
741      *
742      * @see de.bea.domingo.DDocument#getURL()
743      */
744     public String getURL() {
745         throw new UnsupportedOperationException("not supported in MockDocument");
746     }
747 
748     /***
749      * {@inheritDoc}
750      *
751      * @see de.bea.domingo.DDocument#getNotesURL()
752      */
753     public String getNotesURL() {
754         throw new UnsupportedOperationException("not supported in MockDocument");
755     }
756 
757     /***
758      * {@inheritDoc}
759      *
760      * @see de.bea.domingo.DDocument#getHttpURL()
761      */
762     public String getHttpURL() {
763         throw new UnsupportedOperationException("not supported in MockDocument");
764     }
765 
766     /***
767      * {@inheritDoc}
768      *
769      * @see de.bea.domingo.DBaseDocument#copyItem(de.bea.domingo.DBaseItem, java.lang.String)
770      */
771     public DBaseItem copyItem(final DBaseItem item, final String s) {
772         throw new UnsupportedOperationException("not supported in MockDocument");
773     }
774 
775     /***
776      * {@inheritDoc}
777      *
778      * @see de.bea.domingo.DBaseDocument#copyItem(de.bea.domingo.DBaseItem)
779      */
780     public DBaseItem copyItem(final DBaseItem item) {
781         throw new UnsupportedOperationException("not supported in MockDocument");
782     }
783 
784     /***
785      * {@inheritDoc}
786      *
787      * @see de.bea.domingo.DBaseDocument#createReplyMessage(boolean)
788      */
789     public DDocument createReplyMessage(final boolean flag) {
790         throw new UnsupportedOperationException("not supported in MockDocument");
791     }
792 
793     /***
794      * {@inheritDoc}
795      *
796      * @see de.bea.domingo.DBaseDocument#encrypt()
797      */
798     public void encrypt() {
799         throw new UnsupportedOperationException("not supported in MockDocument");
800     }
801 
802     /***
803      * {@inheritDoc}
804      *
805      * @see de.bea.domingo.DBaseDocument#getColumnValues()
806      */
807     public List getColumnValues() {
808         throw new UnsupportedOperationException("not supported in MockDocument");
809     }
810 
811     /***
812      * {@inheritDoc}
813      *
814      * @see de.bea.domingo.DBaseDocument#getEncryptionKeys()
815      */
816     public List getEncryptionKeys() {
817         throw new UnsupportedOperationException("not supported in MockDocument");
818     }
819 
820     /***
821      * {@inheritDoc}
822      *
823      * @see de.bea.domingo.DBaseDocument#setEncryptionKeys(java.util.List)
824      */
825     public void setEncryptionKeys(final List keys) {
826         throw new UnsupportedOperationException("not supported in MockDocument");
827     }
828 
829     /***
830      * {@inheritDoc}
831      *
832      * @see de.bea.domingo.DBaseDocument#getItemValueCustomData(java.lang.String)
833      */
834     public Object getItemValueCustomData(final String name) {
835         throw new UnsupportedOperationException("not supported in MockDocument");
836     }
837 
838     /***
839      * {@inheritDoc}
840      *
841      * @see de.bea.domingo.DBaseDocument#getItemValueCustomData(java.lang.String,
842      *      java.lang.String)
843      */
844     public Object getItemValueCustomData(final String name, final String dataTypeName) {
845         throw new UnsupportedOperationException("not supported in MockDocument");
846     }
847 
848     /***
849      * {@inheritDoc}
850      *
851      * @see de.bea.domingo.DBaseDocument#getItemValueCustomDataBytes(java.lang.String,
852      *      java.lang.String)
853      */
854     public byte[] getItemValueCustomDataBytes(final String name, final String dataTypeName) {
855         throw new UnsupportedOperationException("not supported in MockDocument");
856     }
857 
858     /***
859      * {@inheritDoc}
860      *
861      * @see de.bea.domingo.DBaseDocument#getItemValueDateTimeArray(java.lang.String)
862      */
863     public List getItemValueDateTimeArray(final String name) {
864         throw new UnsupportedOperationException("not supported in MockDocument");
865     }
866 
867     /***
868      * {@inheritDoc}
869      *
870      * @see de.bea.domingo.DBaseDocument#getSigner()
871      */
872     public String getSigner() {
873         throw new UnsupportedOperationException("not supported in MockDocument");
874     }
875 
876     /***
877      * {@inheritDoc}
878      *
879      * @see de.bea.domingo.DBaseDocument#getSize()
880      */
881     public int getSize() {
882         throw new UnsupportedOperationException("not supported in MockDocument");
883     }
884 
885     /***
886      * {@inheritDoc}
887      *
888      * @see de.bea.domingo.DBaseDocument#setUniversalID(java.lang.String)
889      */
890     public void setUniversalID(final String unid) {
891         throw new UnsupportedOperationException("not supported in MockDocument");
892     }
893 
894     /***
895      * {@inheritDoc}
896      *
897      * @see de.bea.domingo.DBaseDocument#getVerifier()
898      */
899     public String getVerifier() {
900         throw new UnsupportedOperationException("not supported in MockDocument");
901     }
902 
903     /***
904      * {@inheritDoc}
905      *
906      * @see de.bea.domingo.DBaseDocument#hasEmbedded()
907      */
908     public boolean hasEmbedded() {
909         throw new UnsupportedOperationException("not supported in MockDocument");
910     }
911 
912     /***
913      * {@inheritDoc}
914      *
915      * @see de.bea.domingo.DBaseDocument#isEncrypted()
916      */
917     public boolean isEncrypted() {
918         throw new UnsupportedOperationException("not supported in MockDocument");
919     }
920 
921     /***
922      * {@inheritDoc}
923      *
924      * @see de.bea.domingo.DBaseDocument#isEncryptOnSend()
925      */
926     public boolean isEncryptOnSend() {
927         throw new UnsupportedOperationException("not supported in MockDocument");
928     }
929 
930     /***
931      * {@inheritDoc}
932      *
933      * @see de.bea.domingo.DBaseDocument#isProfile()
934      */
935     public boolean isProfile() {
936         throw new UnsupportedOperationException("not supported in MockDocument");
937     }
938 
939     /***
940      * {@inheritDoc}
941      *
942      * @see de.bea.domingo.DBaseDocument#isSigned()
943      */
944     public boolean isSigned() {
945         throw new UnsupportedOperationException("not supported in MockDocument");
946     }
947 
948     /***
949      * {@inheritDoc}
950      *
951      * @see de.bea.domingo.DBaseDocument#isValid()
952      */
953     public boolean isValid() {
954         throw new UnsupportedOperationException("not supported in MockDocument");
955     }
956 
957     /***
958      * {@inheritDoc}
959      *
960      * @see de.bea.domingo.DBaseDocument#isSaveMessageOnSend()
961      */
962     public boolean isSaveMessageOnSend() {
963         throw new UnsupportedOperationException("not supported in MockDocument");
964     }
965 
966     /***
967      * {@inheritDoc}
968      *
969      * @see de.bea.domingo.DBaseDocument#isSentByAgent()
970      */
971     public boolean isSentByAgent() {
972         throw new UnsupportedOperationException("not supported in MockDocument");
973     }
974 
975     /***
976      * {@inheritDoc}
977      *
978      * @see de.bea.domingo.DBaseDocument#isSignOnSend()
979      */
980     public boolean isSignOnSend() {
981         throw new UnsupportedOperationException("not supported in MockDocument");
982     }
983 
984     /***
985      * {@inheritDoc}
986      *
987      * @see de.bea.domingo.DBaseDocument#isDeleted()
988      */
989     public boolean isDeleted() {
990         throw new UnsupportedOperationException("not supported in MockDocument");
991     }
992 
993     /***
994      * {@inheritDoc}
995      *
996      * @see de.bea.domingo.DBaseDocument#removePermanently(boolean)
997      */
998     public boolean removePermanently(final boolean flag) {
999         throw new UnsupportedOperationException("not supported in MockDocument");
1000     }
1001 
1002     /***
1003      * {@inheritDoc}
1004      *
1005      * @see de.bea.domingo.DBaseDocument#renderToRTItem(de.bea.domingo.DRichTextItem)
1006      */
1007     public boolean renderToRTItem(final DRichTextItem richtextitem) {
1008         throw new UnsupportedOperationException("not supported in MockDocument");
1009     }
1010 
1011     /***
1012      * {@inheritDoc}
1013      *
1014      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomData(java.lang.String,
1015      *      java.lang.String, java.lang.Object)
1016      */
1017     public DItem replaceItemValueCustomData(final String s, final String s1, final Object obj) {
1018         throw new UnsupportedOperationException("not supported in MockDocument");
1019     }
1020 
1021     /***
1022      * {@inheritDoc}
1023      *
1024      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomData(java.lang.String,
1025      *      java.lang.Object)
1026      */
1027     public DItem replaceItemValueCustomData(final String s, final Object obj) {
1028         throw new UnsupportedOperationException("not supported in MockDocument");
1029     }
1030 
1031     /***
1032      * {@inheritDoc}
1033      *
1034      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomDataBytes(java.lang.String,
1035      *      java.lang.String, byte[])
1036      */
1037     public DItem replaceItemValueCustomDataBytes(final String s, final String s1, final byte[] abyte0) {
1038         throw new UnsupportedOperationException("not supported in MockDocument");
1039     }
1040 
1041     /***
1042      * {@inheritDoc}
1043      *
1044      * @see de.bea.domingo.DBaseDocument#generateXML()
1045      */
1046     public String generateXML() {
1047         throw new UnsupportedOperationException("not supported in MockDocument");
1048     }
1049 
1050     /***
1051      * {@inheritDoc}
1052      *
1053      * @see de.bea.domingo.DBaseDocument#generateXML(java.io.Writer)
1054      */
1055     public void generateXML(final Writer writer) {
1056         throw new UnsupportedOperationException("not supported in MockDocument");
1057     }
1058 
1059     /***
1060      * {@inheritDoc}
1061      *
1062      * @see de.bea.domingo.DBaseDocument#getReceivedItemText()
1063      */
1064     public List getReceivedItemText() {
1065         throw new UnsupportedOperationException("not supported in MockDocument");
1066     }
1067 
1068     /***
1069      * {@inheritDoc}
1070      *
1071      * @see de.bea.domingo.DBaseDocument#getLockHolders()
1072      */
1073     public List getLockHolders() {
1074         throw new UnsupportedOperationException("not supported in MockDocument");
1075     }
1076 
1077     /***
1078      * {@inheritDoc}
1079      *
1080      * @see de.bea.domingo.DBaseDocument#lock()
1081      */
1082     public boolean lock() {
1083         throw new UnsupportedOperationException("not supported in MockDocument");
1084     }
1085 
1086     /***
1087      * {@inheritDoc}
1088      *
1089      * @see de.bea.domingo.DBaseDocument#lock(boolean)
1090      */
1091     public boolean lock(final boolean provisionalOk) {
1092         throw new UnsupportedOperationException("not supported in MockDocument");
1093     }
1094 
1095     /***
1096      * {@inheritDoc}
1097      *
1098      * @see de.bea.domingo.DBaseDocument#lock(java.lang.String)
1099      */
1100     public boolean lock(final String name) {
1101         throw new UnsupportedOperationException("not supported in MockDocument");
1102     }
1103 
1104     /***
1105      * {@inheritDoc}
1106      *
1107      * @see de.bea.domingo.DBaseDocument#lock(java.lang.String, boolean)
1108      */
1109     public boolean lock(final String name, final boolean provisionalOk) {
1110         throw new UnsupportedOperationException("not supported in MockDocument");
1111     }
1112 
1113     /***
1114      * {@inheritDoc}
1115      *
1116      * @see de.bea.domingo.DBaseDocument#lock(java.util.List)
1117      */
1118     public boolean lock(final List names) {
1119         throw new UnsupportedOperationException("not supported in MockDocument");
1120     }
1121 
1122     /***
1123      * {@inheritDoc}
1124      *
1125      * @see de.bea.domingo.DBaseDocument#lock(java.util.List, boolean)
1126      */
1127     public boolean lock(final List names, final boolean provisionalOk) {
1128         throw new UnsupportedOperationException("not supported in MockDocument");
1129     }
1130 
1131     /***
1132      * {@inheritDoc}
1133      *
1134      * @see de.bea.domingo.DBaseDocument#lockProvisional()
1135      */
1136     public boolean lockProvisional() {
1137         throw new UnsupportedOperationException("not supported in MockDocument");
1138     }
1139 
1140     /***
1141      * {@inheritDoc}
1142      *
1143      * @see de.bea.domingo.DBaseDocument#lockProvisional(java.lang.String)
1144      */
1145     public boolean lockProvisional(final String name) {
1146         throw new UnsupportedOperationException("not supported in MockDocument");
1147     }
1148 
1149     /***
1150      * {@inheritDoc}
1151      *
1152      * @see de.bea.domingo.DBaseDocument#lockProvisional(java.util.List)
1153      */
1154     public boolean lockProvisional(final List names) {
1155         throw new UnsupportedOperationException("not supported in MockDocument");
1156     }
1157 
1158     /***
1159      * {@inheritDoc}
1160      *
1161      * @see de.bea.domingo.DBaseDocument#unlock()
1162      */
1163     public void unlock() {
1164         throw new UnsupportedOperationException("not supported in MockDocument");
1165     }
1166 
1167 }