use of org.openntf.domino.design.DatabaseDesign.DbProperties in project org.openntf.domino by OpenNTF.
the class DbPropTest method setDbInfo.
private void setDbInfo(final Database db) throws IOException {
DatabaseDesign dbDesign = (DatabaseDesign) db.getDesign();
HashMap<DbProperties, Boolean> props = new HashMap<>();
props.put(DbProperties.USE_JS, false);
props.put(DbProperties.REQUIRE_SSL, true);
props.put(DbProperties.NO_URL_OPEN, false);
props.put(DbProperties.ENHANCED_HTML, true);
dbDesign.setReplicateUnreadSetting(UnreadReplicationSetting.CLUSTER);
dbDesign.setDatabaseProperties(props);
dbDesign.setMaxRevisions(30);
dbDesign.save();
}
use of org.openntf.domino.design.DatabaseDesign.DbProperties in project org.openntf.domino by OpenNTF.
the class DbPropTest method getDbInfo.
private void getDbInfo(final Database db, final StringBuilder sb) {
DatabaseDesign dbDesign = (DatabaseDesign) db.getDesign();
List<DbProperties> props = dbDesign.getDatabaseProperties();
for (DbProperties prop : props) {
sb.append(prop);
addNewLine(sb);
}
sb.append(dbDesign.getTemplateName());
addNewLine(sb);
sb.append(dbDesign.getNameIfTemplate());
addNewLine(sb);
sb.append("DAS Setting = " + dbDesign.getDasMode().name());
addNewLine(sb);
sb.append("Replicate Unread = " + dbDesign.getReplicateUnreadSetting().name());
addNewLine(sb);
sb.append("Max Updated = " + dbDesign.getMaxUpdatedBy());
addNewLine(sb);
sb.append("Max Revisions = " + dbDesign.getMaxRevisions());
addNewLine(sb);
sb.append("Soft Deletes = " + dbDesign.getSoftDeletionsExpireIn());
}
use of org.openntf.domino.design.DatabaseDesign.DbProperties in project org.openntf.domino by OpenNTF.
the class FormTest method getDbInfo.
private void getDbInfo(final Database db, final StringBuilder sb) {
DatabaseDesign dbDesign = (DatabaseDesign) db.getDesign();
List<DbProperties> props = dbDesign.getDatabaseProperties();
for (DbProperties prop : props) {
sb.append(prop);
addNewLine(sb);
}
sb.append(dbDesign.getTemplateName());
addNewLine(sb);
sb.append(dbDesign.getNameIfTemplate());
addNewLine(sb);
sb.append("DAS Setting = " + dbDesign.getDasMode().name());
addNewLine(sb);
sb.append("Replicate Unread = " + dbDesign.getReplicateUnreadSetting().name());
addNewLine(sb);
sb.append("Max Updated = " + dbDesign.getMaxUpdatedBy());
addNewLine(sb);
sb.append("Max Revisions = " + dbDesign.getMaxRevisions());
addNewLine(sb);
sb.append("Soft Deletes = " + dbDesign.getSoftDeletionsExpireIn());
// dbDesign.setMaxRevisions(30);
// dbDesign.save();
}
use of org.openntf.domino.design.DatabaseDesign.DbProperties in project org.openntf.domino by OpenNTF.
the class TestDatabasePropertyWrapper method testProperty.
public void testProperty(DbProperties prop) {
HashMap<DbProperties, Boolean> props = new HashMap<DbProperties, Boolean>();
props.put(prop, true);
DatabaseDesign design = getNewSessionDesign();
design.setDatabaseProperties(props);
design.save();
design = getNewSessionDesign();
ArrayList<DbProperties> retProps = (ArrayList<DbProperties>) design.getDatabaseProperties();
assertTrue(retProps.contains(prop));
design = getNewSessionDesign();
props.put(prop, false);
design.setDatabaseProperties(props);
design.save();
design = getNewSessionDesign();
retProps = (ArrayList<DbProperties>) design.getDatabaseProperties();
assertFalse(retProps.contains(prop));
}
Aggregations