Type (NotesDatabase - JavaScript™)
Read-only. Database type.
Defined in
NotesDatabaseSyntax
getType() : int
Legal value | Description |
---|---|
1 NotesDatabase.DBTYPE_WEB_APP |
Web application |
2 NotesDatabase.DBTYPE_MAILFILE |
mail file |
3 NotesDatabase.DBTYPE_MAILBOX |
mailbox |
4 NotesDatabase.DBTYPE_SUBSCRIPTIONS |
subscriptions |
5 NotesDatabase.DBTYPE_NEWS_SVR_PROXY |
news server proxy |
6 NotesDatabase.DBTYPE_IMAP_SVR_PROXY |
IMAP server proxy |
7 NotesDatabase.DBTYPE_PORTFOLIO |
portfolio |
8 NotesDatabase.DBTYPE_MULTIDB_SRCH |
Domain Catalog |
9 NotesDatabase.DBTYPE_LIGHT_ADDR_BOOK |
Directory Catalog |
10 NotesDatabase.DBTYPE_ADDR_BOOK |
Domino® Directory or Personal Address Book |
11 NotesDatabase.DBTYPE_PERS_JOURNAL |
Personal Journal |
12 NotesDatabase.DBTYPE_LIBRARY |
database library |
13 NotesDatabase.DBTYPE_STANDARD |
standard |
Usage
The database must be open to use this property.Examples
This button gets the data type of the databases in the local directory.function getTypeString(type) {
var typeString = null;
switch (type) {
case NotesDatabase.DBTYPE_ADDR_BOOK: typeString = "Address book"; break;
case NotesDatabase.DBTYPE_IMAP_SVR_PROXY: typeString = "IMAP server proxy"; break;
case NotesDatabase.DBTYPE_LIBRARY: typeString = "Library"; break;
case NotesDatabase.DBTYPE_LIGHT_ADDR_BOOK: typeString = "Directory catalog (light address book)"; break;
case NotesDatabase.DBTYPE_MAILBOX: typeString = "Mailbox"; break;
case NotesDatabase.DBTYPE_MAILFILE: typeString = "Mail file"; break;
case NotesDatabase.DBTYPE_MULTIDB_SRCH: typeString = "Multi-database search"; break;
case NotesDatabase.DBTYPE_NEWS_SVR_PROXY: typeString = "News server proxy"; break;
case NotesDatabase.DBTYPE_PERS_JOURNAL: typeString = "Personal journal"; break;
case NotesDatabase.DBTYPE_PORTFOLIO: typeString = "Portfolio"; break;
case NotesDatabase.DBTYPE_STANDARD: typeString = "Standard"; break;
case NotesDatabase.DBTYPE_SUBSCRIPTIONS: typeString = "Subscriptions"; break;
case NotesDatabase.DBTYPE_WEB_APP: typeString = "Web application";
}
return typeString;
}
var dbdir:NotesDbDirectory = session.getDbDirectory("");
var db:NotesDatabase = dbdir.getFirstDatabase(NotesDbDirectory.DATABASE);
requestScope.status = "Local databases and types:";
while (db != null) {
db.open();
requestScope.status += "\n\t" + db.getTitle() +
" (" + db.getFileName() + ") " + getTypeString(db.getType());
db = dbdir.getNextDatabase();
}