Page tree
Skip to end of metadata
Go to start of metadata

There are a host of database properties. Some have historically been accessible from Database class, but some are accessible only via DXL. You can view these in Domino Designer, in the Package Explorer view, by opening up AppProperties and database.properties.

How Are They Stored and Retrieved

The key here is that you need to export more than one design note to get the database element (e.g. export the ACL and Icon note, which is what's done in this design element). From here, all the properties visible on the Database Properties infobox in Notes are accessible as well as some database properties not exposed there (e.g. whether DAOS is enabled). Some are attributes of the database element, some are items on the Icon note. Some are set as attributes if they're checked, some set if they're not checked. Some are boolean values. Some, like fromtemplate, are text. Some, like softdeletionsexpirein or maxupdatedby, have numeric values stored as text attributes. The good news is the API makes them all accessible from the DatabaseDesign object, even if they're actually stored in the Icon note.

Retrieving the Database Design

To access the Database Design object for a specific database, just use Database.getDesign().

Database Properties

The Database Properties are available via the getDatabaseProperties and setDatabaseProperties methods. The getter returns a List<DbProperties> object and the setter takes a Map<DbProperties, Boolean>. However, some Database Properties cannot be set because they have specific setter methods (template name) or need to be enabled via server commands (e.g. DAOS). Below are the details of all the Database Properties available, where they appear on the Database Properties infobox and setter information.

On InfoboxLabelDatabase PropertyStored AsValueNotes
Basics TabUse JS when generating pagesUSE_JSusejavascriptinpages attributefalseMissing in DXL if checked
Basics TabRequire SSLREQUIRE_SSLrequiressl attributetrueMissing in DXL if not checked
Basics TabDon't Allow URL OpenNO_URL_OPENnourlopen attributetrueMissing in DXL if not checked
Basics TabEnable Enhanced HTML GenerationENHANCED_HTML$AllowPost8HTML item in Icon1Missing if not checked
Basics TabDon't Allow ICAABLOCK_ICAA$DisallowOpenInNBP item in Icon1Missing if not checked
Basics TabDisable Background AgentsDISABLE_BACKGROUND_AGENTSallowbackgroundagents attributefalseMissing if not checked
Basics TabAllow Stored FormsALLOW_STORED_FORMSallowstoredforms attributefalseMissing if checked
Basics TabDisplay Images After LoadingDEFER_IMAGE_LOADINGimageloadsdeferred attributetrueMissing in DXL if not checked
Basics TabAllow Document LockingALLOW_DOC_LOCKINGallowdocumentlocking attributetrueMissing in DXL if not checked
Basics TabInherit OS ThemeINHERIT_OS_THEMEinheritostheme attributetrueMissing in DXL if not checked
Cache Expiry Days (DDE)CSS files $CSSExpires in Icon2setCssExpiry(int), use Integer.MIN_VALUE to remove it. Added in ODA 4.3.0
Cache Expiry Days (DDE)Files $FileExpires in Icon2setFileExpiry(int), use Integer.MIN_VALUE to remove it. Added in ODA 4.3.0
Cache Expiry Days (DDE)Image Files $ImageExpires in icon2setImageExpiry(int), use Integer.MIN_VALUE to remove it. Added in ODA 4.3.0
Cache Expiry Days (DDE)JavaScript Files $JSExpires in Icon2setJsExpiry(int), use Integer.MIN_VALUE to remove it. Added in ODA 4.3.0
Design TabAllow Design LockingALLOW_DESIGN_LOCKINGallowdesignlocking attributetrueMissing in DXL if not checked
Design TabShow in Open DialogSHOW_IN_OPEN_DIALOGshowinopendialog attributefalseMissing in DXL if checked
Design TabInclude in Multi-Db IndexingMULTI_DB_INDEXINGmultidbindexed attributetrueMissing in DXL if not checked
Design TabDon't Mark Modified UnreadMODIFIED_NOT_UNREADmarkmodifiedunread attributefalseMissing in DXL if not checked
Design TabMark Parent on Reply / ForwardMARK_PARENT_REPLY_FORWARDtrackreplyforward attributetrueMissing in DXL if not checked
Design TabInherit Design from Master TemplateINHERIT_FROM_TEMPLATEfromtemplate attributedemoDatabaseDatabase Property determines if the database is set to inherit from a template. Use getTemplateName() to get the name of the template it inherits from. setTemplateName(String) must be used to set / clear the property.
Design TabDatabase File is a Master TemplateDB_IS_TEMPLATEtemplatename attributedemoDatabaseDatabase Property determines if the database is a template. Use getNameIfTemplate() to get the template name. setNameIfTemplate(String) must be used to set / clear the property.
Design TabList as Advanced Template in 'New Application' DialogADVANCED_TEMPLATEadvancedtemplate attributetrueMissing in DXL if not checked
Design TabMultilingualMULTILINGUALmultilingual attributetrueMissing in DXL if not checked
Launch TabRun server-based XPages apps directly on ServerLAUNCH_XPAGE_ON_SERVER$LaunchXPageRunOnServer on Icon1 Missing if not checked
Advanced TabDon't Maintain UnreadDONT_MAINTAIN_UNREADmaintainunread attributefalseMissing in DXL if checked
Advanced TabReplicate Unread MarksREPLICATE_UNREADreplicateunread attributeallUse specific setter, setReplicateUnreadSetting(UnreadReplicationSetting), to set or unset.
Advanced TabOptimize Document Table MapOPTIMIZE_DOC_MAPoptimizetablebitmap attributetrueMissing in DXL if not checked
Advanced TabDon't Overwrite Free SpaceDONT_OVERWRITE_FREE_SPACEoverwritefreespace attributefalseMissing in DXL if checked
Advanced TabMaintain Last AccessedMAINTAIN_LAST_ACCESSEDsavelastaccessed attributetrueMissing in DXL if not checked
Advanced TabDisable Transaction LoggingDISABLE_TRANSACTION_LOGGINGlogtransactions attributefalseMissing in DXL if checked
Advanced TabDon't Support Special Response HierarchyNO_SPECIAL_RESPONSE_HIERARCHYallowspecialhierarchy attributefalseMissing in DXL if not checked
Advanced TabUse LZ1 CompressionUSE_LZ1uselz1 attributetrueMissing in DXL if not checked
Advanced TabDon't Allow Headline MonitoringNO_HEADLINE_MONITORINGallowheadlinemonitoring attributefalseMissing in DXL if not checked
Advanced TabAllow More FieldsALLOW_MORE_FIELDSincreasemaxfields attributetrueMissing in DXL if not checked
Advanced TabSupport Response Thread HierarchySUPPORT_RESPONSE_THREADSsupportrespthread attributetrueMissing in DXL if not checked
Advanced TabDon't Allow Simple SearchNO_SIMPLE_SEARCHnosimplesearch attributetrueMissing in DXL if not checked
Advanced TabCompress DesignCOMPRESS_DESIGNcompressdesign attributetrueMissing in DXL if not checked
Advanced TabCompress DataCOMPRESS_DATAcompressdata attributetrueMissing in DXL if not checked
Advanced TabDisable Auto-Update ViewsNO_AUTO_VIEW_UPDATEnoautoviewupdate attributetrueMissing in DXL if not checked
Advanced TabDisable Export of View DataNO_EXPORT_VIEW$DisableExport in Icon1Missing if not checked
Advanced TabAllow Soft DeletionsALLOW_SOFT_DELETEallowsoftdeletion attributetrueMissing in DXL if not checked
Advanced TabPermanently Delete Documents AfterSOFT_DELETE_EXPIRYsoftdeletionsexpirein attribute48Use setSoftDeletionsExpireIn(int) to set. If integer.MIN_VALUE is passed, soft deletions are disabled and this attribute reset to 48.
Advanced TabLimit $UpdatedByMAX_UPDATED_BYmaxupdatedbyentries attribute32Use setMaxUpdatedBy(int) with a value greater than 0. If 0 or less, the attribute is removed.
Advanced TabLimit $RevisionsMAX_REVISIONSmaxrevisionentries attribute32Use setMaxRevisions(int) with a value greater than 0. If 0 or less, the attribute is removed.
Advanced TabAllow DASALLOW_DAS$AllowRESTDbAPI in Icon1

0 = NONE, 1 = VIEWS, 2 = VIEWSANDDOCUMENTS

Database Property identifies if it's 1 or 2. Use getDasMode to get specific mode, also accessible directly from IconNote class. Use setDasMode(DASMode) to set. Setter has been in IconNote since ODA 4.1.0 but was only added to DatabaseDesign class in 4.3.0.

Not ExposedDAOSDAOS_ENABLED$Daos in Icon1Must be set via server console command
Not Exposed16Mb Summary FieldsDOCUMENT_SUMMARY_16MB$LargeSummary in Icon1FP8+, must be set via server console command

Setting Database Properties

To set database properties that only take a boolean value, create a DbProperties Map and pass it into setDatabaseProperties() method. Properties that cannot be set or properties that have a specific setter will throw a runtime error with the relevant message. After setting any database properties you need to call DatabaseDesign.save(). If items in the Icon note have been updated, that will automatically get saved.

Example
Session s = Factory.getSession();

Database db = s.getDatabase("", "yourdb.nsf");
DatabaseDesign dbDesign = db.getDesign();

Map<DbProperties, Boolean> settings = new HashMap<DbProperties, Boolean>();
settings.put(DbProperties.DONT_MAINTAIN_UNREAD, false);  // note: will 'check' the property
settings.put(DbProperties.ALLOW_STORED_FORMS, false);  // note: will 'uncheck' the property

dbDesign.setDatabaseProperties(settings);
dbDesign.save();

The Icon note appears to get cached by the session. So there is no point calling the relevant getters to check if a database property like $AllowRESTDbAPIhas been updated - you'll get the value from the start of the request. If you want to check, run a separate subsequent request to the server.

Missing in DXL if not checked

  • No labels