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  import java.util.Calendar;
26  import java.util.Iterator;
27  import java.util.List;
28  
29  /***
30   * Represents a Notes database.
31   *
32   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
33   */
34  public interface DDatabase extends DBase {
35  
36      /***
37       * Sorts by relevance score. When a collection is sorted by relevance, the
38       * highest relevance appears first. To access the relevance score of each
39       * document in the collection, use the {@link DDocument#getFTSearchScore()}
40       * property in Document.
41       */
42      int FT_SCORES = 8;
43  
44      /*** Sorts by document creation date in descending order. */
45      int FT_DATE_DESCENDING = 32;
46  
47      /*** Sorts by document creation date in ascending order. */
48      int FT_DATE_ASCENDING = 64;
49  
50      /*** Sorts by document date in descending order. */
51      int FT_DATECREATED_DESCENDING = 1542;
52  
53      /*** Sorts by document date in ascending order. */
54      int FT_DATECREATED_ASCENDING = 1543;
55  
56      /*** Specifies a fuzzy search. */
57      int FT_FUZZY = 16384;
58  
59      /*** Uses stem words as the basis of the search. */
60      int FT_STEMS = 512;
61  
62      /***
63       * The Notes session that contains a database.
64       * @return the Notes session that contains a database.
65       */
66      DSession getSession();
67  
68      /***
69       * Replicates a local database with its replica(s) on a server.
70       * @param server The name of the server with which you want to replicate.
71       *        Any replica of the source database that exists on the server
72       *        will replicate.
73       * @return <code>true</code> if the database replicates without errors
74       *         <code>false</code> if replication errors occur
75       */
76      boolean replicate(String server);
77  
78      /***
79       * Permanently deletes the database.
80       *
81       * @return <code>true</code> if the database was removed successfully, else <code>false</code>
82       */
83      boolean remove();
84  
85      /***
86       * Returns an An unsorted collection containing all the documents in a
87       * database.
88       *
89       * @return Iterator
90       */
91      Iterator getAllDocuments();
92  
93      /***
94       * Finds a document in a database, given the document universal ID (UNID).
95       *
96       * <p>If the document document is already loaded, this method might return
97       * the same instance of the document or a new instance representing the
98       * same document. Mostly via local call, the same instance is returned and
99       * mostly via remote calls a new instance is returned. Your code should not
100      * rely on this behaviour.</p>
101      *
102      * @param docId Universal ID of a document
103      * @return DDocument or <code>null</code> if the document was not found
104      */
105     DDocument getDocumentByUNID(String docId);
106 
107     /***
108      * Finds a document in a database, given the document note ID.
109      *
110      * <p>If the document document is already loaded, this method might return
111      * the same instance of the document or a new instance representing the
112      * same document. Mostly via local call, the same instance is returned and
113      * mostly via remote calls a new instance is returned. Your code should not
114      * rely on this behaviour.</p>
115      *
116      * @param noteId NoteID
117      * @return DDocument
118      */
119     DDocument getDocumentByID(String noteId);
120 
121     /***
122      * Retrieves or creates a profile document.
123      *
124      * @param profileName name of a profile
125      * @param profileKey The unique key associated with the profile document.
126      *      Usually the userName. Can be <code>null</code> which indicates that
127      *      the returned document is a public profile.
128      * @return DProfileDocument or <code>null</code> if the document was not found
129      */
130     DProfileDocument getProfileDocument(String profileName, String profileKey);
131 
132     /***
133      * Creates a document in a database and returns a Document object that
134      * represents the new document.
135      *
136      * @return DDocument
137      */
138     DDocument createDocument();
139 
140     /***
141      * Finds a view or folder in a database, given the name or alias of the view
142      * or folder.
143      *
144      * @param viewName name of a view
145      * @return DView
146      */
147     DView getView(String viewName);
148 
149     /***
150      * The path and file name of a database.
151      *
152      * @return String
153      */
154     String getFilePath();
155 
156     /***
157      * The file name of a database, excluding the path.
158      *
159      * @return String
160      */
161     String getFileName();
162 
163     /***
164      * Create an empty database with the design of the given template.
165      *
166      * @param serverName notes server name
167      * @param newDatabaseName notes database filename
168      * @param inherit Specify <code>true</code> if you want the new database to
169      *        inherit future design changes from the template;
170      *        otherwise, specify false.
171      * @return DDatabase
172      * @throws DNotesException if current database is not a template
173      */
174     DDatabase createDatabaseFromTemplate(String serverName, String newDatabaseName, boolean inherit)
175         throws DNotesException;
176 
177     /***
178      * Creates a replica of the current database at a new location.
179      * The new replica has an identical access control list.
180      *
181      * <p><b>Usage</b><br/>
182      * If a database with the specified file name already exists, an exception
183      * is thrown. Programs running on a server or making remote (IIOP) calls
184      * to a server can't create or access databases on other servers.
185      * In these cases, the server parameter must correspond to the server the
186      * program is running on. There are two ways to do this:
187      * <ul>
188      * <li>Use null or an empty string ("") to indicate the current computer.
189      * This is the safer method.</li>
190      * <li>Make sure the name of the server that the program runs on matches
191      * the name of the server parameter.</li>
192      * </ul>
193      * </p>
194      * <p>Programs running on a workstation can access several different
195      * servers in a single program.</p>
196      *
197      * @param server The name of the server where the replica will reside.
198      *          Specify null or an empty string ("") to create a replica
199      *          on the current computer.
200      * @param filePath The file name of the replica.
201      * @return The new replica
202      * @throws DNotesException if creation of the new replica failed
203      */
204     DDatabase createReplica(String server, String filePath) throws DNotesException;
205 
206     /***
207      * The current user's access level to a database.
208      * <p>If a program runs on a workstation or is remote (IIOP),
209      * CurrentAccessLevel is determined by the access level of the current
210      * user.</p>
211      * <p>If a program runs on a server, CurrentAccessLevel is determined by the
212      * access level of the person who last saved the program (the owner).</p>
213      *
214      * <p><b>Legal values:</b><br/>
215      * <pre>DACL.LEVEL_AUTHOR
216      * DACL.LEVEL_DEPOSITOR
217      * DACL.LEVEL_DESIGNER
218      * DACL.LEVEL_EDITOR
219      * DACL.LEVEL_MANAGER
220      * DACL.LEVEL_NOACCESS
221      * DACL.LEVEL_READER</pre>
222      * </p>
223      * @return access level
224      *
225      * @see de.bea.domingo.DACL
226      */
227     int getCurrentAccessLevel();
228 
229     /***
230      * The name of the server where a database resides.
231      * <p>If the database is on a workstation, the property returns an empty
232      * string.</p>
233      *
234      * @return name of the server
235      */
236     String getServer();
237 
238     /***
239      * Finds an agent in a database, given the agent name.
240      *
241      * <p>The return value is null if the current user (as obtained by
242      * <code>Session.getUserName</code>) is not the owner of the private agent.</p>
243      *
244      * @param name the name of the agent.
245      * @return the agent whose name matches the parameter.
246      */
247     DAgent getAgent(String name);
248 
249     /***
250      * Indicates if a database is a Domino Directory.
251      *
252      * <p>This property is available for Database objects retrieved by
253      * {@link de.bea.domingo.DSession#getAddressBooks()} in
254      * {@link de.bea.domingo.DSession}. For other Database objects,
255      * this property has no value and evaluates to false.
256      *
257      * @return <code>true</code> if the database is a Domino Directory,
258      *         <code>false</code> if the database is not a Domino Directory
259      */
260     boolean isPublicAddressBook();
261 
262     /***
263      * Indicates if a database is a Personal Address Book.
264      *
265      * <p>This property is available for Database objects retrieved by
266      * {@link de.bea.domingo.DSession#getAddressBooks()} in
267      * {@link de.bea.domingo.DSession}. For other Database objects,
268      * this property has no value and evaluates to false.
269      *
270      * @return <code>true</code> if the database is a Personal Address Book,
271      *         <code>false</code> if the database is not Personal Address Book
272      */
273     boolean isPrivateAddressBook ();
274 
275     /***
276      * Indicates whether a database is open.
277      *
278      * <p><b>Usage</b></p>
279      * <p>A database must be open to use the Database methods except:
280      * {@link de.bea.domingo.DDatabase#getCategories()},
281      * {@link de.bea.domingo.DDatabase#isDelayUpdates()},
282      * {@link de.bea.domingo.DDatabase#getDesignTemplateName()},
283      * {@link de.bea.domingo.DDatabase#getFileName()},
284      * {@link de.bea.domingo.DDatabase#getFilePath()},
285      * {@link de.bea.domingo.DDatabase#isOpen()},
286      * {@link de.bea.domingo.DDatabase#isPrivateAddressBook()},
287      * {@link de.bea.domingo.DDatabase#isPublicAddressBook()},
288      * {@link de.bea.domingo.DDatabase#getSession()},
289      * {@link de.bea.domingo.DDatabase#getReplicaID()},
290      * {@link de.bea.domingo.DDatabase#getServer()},
291      * {@link de.bea.domingo.DDatabase#getSizeQuota()},
292      * {@link de.bea.domingo.DDatabase#getTemplateName()}, and
293      * {@link de.bea.domingo.DDatabase#getTitle()}.</p>
294      * <p>The following methods do not open a database:
295      * DbDirectory.getFirstDatabase, DbDirectory.getNextDatabase, and Session.getAddressBooks.
296      * You must explicitly call Database.open.</p>
297      *
298      * @return <code>true</code> if the database is open,
299      *         <code>false</code> if the database is not open
300      */
301     boolean isOpen();
302 
303     /***
304      * Opens a database.
305      *
306      * <p>A database must be open to use the Database properties and methods
307      * with some exceptions. Most methods that access a database open it,
308      * but some do not. See isOpen for details.</p>
309      * <p>An error is returned if the user does not have access rights to the
310      * database or server.</p>
311      *
312      * @return <code>true</code> if the database exists and is opened,
313      *         <code>false</code> if no database with this name exists
314      */
315     boolean open();
316 
317     /***
318      * The categories under which a database appears in the Database Library.
319      * Multiple categories are separated by a comma or semicolon.
320      *
321      * @return categories as a string
322      */
323     String getCategories();
324 
325     /***
326      * Indicates whether updates to a server are delayed (batched) for better
327      * performance.
328      *
329      * <p>If DelayUpdates is false, the program waits for updates to the server
330      * to be posted. If you set DelayUpdates to true, server updates are cached
331      * and the program proceeds immediately. At a convenient time, the cached
332      * updates are posted. This makes for better performance but risks losing
333      * the cached updates in the event of a crash. This method applies to save
334      * and remove operations on documents.</p>
335      * <p>Set this property each time you open a database. The property is not
336      * saved.</p>
337      *
338      * @return <code>true</code> if server delays updates,
339      *         <code>false</code> if server posts updates immediately
340      */
341     boolean isDelayUpdates();
342 
343     /***
344      * A 16-digit hexadecimal number that represents the replica ID of a Notes
345      * database. Databases with the same replica ID are replicas of one another.
346      *
347      * @return replica ID
348      */
349     String getReplicaID();
350 
351     /***
352      * The size quota of a database, in kilobytes.
353      *
354      * <p>The size quota for a database specifies the amount of disk space that
355      * the server administrator is willing to provide for the database.
356      * Therefore, the SizeQuota property can only be set by a program that has
357      * administrator access to the server on which the database resides. The
358      * size quota is not the same as the size limit that a user specifies when
359      * creating a new database.</p>
360      * <p>If the database has no size quota, this property returns 0.</p>
361      *
362      * @return size quota of a database in kilobytes
363      */
364     int getSizeQuota();
365 
366     /***
367      * The template name of a database, if the database is a template.
368      * If the database is not a template, returns an empty string.
369      *
370      * @return template name
371      */
372     String getTemplateName();
373 
374     /***
375      * The title of a database.
376      *
377      * The database does not need to be open to use this property.
378      *
379      * @return database title.
380      */
381     String getTitle();
382 
383     /***
384      * Sets the title of a database.
385      *
386      * A program cannot change the title of the database in which the program is currently running.
387      * The database does not need to be open to use this property.
388      *
389      * @param title new database title
390      */
391     void setTitle(String title);
392 
393     /***
394      * The name of the design template from which a database inherits its
395      * design. If the database does not inherit its design from a design
396      * template, returns an empty string.
397      *
398      * <p>If a database inherits a specific design element (such as a form)
399      * but not its entire design from a template, this property returns an
400      * empty string.</p>
401      *
402      * @return name of the design template from which a database inherits
403      *         its design
404      */
405     String getDesignTemplateName();
406 
407     /***
408      * Given selection criteria for a document, returns all documents
409      * in a database that meet the criteria.
410      *
411      * <p><b>Usage</b><br/>
412      * This method returns a maximum of 5,000 documents by default. The
413      * Notes.ini variable <tt>FT_MAX_SEARCH_RESULTS</tt> overrides this limit
414      * for indexed databases or databases that are not indexed but that are
415      * running an agent on the client. For a database that is not indexed and
416      * is running in an agent on the server, you must set the
417      * <tt>TEMP_INDEX_MAX_DOC</tt> Notes.ini variable as well.
418      * The absolute maximum value is 2,147,483,647.</p>
419      *
420      * @param formula Notes @-function formula that specifies the selection criteria
421      * @param dt A cutoff date. The method searches only documents created or
422      *              modified since the cutoff date. Can be null to indicate no
423      *              cutoff date.
424      * @param max The maximum number of documents you want returned.
425      *              Specify <tt>0</tt> to receive all matching documents
426      *              (up to 5,000. See Usage section.).
427      * @return An unsorted collection of documents that match the selection criteria.
428      */
429     Iterator search(String formula, Calendar dt, int max);
430 
431     /***
432      * Given selection criteria for a document, returns all documents
433      * in a database that meet the criteria.
434      *
435      * <p><b>Usage</b><br/>
436      * This method returns a maximum of 5,000 documents by default. The
437      * Notes.ini variable <tt>FT_MAX_SEARCH_RESULTS</tt> overrides this limit
438      * for indexed databases or databases that are not indexed but that are
439      * running an agent on the client. For a database that is not indexed and
440      * is running in an agent on the server, you must set the
441      * <tt>TEMP_INDEX_MAX_DOC</tt> Notes.ini variable as well.
442      * The absolute maximum value is 2,147,483,647.</p>
443      *
444      * @param formula Notes @-function formula that specifies the selection criteria
445      * @param dt A cutoff date. The method searches only documents created or
446      *              modified since the cutoff date. Can be null to indicate no
447      *              cutoff date.
448      * @return An unsorted collection of documents that match the selection criteria.
449      */
450     Iterator search(String formula, Calendar dt);
451 
452     /***
453      * Given selection criteria for a document, returns all documents
454      * in a database that meet the criteria.
455      *
456      * <p><b>Usage</b><br/>
457      * This method returns a maximum of 5,000 documents by default. The
458      * Notes.ini variable <tt>FT_MAX_SEARCH_RESULTS</tt> overrides this limit
459      * for indexed databases or databases that are not indexed but that are
460      * running an agent on the client. For a database that is not indexed and
461      * is running in an agent on the server, you must set the
462      * <tt>TEMP_INDEX_MAX_DOC</tt> Notes.ini variable as well.
463      * The absolute maximum value is 2,147,483,647.</p>
464      *
465      * @param formula Notes @-function formula that specifies the selection criteria
466      * @return An unsorted collection of documents that match the selection criteria.
467      */
468     Iterator search(String formula);
469 
470     /***
471      * Indicates whether or not a database has a full-text index.
472      *
473      * @return <code>true</code> if the database has a full-text index, else <code>false</code>
474      */
475     boolean isFTIndexed();
476 
477     /***
478      * Updates the full-text index of a database.
479      *
480      * <p><b>Usage</b></p>
481      * <p>An exception is thrown if you attempt to create a full-text index on a
482      * database that is not local. A database must contain at least one document
483      * in order for an index to be created, even if the create parameter is set
484      * to true.</p>
485      *
486      * @param create Specify <code>true</code> if you want to create an index
487      *            if none exists (valid only for local databases). Otherwise,
488      *            specify <code>false</code>.
489      */
490     void updateFTIndex(boolean create);
491 
492     /***
493      * Conducts a full-text search of all the documents in a database.
494      *
495      * <p><b>Usage</b></p>
496      * <p>This method is the same the same as
497      * {@link #fullTextSearch(String, int, int, int)} plus the start parameter. If the
498      * database is not full-text indexed, this method works, but less
499      * efficiently. To test for an index, use the {@link #isFTIndexed()}
500      * property. To create an index on a local database, use the
501      * {@link #updateFTIndex(boolean)} method. This method returns a maximum of
502      * 5,000 documents by default. The Notes.ini variable
503      * <code>FT_MAX_SEARCH_RESULTS</code> overrides this limit for indexed
504      * databases or databases that are not indexed but that are running in an
505      * agent on the client. For a database that is not indexed and is running in
506      * an agent on the server, you must set the <code>TEMP_INDEX_MAX_DOC</code>
507      * Notes.ini variable as well. The absolute maximum is 2,147,483,647. This
508      * method searches all documents in a database. To search only documents
509      * found in a particular view, use the {@link DView#fullTextSearch(String, int)}
510      * method in View. To search only documents found in a particular document
511      * collection, use the {@link DDocumentCollection#fullTextSearch(String, int)}
512      * method in class {@link DDocumentCollection}. If you don't specify any
513      * sort options, you get the documents sorted by relevance score. If you ask
514      * for a sort by date, you don't get relevance scores. A Newsletter object
515      * formats its doclink report with either the document creation date or the
516      * relevance score, depending on the sort options you use in the document
517      * collection. If the database has a multi-database index, you get a
518      * multi-database search. Navigation through the resulting document
519      * collection may be slow, but you can create a newsletter from the
520      * collection.</p>
521      *
522      * <p><b>Query syntax</b></p>
523      * <p>To search for a word or phrase, enter the word or phrase as is, except
524      * that search keywords must be enclosed in quotes. Remember to escape
525      * quotes if you are inside a literal. Wildcards, operators, and other
526      * syntax are permitted. For the complete syntax rules, see "Finding
527      * documents in a database" in Lotus Notes 6 Help.</p>
528      *
529      * @since Notes/Domino Release 6
530      *
531      * @param query The full-text query. See the "Query Syntax" for details
532      * @param max The maximum number of documents you want returned from the
533      *            query. Set this parameter to 0 to receive all matching
534      *            documents
535      * @param sortopt Use one of the following constants to specify a sorting
536      *            option: {@link #FT_SCORES},
537      *            {@link #FT_DATECREATED_DESCENDING},
538      *            {@link #FT_DATE_DESCENDING} or
539      *            {@link #FT_DATE_ASCENDING}
540      * @param otheropt Use the following constants to specify additional search
541      *            options. To specify more than one option, use a logical or
542      *            operation: {@link #FT_FUZZY} or
543      *            {@link #FT_STEMS}
544      * @param start The starting document to return.
545      * @return An iterator over documents that match the full-text query, sorted
546      *         by the selected option. If no matches are found, the iterator has
547      *         no elements.
548      */
549     Iterator fullTextSearchRange(String query, int max, int sortopt, int otheropt, int start);
550 
551     /***
552      * Conducts a full-text search of all the documents in a database.
553      *
554      * <p>See {@link #fullTextSearch(String, int, int, int)} for more details.</p>
555      *
556      * @param query The full-text query. See the "Query Syntax" for details
557      * @return An iterator over documents that match the full-text query, sorted
558      *         by the selected option. If no matches are found, the iterator has
559      *         no elements.
560      */
561     Iterator fullTextSearch(String query);
562 
563     /***
564      * Conducts a full-text search of all the documents in a database.
565      *
566      * <p>See {@link #fullTextSearch(String, int, int, int)} for more details.</p>
567      *
568      * @param query The full-text query. See the "Query Syntax" for details
569      * @param max The maximum number of documents you want returned from the
570      *            query. Set this parameter to 0 to receive all matching
571      *            documents (up to 5,000. See Usage)
572      * @return An iterator over documents that match the full-text query, sorted
573      *         by the selected option. If no matches are found, the iterator has
574      *         no elements.
575      */
576     Iterator fullTextSearch(String query, int max);
577 
578     /***
579      * Conducts a full-text search of all the documents in a database.
580      *
581      * <p><b>Usage</b></p> <p>This method is the same the same as
582      * {@link #fullTextSearchRange(String, int, int, int, int)} minus the start
583      * parameter. If the database is not full-text indexed, this method works,
584      * but less efficiently. To test for an index, use the
585      * {@link #isFTIndexed()} property. To create an index on a local database,
586      * use the {@link #updateFTIndex(boolean)} method. This method returns a
587      * maximum of 5,000 documents by default. The Notes.ini variable
588      * <code>FT_MAX_SEARCH_RESULTS</code> overrides this limit for indexed
589      * databases or databases that are not indexed but that are running in an
590      * agent on the client. For a database that is not indexed and is running in
591      * an agent on the server, you must set the <code>TEMP_INDEX_MAX_DOC</code>
592      * Notes.ini variable as well. The absolute maximum is 2,147,483,647. This
593      * method searches all documents in a database. To search only documents
594      * found in a particular view, use the {@link DView#fullTextSearch(String, int)}
595      * method in View. To search only documents found in a particular document
596      * collection, use the {@link DDocumentCollection#fullTextSearch(String, int)}
597      * method in class {@link DDocumentCollection}. If you don't specify any
598      * sort options, you get the documents sorted by relevance score. If you ask
599      * for a sort by date, you don't get relevance scores. A Newsletter object
600      * formats its doclink report with either the document creation date or the
601      * relevance score, depending on the sort options you use in the document
602      * collection. If the database has a multi-database index, you get a
603      * multi-database search. Navigation through the resulting document
604      * collection may be slow, but you can create a newsletter from the
605      * collection.</p>
606      *
607      * <p><b>Query syntax</b></p> <p>To search for a word or phrase, enter
608      * the word or phrase as is, except that search keywords must be enclosed in
609      * quotes. Remember to escape quotes if you are inside a literal. Wildcards,
610      * operators, and other syntax are permitted. For the complete syntax rules,
611      * see "Finding documents in a database" in Lotus Notes 6 Help.</p>
612      *
613      * @param query The full-text query. See the "Query Syntax" for details
614      * @param max The maximum number of documents you want returned from the
615      *            query. Set this parameter to 0 to receive all matching
616      *            documents (up to 5,000. See Usage)
617      * @param sortopt Use one of the following constants to specify a sorting
618      *            option: {@link #FT_SCORES},
619      *            {@link #FT_DATECREATED_DESCENDING},
620      *            {@link #FT_DATE_DESCENDING} or
621      *            {@link #FT_DATE_ASCENDING}
622      * @param otheropt Use the following constants to specify additional search
623      *            options. To specify more than one option, use a logical or
624      *            operation: {@link #FT_FUZZY} or
625      *            {@link #FT_STEMS}
626      * @return An iterator over documents that match the full-text query, sorted
627      *         by the selected option. If no matches are found, the iterator has
628      *         no elements.
629      */
630     Iterator fullTextSearch(String query, int max, int sortopt, int otheropt);
631 
632     /***
633      * Indicates whether document locking is enabled for a database.
634      *
635      * @return <code>true</code> if document locking is enabled,
636      *         <code>false</code> if document locking is not enabled
637      * @since Notes/Domino Release 6.5
638      */
639     boolean isDocumentLockingEnabled();
640 
641     /***
642      * Sets whether document locking is enabled for a database.
643      *
644      * @param flag <code>true</code> if document locking is enabled,
645      *         <code>false</code> if document locking is not enabled
646      * @since Notes/Domino Release 6.5
647      */
648     void setDocumentLockingEnabled(boolean flag);
649 
650     /***
651      * Indicates whether this database maintains folder references for
652      * documents.
653      *
654      * <p>The database must have the $FolderInfo and $FolderRefInfo hidden
655      * views to support folder references. These views can be copied from the
656      * mail template. This property does not return view references.</p>
657      *
658      * <p>The database must be at the Release 5 file format level or greater.</p>
659      *
660      * <p>Maintaining folder references impacts performance.</p>
661      *
662      * @return <code>true</code> maintains folder references,
663      *         <code>false</code> doesn't
664      */
665     boolean getFolderReferencesEnabled();
666 
667     /***
668      * Indicates whether this database maintains folder references for
669      * documents.
670      *
671      * <p>The database must have the $FolderInfo and $FolderRefInfo hidden
672      * views to support folder references. These views can be copied from the
673      * mail template. This property does not return view references.</p>
674      *
675      * <p>The database must be at the Release 5 file format level or greater.</p>
676      *
677      * <p>Maintaining folder references impacts performance.</p>
678      *
679      * @param flag <code>true</code> maintains folder references,
680      *         <code>false</code> doesn't
681      */
682     void setFolderReferencesEnabled(boolean flag);
683 
684     /***
685      * The views and folders in a database.
686      *
687      * Each element of the list represents a public view or folder in the
688      * database. If the database is local, personal folders are also included.
689      * The database must be open to use this property.
690      *
691      * @return list of views and folders in a database
692      */
693     List getViews();
694 
695     /***
696      * Returns a list of all forms in a database.
697      *
698      * @return list of {@link DForm}
699      */
700     List getForms();
701 
702     /***
703      * Returns the form with a given name.
704      * The database must be open to use this property.
705      * @param name name of the form
706      * @return {@link DForm}
707      */
708     DForm getForm(String name);
709 }