use of org.openntf.domino.Database in project org.openntf.domino by OpenNTF.
the class TimeSensitive method run.
@Override
public void run() {
Session s = Factory.getSession(SessionType.NATIVE);
DbDirectory dir = s.getDbDirectory(s.getServerName());
for (Database db : dir) {
if (null == db) {
// System.out.println("Database " + db.getFilePath() + " is null");
} else {
try {
for (View vw : db.getViews()) {
if (vw.isTimeSensitive()) {
System.out.println("TIME SENSITIVE: View " + vw.getName() + " in db " + db.getFilePath());
}
}
} catch (Exception e) {
System.out.println("Database " + db.getFilePath() + " cannot be opened");
}
}
}
}
use of org.openntf.domino.Database in project org.openntf.domino by OpenNTF.
the class ViewCheckUniqueTest method main.
public static void main(final String[] args) {
Session s = null;
Database d = null;
NotesThread.sinitThread();
try {
s = Factory.getSession(SessionType.CURRENT);
d = s.getDatabase("heracles/intec-pw", "OpenNTF\\OpenNTFDomino.nsf");
ViewCheckUniqueTest a = new ViewCheckUniqueTest(s, d);
a.NotesMain();
} catch (Exception e) {
e.printStackTrace();
} finally {
NotesThread.stermThread();
}
}
use of org.openntf.domino.Database in project org.openntf.domino by OpenNTF.
the class DesignClassTest method testCreation.
// @Test
public void testCreation() {
DbDirectory dbdir = Factory.getSession(SessionType.CURRENT).getDbDirectory("");
Database db = dbdir.createDatabase("D:/Daten/notesdaten_9/localdb/pw" + System.currentTimeMillis() + ".nsf", true);
AboutDocument abd = new org.openntf.domino.design.impl.AboutDocument(db);
abd.save();
}
use of org.openntf.domino.Database in project org.openntf.domino by OpenNTF.
the class DesignClassTest method testDBClassLoader.
// @Test
public void testDBClassLoader() throws ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
Database db = sess.getDatabase("D:/Daten/notesdaten_9/localdb/proglib4work2.nsf");
ClassLoader cl = new DatabaseClassLoader(db.getDesign(), Factory.getClassLoader(), true, true);
// XPage - java
Class<?> cls = cl.loadClass("de.foconis.core.util.LSStringUtil");
System.out.println(cls);
// JAR
cls = cl.loadClass("org.junit.Assert");
System.out.println(cls);
// Class<?> cls = cl.loadClass("com.googlecode.htmlcompressor.compressor.Compressor");
// Script-Lib
cls = cl.loadClass("FocMessageDigestFactory");
System.out.println(cls);
}
use of org.openntf.domino.Database in project org.openntf.domino by OpenNTF.
the class TestWrapperFactory method testWrapSession.
@Test
public void testWrapSession() throws Exception {
AllTests.session = Factory.getWrapperFactory().fromLotus(AllTests.lotusSession, Session.SCHEMA, null);
assertNotEquals("Wrapped session should not be null", null, AllTests.session);
System.out.println("Path is " + AllTests.EMPTY_DB);
Database db = AllTests.session.getDatabase(AllTests.EMPTY_DB);
assertNotNull(db);
Factory.setSessionFactory(() -> AllTests.session, SessionType.CURRENT);
}
Aggregations