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.http;
24  
25  import java.io.ByteArrayInputStream;
26  import java.io.IOException;
27  import java.io.Writer;
28  import java.util.ArrayList;
29  import java.util.Calendar;
30  import java.util.HashMap;
31  import java.util.Iterator;
32  import java.util.List;
33  import java.util.Map;
34  import java.util.TimeZone;
35  
36  import javax.xml.parsers.ParserConfigurationException;
37  import javax.xml.parsers.SAXParser;
38  
39  import org.xml.sax.Attributes;
40  import org.xml.sax.SAXException;
41  
42  import de.bea.domingo.DBase;
43  import de.bea.domingo.DBaseDocument;
44  import de.bea.domingo.DBaseItem;
45  import de.bea.domingo.DDatabase;
46  import de.bea.domingo.DDateRange;
47  import de.bea.domingo.DDocument;
48  import de.bea.domingo.DEmbeddedObject;
49  import de.bea.domingo.DItem;
50  import de.bea.domingo.DNotesMonitor;
51  import de.bea.domingo.DNotesRuntimeException;
52  import de.bea.domingo.DRichTextItem;
53  import de.bea.domingo.DView;
54  import de.bea.domingo.util.Timezones;
55  
56  /***
57   * Http implementation of a Domingo view.
58   *
59   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
60   */
61  public abstract class BaseDocumentHttp extends BaseHttp implements DBaseDocument {
62  
63      /*** serial version ID for serialization. */
64      private static final long serialVersionUID = 1484836582323425207L;
65  
66      /*** Name of default view (<tt>"0"</tt>). */
67      private static final String DEFAULT_VIEW_NAME = "0";
68  
69      private String fUniversalId;
70  
71      private Map fItemsMap = new HashMap();
72  
73      /***
74       * Private Constructor for this class.
75       *
76       * @param factory the controlling factory
77       * @param parent the parent object
78       * @param unid the universal ID of the document
79       * @param monitor the monitor that handles logging
80       * @see lotus.domino.Database
81       */
82      protected BaseDocumentHttp(final NotesHttpFactory factory, final DBase parent, final String unid,
83              final DNotesMonitor monitor) {
84          super(factory, parent, monitor);
85          this.fUniversalId = unid;
86          if (unid != null && unid.length() > 0) {
87              readDocument();
88          }
89      }
90  
91      /***
92       * Private Constructor for this class.
93       *
94       * @param factory the controlling factory
95       * @param parent the parent object
96       * @param monitor the monitor that handles logging
97       * @see lotus.domino.Database
98       */
99      protected BaseDocumentHttp(final NotesHttpFactory factory, final DBase parent, final DNotesMonitor monitor) {
100         super(factory, parent, monitor);
101         this.fUniversalId = "";
102     }
103 
104     /***
105      * Factory method for instances of this class.
106      *
107      * @param theFactory the controlling factory
108      * @param theParent the session that produced the database
109      * @param unid the universal id of a Notes document
110      * @param monitor the monitor that handles logging
111      *
112      * @return Returns a DDatabase instance of type DatabaseProxy
113      */
114     static DDocument getInstance(final NotesHttpFactory theFactory, final DBase theParent, final String unid,
115             final DNotesMonitor monitor) {
116         return new DocumentHttp(theFactory, theParent, unid, monitor);
117     }
118 
119     /***
120      * Factory method for instances of this class.
121      *
122      * @param factory the controlling factory
123      * @param parent the session that produced the database
124      * @param monitor the monitor that handles logging
125      *
126      * @return Returns a DDatabase instance of type DatabaseProxy
127      */
128     static DDocument getInstance(final NotesHttpFactory factory, final DBase parent,
129             final DNotesMonitor monitor) {
130         return new DocumentHttp(factory, parent, monitor);
131     }
132 
133     private void readDocument() {
134         if (getDSession().isDomingoAvailable()) {
135             readDocumentByXML();
136         } else {
137             readDocumentByHtml();
138         }
139     }
140 
141     /***
142      * Reads a document in HTML format directly from the Http server.
143      */
144     private void readDocumentByHtml() {
145         BaseHttp parent = getParent();
146         String viewName;
147         if (parent instanceof DView) {
148             viewName = ((DView) parent).getName();
149             parent = parent.getParent();
150         } else {
151             viewName = DEFAULT_VIEW_NAME;
152         }
153         if (!(parent instanceof DDatabase)) {
154             throw new NotesHttpRuntimeException("Unsupported parent: " + parent.getClass().getName());
155         }
156         String databaseName = ((DDatabase) parent).getFileName();
157         String url = databaseName + "/" + viewName + "/" + this.fUniversalId + "?EditDocument" + "?OpenDocument";
158         try {
159             final String bs = executeUrl(url);
160             // TODO parse the HTML an extract of the values from all form fields.
161         } catch (IOException e) {
162             throw new NotesHttpRuntimeException(e);
163         }
164     }
165 
166     /***
167      * Reads a document in XML format from the Domingo database.
168      */
169     private void readDocumentByXML() {
170         try {
171             final String bs = execute("cmd=ReadDocument&unid=" + fUniversalId);
172             final SAXParser parser = getDSession().getFactory().getSAXParserFactory().newSAXParser();
173             final DocumentParser documentParser = new DocumentParser();
174             parser.parse(new ByteArrayInputStream(bs.getBytes()), documentParser);
175         } catch (IOException e) {
176             throw new NotesHttpRuntimeException(e);
177         } catch (ParserConfigurationException e) {
178             throw new NotesHttpRuntimeException(e);
179         } catch (SAXException e) {
180             throw new NotesHttpRuntimeException(e);
181         }
182     }
183 
184     /***
185      * @see Object#toString()
186      * @return a string representation of the object.
187      */
188     public final String toString() {
189         return "[" + fUniversalId + ", " + fItemsMap.values() + "]";
190     }
191 
192     /***
193      * {@inheritDoc}
194      *
195      * @see de.bea.domingo.DBaseDocument#getParentDatabase()
196      */
197     public final DDatabase getParentDatabase() {
198         return (DDatabase) getParent();
199     }
200 
201     /***
202      * {@inheritDoc}
203      *
204      * @see de.bea.domingo.DBaseDocument#getFirstItem(java.lang.String)
205      */
206     public final DBaseItem getFirstItem(final String name) {
207         return (DBaseItem) fItemsMap.get(name);
208     }
209 
210     /***
211      * {@inheritDoc}
212      *
213      * @see de.bea.domingo.DBaseDocument#getItems()
214      */
215     public final Iterator getItems() {
216         return fItemsMap.values().iterator();
217     }
218 
219     /***
220      * {@inheritDoc}
221      *
222      * @see de.bea.domingo.DBaseDocument#getCreated()
223      */
224     public final Calendar getCreated() {
225         throw new UnsupportedOperationException("getceated()");
226     }
227 
228     /***
229      * {@inheritDoc}
230      *
231      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String)
232      */
233     public final DItem appendItemValue(final String name) {
234         return appendItemValue(name, "");
235     }
236 
237     /***
238      * {@inheritDoc}
239      *
240      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
241      *      java.lang.String)
242      */
243     public final DItem appendItemValue(final String name, final String value) {
244         throw new UnsupportedOperationException("appendItemValue");
245     }
246 
247     /***
248      * {@inheritDoc}
249      *
250      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String, int)
251      */
252     public final DItem appendItemValue(final String name, final int value) {
253         throw new UnsupportedOperationException("appendItemValue");
254     }
255 
256     /***
257      * {@inheritDoc}
258      *
259      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
260      *      double)
261      */
262     public final DItem appendItemValue(final String name, final double value) {
263         throw new UnsupportedOperationException("appendItemValue");
264     }
265 
266     /***
267      * {@inheritDoc}
268      *
269      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
270      *      java.util.Calendar)
271      */
272     public final DItem appendItemValue(final String name, final Calendar value) {
273         throw new UnsupportedOperationException("appendItemValue");
274     }
275 
276     /***
277      * {@inheritDoc}
278      *
279      * @see de.bea.domingo.DBaseDocument#appendItemValue(java.lang.String,
280      *      java.util.List)
281      */
282     public final DItem appendItemValue(final String name, final List values) {
283         throw new UnsupportedOperationException("appendItemValue");
284     }
285 
286     /***
287      * {@inheritDoc}
288      *
289      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
290      *      java.lang.String)
291      */
292     public final DItem replaceItemValue(final String name, final String value) {
293         final List list = new ArrayList();
294         list.add(value);
295         return replaceItemValue(name, list);
296     }
297 
298     /***
299      * {@inheritDoc}
300      *
301      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String, int)
302      */
303     public final DItem replaceItemValue(final String name, final int value) {
304         final List list = new ArrayList();
305         list.add(new Integer(value));
306         return replaceItemValue(name, list);
307     }
308 
309     /***
310      * {@inheritDoc}
311      *
312      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
313      *      java.lang.Integer)
314      */
315     public final DItem replaceItemValue(final String name, final Integer value) {
316         final List list = new ArrayList();
317         list.add(value);
318         return replaceItemValue(name, list);
319     }
320 
321     /***
322      * {@inheritDoc}
323      *
324      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
325      *      double)
326      */
327     public final DItem replaceItemValue(final String name, final double value) {
328         final List list = new ArrayList();
329         list.add(new Double(value));
330         return replaceItemValue(name, list);
331     }
332 
333     /***
334      * {@inheritDoc}
335      *
336      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
337      *      java.lang.Double)
338      */
339     public final DItem replaceItemValue(final String name, final Double value) {
340         List values = new ArrayList(1);
341         values.add(0, value);
342         return replaceItemValue(name, values);
343     }
344 
345     /***
346      * {@inheritDoc}
347      *
348      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
349      *      java.util.Calendar)
350      */
351     public final DItem replaceItemValue(final String name, final Calendar value) {
352         List values = new ArrayList();
353         values.add(0, value);
354         return replaceItemValue(name, values);
355     }
356 
357     /***
358      * {@inheritDoc}
359      *
360      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String, java.util.TimeZone)
361      */
362     public final DItem replaceItemValue(final String name, final TimeZone value) {
363         String s = "";
364         if (value == null) {
365             getMonitor().warn("time zone is null; storing an empty string in item " + name);
366         } else {
367             s = Timezones.getLotusTimeZoneString(value);
368             if (s.startsWith("Unknown")) {
369                 getMonitor().warn("Unknown time zone identifier (using default): " + value.getID());
370             }
371         }
372         return replaceItemValue(name, s);
373     }
374 
375     /***
376      * {@inheritDoc}
377      *
378      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
379      *      de.bea.domingo.DDateRange)
380      */
381     public final DItem replaceItemValue(final String name, final DDateRange value) {
382         List values = new ArrayList(2);
383         values.add(0, value.getFrom());
384         values.add(1, value.getTo());
385         return replaceItemValue(name, values);
386     }
387 
388     /***
389      * {@inheritDoc}
390      *
391      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
392      *      java.util.Calendar, java.util.Calendar)
393      */
394     public final DItem replaceItemValue(final String name, final Calendar calendar1, final Calendar calendar2) {
395         List values = new ArrayList(2);
396         values.add(0, calendar1);
397         values.add(1, calendar2);
398         return replaceItemValue(name, values);
399     }
400 
401     /***
402      * {@inheritDoc}
403      *
404      * @see de.bea.domingo.DBaseDocument#replaceItemValue(java.lang.String,
405      *      java.util.List)
406      */
407     public final DItem replaceItemValue(final String name, final List values) {
408         DItem item = (DItem) fItemsMap.get(name);
409         if (item == null) {
410             item = new ItemHttp(getFactory(), this, name, values, getMonitor());
411             fItemsMap.put(name, item);
412         } else {
413             item.setValues(values);
414         }
415         return item;
416     }
417 
418     /***
419      * {@inheritDoc}
420      *
421      * @see de.bea.domingo.DBaseDocument#save()
422      */
423     public final boolean save() throws DNotesRuntimeException {
424         return save(true, false);
425     }
426 
427     /***
428      * {@inheritDoc}
429      *
430      * @see de.bea.domingo.DBaseDocument#save(boolean)
431      */
432     public final boolean save(final boolean force) throws DNotesRuntimeException {
433         return save(force, false);
434     }
435 
436     /***
437      * {@inheritDoc}
438      *
439      * @see de.bea.domingo.DBaseDocument#getAttachment(java.lang.String)
440      */
441     public final DEmbeddedObject getAttachment(final String filename) {
442         throw new UnsupportedOperationException("getAttachment()");
443     }
444 
445     /***
446      * {@inheritDoc}
447      *
448      * @see de.bea.domingo.DBaseDocument#getEmbeddedObjects()
449      */
450     public final Iterator getEmbeddedObjects() {
451         throw new UnsupportedOperationException("getEmbeddedObjects()");
452     }
453 
454     /***
455      * {@inheritDoc}
456      *
457      * @see de.bea.domingo.DBaseDocument#getAttachments()
458      */
459     public final List getAttachments() {
460         throw new UnsupportedOperationException("getAttachments()");
461     }
462 
463     /***
464      * {@inheritDoc}
465      *
466      * @see de.bea.domingo.DBaseDocument#removeItem(java.lang.String)
467      */
468     public final void removeItem(final String name) {
469         fItemsMap.remove(name);
470     }
471 
472     /***
473      * {@inheritDoc}
474      *
475      * @see de.bea.domingo.DBaseDocument#remove()
476      */
477     public final boolean remove() {
478         return remove(false);
479     }
480 
481     /***
482      * {@inheritDoc}
483      *
484      * @see de.bea.domingo.DBaseDocument#remove(boolean)
485      */
486     public final boolean remove(final boolean force) {
487         if (fUniversalId != null && fUniversalId.length() > 0) {
488             final String path = getParentDatabase().getFilePath().replace('//', '/');
489             try {
490                 final String result = execute(path + "/0/" + fUniversalId, "DeleteDocument");
491                 return result.indexOf("Document deleted") >= 0;
492             } catch (IOException e) {
493                 throw new NotesHttpRuntimeException("Cannot delete document: " + e.getMessage(), e);
494             }
495         } else {
496             return true;
497         }
498     }
499 
500     /***
501      * {@inheritDoc}
502      *
503      * @see de.bea.domingo.DBaseDocument#createRichTextItem(java.lang.String)
504      */
505     public final DRichTextItem createRichTextItem(final String name) {
506         throw new UnsupportedOperationException("createRichTextItem()");
507     }
508 
509     /***
510      * {@inheritDoc}
511      *
512      * @see de.bea.domingo.DBaseDocument#getItemValue(java.lang.String)
513      */
514     public final List getItemValue(final String name) {
515         final DItem item = ((DItem) fItemsMap.get(name));
516         return item == null ? new ArrayList(0) : item.getValues();
517     }
518 
519     /***
520      * {@inheritDoc}
521      *
522      * @see de.bea.domingo.DBaseDocument#getItemValueString(java.lang.String)
523      */
524     public final String getItemValueString(final String name) {
525         final DItem item = ((DItem) fItemsMap.get(name));
526         return item == null ? "" : item.getValues().get(0).toString();
527     }
528 
529     /***
530      * {@inheritDoc}
531      *
532      * @see de.bea.domingo.DBaseDocument#getItemValueDate(java.lang.String)
533      */
534     public final Calendar getItemValueDate(final String name) {
535         final DItem item = ((DItem) fItemsMap.get(name));
536         return (Calendar) (item == null ? null : item.getValues().get(0));
537     }
538 
539     /***
540      * {@inheritDoc}
541      *
542      * @see de.bea.domingo.DBaseDocument#getItemValueDateRange(java.lang.String)
543      */
544     public final DDateRange getItemValueDateRange(final String name) {
545         final DItem item = ((DItem) fItemsMap.get(name));
546         return item == null ? null : item.getValueDateRange();
547     }
548 
549     /***
550      * {@inheritDoc}
551      *
552      * @see de.bea.domingo.DBaseDocument#getItemValueInteger(java.lang.String)
553      */
554     public final Integer getItemValueInteger(final String name) {
555         final DItem item = ((DItem) fItemsMap.get(name));
556         return (Integer) (item == null ? "" : item.getValues().get(0));
557     }
558 
559     /***
560      * {@inheritDoc}
561      *
562      * @see de.bea.domingo.DBaseDocument#getItemValueDouble(java.lang.String)
563      */
564     public final Double getItemValueDouble(final String name) {
565         final DItem item = ((DItem) fItemsMap.get(name));
566         return (Double) (item == null ? "" : item.getValues().get(0));
567     }
568 
569     /***
570      * {@inheritDoc}
571      *
572      * @see de.bea.domingo.DBaseDocument#hasItem(java.lang.String)
573      */
574     public final boolean hasItem(final String name) {
575         return fItemsMap.containsKey(name);
576     }
577 
578     /***
579      * {@inheritDoc}
580      *
581      * @see de.bea.domingo.DBaseDocument#getAuthors()
582      */
583     public final List getAuthors() {
584         throw new UnsupportedOperationException("getAuthors()");
585     }
586 
587     /***
588      * {@inheritDoc}
589      *
590      * @see de.bea.domingo.DBaseDocument#getLastAccessed()
591      */
592     public final Calendar getLastAccessed() {
593         throw new UnsupportedOperationException("getLastAccessed()");
594     }
595 
596     /***
597      * {@inheritDoc}
598      *
599      * @see de.bea.domingo.DBaseDocument#getLastModified()
600      */
601     public final Calendar getLastModified() {
602         throw new UnsupportedOperationException("getLastModified()");
603     }
604 
605     /***
606      * {@inheritDoc}
607      *
608      * @see de.bea.domingo.DBaseDocument#getItemValueSize(java.lang.String)
609      */
610     public final int getItemValueSize(final String name) {
611         return ((ItemHttp) getFirstItem(name)).getSize();
612     }
613 
614     /***
615      * {@inheritDoc}
616      *
617      * @see de.bea.domingo.DBaseDocument#copyAllItems(de.bea.domingo.DBaseDocument,
618      *      boolean)
619      */
620     public final void copyAllItems(final DBaseDocument doc, final boolean replace) {
621         Iterator iterator = fItemsMap.values().iterator();
622         while (iterator.hasNext()) {
623             DItem item = (DItem) iterator.next();
624             doc.appendItemValue(item.getName(), item.getValues());
625         }
626     }
627 
628     /***
629      * {@inheritDoc}
630      *
631      * @see de.bea.domingo.DBaseDocument#computeWithForm(boolean)
632      */
633     public final boolean computeWithForm(final boolean raiseError) {
634         throw new UnsupportedOperationException("computeWithForm()");
635     }
636 
637     /***
638      * {@inheritDoc}
639      *
640      * @see de.bea.domingo.DBaseDocument#computeWithForm()
641      */
642     public final boolean computeWithForm() {
643         throw new UnsupportedOperationException("computeWithForm()");
644     }
645 
646     /***
647      * {@inheritDoc}
648      *
649      * @see de.bea.domingo.DBaseDocument#recycle()
650      */
651     public final void recycle() {
652     }
653 
654     /***
655      * SAX parser for documents.
656      */
657     private class DocumentParser extends BaseHandler {
658 
659         private String fName;
660 
661         private boolean fNames;
662 
663         private boolean fReaders;
664 
665         private boolean fAuthors;
666 
667         public final void startElement(final String namespaceURI, final String localName, final String qName,
668                 final Attributes atts)
669                 throws SAXException {
670             if ("item".equals(qName)) {
671                 fName = atts.getValue("name");
672                 String n = atts.getValue("names");
673                 fNames = n != null && n.equals("true");
674                 String r = atts.getValue("readers");
675                 fReaders = r != null && r.equals("true");
676                 String a = atts.getValue("authors");
677                 fAuthors = a != null && a.equals("true");
678                 reset();
679             } else {
680                 super.startElement(namespaceURI, localName, qName, atts);
681             }
682         }
683 
684         public final void endElement(final String uri, final String localName, final String qName) throws SAXException {
685             if ("item".equals(qName)) {
686                 final DItem item = replaceItemValue(fName, getValues());
687                 item.setNames(fNames);
688                 item.setReaders(fReaders);
689                 item.setAuthors(fAuthors);
690             } else {
691                 super.endElement(uri, localName, qName);
692             }
693         }
694     }
695 
696     /***
697      * {@inheritDoc}
698      *
699      * @see de.bea.domingo.DBaseDocument#copyItem(de.bea.domingo.DBaseItem,
700      *      java.lang.String)
701      */
702     public final DBaseItem copyItem(final DBaseItem item, final String s) {
703         throw new UnsupportedOperationException("not supported in Http Document");
704     }
705 
706     /***
707      * {@inheritDoc}
708      *
709      * @see de.bea.domingo.DBaseDocument#copyItem(de.bea.domingo.DBaseItem)
710      */
711     public final DBaseItem copyItem(final DBaseItem item) {
712         throw new UnsupportedOperationException("not supported in Http Document");
713     }
714 
715     /***
716      * {@inheritDoc}
717      *
718      * @see de.bea.domingo.DBaseDocument#createReplyMessage(boolean)
719      */
720     public final DDocument createReplyMessage(final boolean flag) {
721         throw new UnsupportedOperationException("not supported in Http Document");
722     }
723 
724     /***
725      * {@inheritDoc}
726      *
727      * @see de.bea.domingo.DBaseDocument#encrypt()
728      */
729     public final void encrypt() {
730         throw new UnsupportedOperationException("not supported in Http Document");
731     }
732 
733     /***
734      * {@inheritDoc}
735      *
736      * @see de.bea.domingo.DBaseDocument#getColumnValues()
737      */
738     public final List getColumnValues() {
739         throw new UnsupportedOperationException("not supported in Http Document");
740     }
741 
742     /***
743      * {@inheritDoc}
744      *
745      * @see de.bea.domingo.DBaseDocument#getEncryptionKeys()
746      */
747     public final List getEncryptionKeys() {
748         throw new UnsupportedOperationException("not supported in Http Document");
749     }
750 
751     /***
752      * {@inheritDoc}
753      *
754      * @see de.bea.domingo.DBaseDocument#setEncryptionKeys(java.util.List)
755      */
756     public final void setEncryptionKeys(final List keys) {
757         throw new UnsupportedOperationException("not supported in Http Document");
758     }
759 
760     /***
761      * {@inheritDoc}
762      *
763      * @see de.bea.domingo.DBaseDocument#getItemValueCustomData(java.lang.String)
764      */
765     public final Object getItemValueCustomData(final String name) {
766         throw new UnsupportedOperationException("not supported in Http Document");
767     }
768 
769     /***
770      * {@inheritDoc}
771      *
772      * @see de.bea.domingo.DBaseDocument#getItemValueCustomData(java.lang.String,
773      *      java.lang.String)
774      */
775     public final Object getItemValueCustomData(final String name, final String dataTypeName) {
776         throw new UnsupportedOperationException("not supported in Http Document");
777     }
778 
779     /***
780      * {@inheritDoc}
781      *
782      * @see de.bea.domingo.DBaseDocument#getItemValueCustomDataBytes(java.lang.String,
783      *      java.lang.String)
784      */
785     public final byte[] getItemValueCustomDataBytes(final String name, final String dataTypeName) {
786         throw new UnsupportedOperationException("not supported in Http Document");
787     }
788 
789     /***
790      * {@inheritDoc}
791      *
792      * @see de.bea.domingo.DBaseDocument#getItemValueDateTimeArray(java.lang.String)
793      */
794     public final List getItemValueDateTimeArray(final String name) {
795         throw new UnsupportedOperationException("not supported in Http Document");
796     }
797 
798     /***
799      * {@inheritDoc}
800      *
801      * @see de.bea.domingo.DBaseDocument#getSigner()
802      */
803     public final String getSigner() {
804         throw new UnsupportedOperationException("not supported in Http Document");
805     }
806 
807     /***
808      * {@inheritDoc}
809      *
810      * @see de.bea.domingo.DBaseDocument#getSize()
811      */
812     public final int getSize() {
813         throw new UnsupportedOperationException("not supported in Http Document");
814     }
815 
816     /***
817      * {@inheritDoc}
818      *
819      * @see de.bea.domingo.DBaseDocument#setUniversalID(java.lang.String)
820      */
821     public final void setUniversalID(final String unid) {
822         throw new UnsupportedOperationException("not supported in Http Document");
823     }
824 
825     /***
826      * {@inheritDoc}
827      *
828      * @see de.bea.domingo.DBaseDocument#getVerifier()
829      */
830     public final String getVerifier() {
831         throw new UnsupportedOperationException("not supported in Http Document");
832     }
833 
834     /***
835      * {@inheritDoc}
836      *
837      * @see de.bea.domingo.DBaseDocument#hasEmbedded()
838      */
839     public final boolean hasEmbedded() {
840         throw new UnsupportedOperationException("not supported in Http Document");
841     }
842 
843     /***
844      * {@inheritDoc}
845      *
846      * @see de.bea.domingo.DBaseDocument#isEncrypted()
847      */
848     public final boolean isEncrypted() {
849         throw new UnsupportedOperationException("not supported in Http Document");
850     }
851 
852     /***
853      * {@inheritDoc}
854      *
855      * @see de.bea.domingo.DBaseDocument#isEncryptOnSend()
856      */
857     public final boolean isEncryptOnSend() {
858         throw new UnsupportedOperationException("not supported in Http Document");
859     }
860 
861     /***
862      * {@inheritDoc}
863      *
864      * @see de.bea.domingo.DBaseDocument#isProfile()
865      */
866     public final boolean isProfile() {
867         throw new UnsupportedOperationException("not supported in Http Document");
868     }
869 
870     /***
871      * {@inheritDoc}
872      *
873      * @see de.bea.domingo.DBaseDocument#isSigned()
874      */
875     public final boolean isSigned() {
876         throw new UnsupportedOperationException("not supported in Http Document");
877     }
878 
879     /***
880      * {@inheritDoc}
881      *
882      * @see de.bea.domingo.DBaseDocument#isValid()
883      */
884     public final boolean isValid() {
885         throw new UnsupportedOperationException("not supported in Http Document");
886     }
887 
888     /***
889      * {@inheritDoc}
890      *
891      * @see de.bea.domingo.DBaseDocument#isSaveMessageOnSend()
892      */
893     public final boolean isSaveMessageOnSend() {
894         throw new UnsupportedOperationException("not supported in Http Document");
895     }
896 
897     /***
898      * {@inheritDoc}
899      *
900      * @see de.bea.domingo.DBaseDocument#isSentByAgent()
901      */
902     public final boolean isSentByAgent() {
903         throw new UnsupportedOperationException("not supported in Http Document");
904     }
905 
906     /***
907      * {@inheritDoc}
908      *
909      * @see de.bea.domingo.DBaseDocument#isSignOnSend()
910      */
911     public final boolean isSignOnSend() {
912         throw new UnsupportedOperationException("not supported in Http Document");
913     }
914 
915     /***
916      * {@inheritDoc}
917      *
918      * @see de.bea.domingo.DBaseDocument#isDeleted()
919      */
920     public final boolean isDeleted() {
921         throw new UnsupportedOperationException("not supported in Http Document");
922     }
923 
924     /***
925      * {@inheritDoc}
926      *
927      * @see de.bea.domingo.DBaseDocument#removePermanently(boolean)
928      */
929     public final boolean removePermanently(final boolean flag) {
930         throw new UnsupportedOperationException("not supported in Http Document");
931     }
932 
933     /***
934      * {@inheritDoc}
935      *
936      * @see de.bea.domingo.DBaseDocument#renderToRTItem(de.bea.domingo.DRichTextItem)
937      */
938     public final boolean renderToRTItem(final DRichTextItem richtextitem) {
939         throw new UnsupportedOperationException("not supported in Http Document");
940     }
941 
942     /***
943      * {@inheritDoc}
944      *
945      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomData(java.lang.String,
946      *      java.lang.String, java.lang.Object)
947      */
948     public final DItem replaceItemValueCustomData(final String s, final String s1, final Object obj) {
949         throw new UnsupportedOperationException("not supported in Http Document");
950     }
951 
952     /***
953      * {@inheritDoc}
954      *
955      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomData(java.lang.String,
956      *      java.lang.Object)
957      */
958     public final DItem replaceItemValueCustomData(final String s, final Object obj) {
959         throw new UnsupportedOperationException("not supported in Http Document");
960     }
961 
962     /***
963      * {@inheritDoc}
964      *
965      * @see de.bea.domingo.DBaseDocument#replaceItemValueCustomDataBytes(java.lang.String,
966      *      java.lang.String, byte[])
967      */
968     public final DItem replaceItemValueCustomDataBytes(final String s, final String s1, final byte[] abyte0) {
969         throw new UnsupportedOperationException("not supported in Http Document");
970     }
971 
972     /***
973      * {@inheritDoc}
974      *
975      * @see de.bea.domingo.DBaseDocument#generateXML()
976      */
977     public final String generateXML() {
978         throw new UnsupportedOperationException("not supported in Http Document");
979     }
980 
981     /***
982      * {@inheritDoc}
983      *
984      * @see de.bea.domingo.DBaseDocument#generateXML(java.io.Writer)
985      */
986     public final void generateXML(final Writer writer) {
987         throw new UnsupportedOperationException("not supported in Http Document");
988     }
989 
990     /***
991      * {@inheritDoc}
992      *
993      * @see de.bea.domingo.DBaseDocument#getReceivedItemText()
994      */
995     public final List getReceivedItemText() {
996         throw new UnsupportedOperationException("not supported in Http Document");
997     }
998 
999     /***
1000      * {@inheritDoc}
1001      *
1002      * @see de.bea.domingo.DBaseDocument#getLockHolders()
1003      */
1004     public final List getLockHolders() {
1005         throw new UnsupportedOperationException("not supported in Http Document");
1006     }
1007 
1008     /***
1009      * {@inheritDoc}
1010      *
1011      * @see de.bea.domingo.DBaseDocument#lock()
1012      */
1013     public final boolean lock() {
1014         throw new UnsupportedOperationException("not supported in Http Document");
1015     }
1016 
1017     /***
1018      * {@inheritDoc}
1019      *
1020      * @see de.bea.domingo.DBaseDocument#lock(boolean)
1021      */
1022     public final boolean lock(final boolean provisionalOk) {
1023         throw new UnsupportedOperationException("not supported in Http Document");
1024     }
1025 
1026     /***
1027      * {@inheritDoc}
1028      *
1029      * @see de.bea.domingo.DBaseDocument#lock(java.lang.String)
1030      */
1031     public final boolean lock(final String name) {
1032         throw new UnsupportedOperationException("not supported in Http Document");
1033     }
1034 
1035     /***
1036      * {@inheritDoc}
1037      *
1038      * @see de.bea.domingo.DBaseDocument#lock(java.lang.String, boolean)
1039      */
1040     public final boolean lock(final String name, final boolean provisionalOk) {
1041         throw new UnsupportedOperationException("not supported in Http Document");
1042     }
1043 
1044     /***
1045      * {@inheritDoc}
1046      *
1047      * @see de.bea.domingo.DBaseDocument#lock(java.util.List)
1048      */
1049     public final boolean lock(final List names) {
1050         throw new UnsupportedOperationException("not supported in Http Document");
1051     }
1052 
1053     /***
1054      * {@inheritDoc}
1055      *
1056      * @see de.bea.domingo.DBaseDocument#lock(java.util.List, boolean)
1057      */
1058     public final boolean lock(final List names, final boolean provisionalOk) {
1059         throw new UnsupportedOperationException("not supported in Http Document");
1060     }
1061 
1062     /***
1063      * {@inheritDoc}
1064      *
1065      * @see de.bea.domingo.DBaseDocument#lockProvisional()
1066      */
1067     public final boolean lockProvisional() {
1068         throw new UnsupportedOperationException("not supported in Http Document");
1069     }
1070 
1071     /***
1072      * {@inheritDoc}
1073      *
1074      * @see de.bea.domingo.DBaseDocument#lockProvisional(java.lang.String)
1075      */
1076     public final boolean lockProvisional(final String name) {
1077         throw new UnsupportedOperationException("not supported in Http Document");
1078     }
1079 
1080     /***
1081      * {@inheritDoc}
1082      *
1083      * @see de.bea.domingo.DBaseDocument#lockProvisional(java.util.List)
1084      */
1085     public final boolean lockProvisional(final List names) {
1086         throw new UnsupportedOperationException("not supported in Http Document");
1087     }
1088 
1089     /***
1090      * {@inheritDoc}
1091      *
1092      * @see de.bea.domingo.DBaseDocument#unlock()
1093      */
1094     public final void unlock() {
1095         throw new UnsupportedOperationException("not supported in Http Document");
1096     }
1097 }