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;
24  
25  /***
26   * Represents an embedded object.
27   *
28   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
29   */
30  public interface DEmbeddedObject extends DBase {
31  
32      /*** Type of embedded object: object link. */
33      int EMBED_OBJECTLINK = 1452;
34  
35      /*** Type of embedded object: object. */
36      int EMBED_OBJECT = 1453;
37  
38      /*** Type of embedded object: attachment. */
39      int EMBED_ATTACHMENT = 1454;
40  
41      /***
42       * Writes a file attachment to storage. For embedded objects and object
43       * links, this method logs a warning.
44       *
45       * @param path The path and file name where you want to store the extracted
46       *            file.
47       */
48      void extractFile(String path);
49  
50      /***
51       * Removes an object, object link, or file attachment.
52       */
53      void remove();
54  
55      /***
56       * The name used to reference an file attachment (or object, object link).
57       *
58       * @return name of embedded object
59       */
60      String getName();
61  
62      /***
63       * For an object or object link, returns the internal name for the source
64       * document. For a file attachment, returns the file name of the original
65       * file.
66       *
67       * @return  internal name for the source document (objects or object links)
68       *          or file name of the original file (file attachments).
69       */
70      String getSource();
71  
72      /***
73       * Read-only. Indicates whether an embedded object is an object, an object
74       * link, or a file attachment.
75       *
76       * @return type of the embedded object (one of
77       *         <tt>{@link DEmbeddedObject#EMBED_OBJECT}</tt>,
78       *         <tt>{@link DEmbeddedObject#EMBED_OBJECTLINK}</tt> or
79       *         <tt>{@link DEmbeddedObject#EMBED_ATTACHMENT}</tt>)
80       */
81      int getType();
82  }