use of org.openntf.domino.View in project org.openntf.domino by OpenNTF.
the class DEdgeEntryList method filterEntryList.
@SuppressWarnings("deprecation")
public void filterEntryList(final List<CharSequence> list) {
ViewEntryCollection coll = null;
if (org.openntf.domino.View.class.equals(source_.getDelegateType())) {
View view = source_.getView();
Vector<Object> repeatKeys = new Vector<Object>();
repeatKeys.addAll(list);
coll = view.getAllEntriesByKey(repeatKeys, false);
if (coll.getCount() == 0) {
throw new KeyNotFoundException(list);
}
entryList_ = new ViewEntryList(coll);
} else {
throw new IllegalArgumentException("Cannot use filter keys on anything except a view root.");
}
}
use of org.openntf.domino.View in project org.openntf.domino by OpenNTF.
the class DocumentSyncHelper method process.
/**
* Process a specific document
*
* WARNING: Does not currently check that all properties of the SyncHelper have been set up
*
* @param doc
* Document to process
* @since ODA 3.2.0
*/
public void process(final Document doc) {
// TODO Check to make sure properties are all set up before running
Session session = doc.getAncestorSession();
Database targetDb = session.getDatabase(getTargetServer(), getTargetFilepath());
View targetView = targetDb.getView(getTargetLookupView());
Strategy strategy = getStrategy();
setTransactionRule(TransactionRule.NO_TRANSACTION);
processDocument(targetDb, targetView, strategy, null, doc);
}
use of org.openntf.domino.View in project org.openntf.domino by OpenNTF.
the class RawMessageProviderDBImpl method buildMsgCache.
/*----------------------------------------------------------------------------*/
private void buildMsgCache() {
iMsgCache = new TreeMap<String, Map<String, Map<String, String>>>();
/*
* To avoid PANIC-s from WrapperFactory.recacheLotusObject (when buildMsgCache is called again),
* this was partly modified
*/
try {
if (iDB == null) {
if (iDBPath == null)
return;
Session s = Factory.getSession_unchecked(SessionType.CURRENT);
if (s == null || (iDB = s.getDatabase(iDBServer, iDBPath)) == null) {
System.err.println("RawMessageProviderDBImpl: Can't open DB " + iDBServer + "!!" + iDBPath);
return;
}
}
View v = iDB.getView(iLookupView);
if (v == null)
return;
v.setAutoUpdate(false);
ViewNavigator nav = v.createViewNav();
for (ViewEntry ve = nav.getFirst(); ve != null; ve = nav.getNext()) oneDBMsgText(ve);
} catch (Throwable t) {
t.printStackTrace();
} finally {
iDB = null;
}
}
use of org.openntf.domino.View 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.View in project org.openntf.domino by OpenNTF.
the class SerializeTest method testViewReboot.
@Test
public void testViewReboot() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
View vw = sess.getDatabase("log.nsf").getViews().get(0);
View ret = test(vw, true);
assertFalse(vw == ret);
}
Aggregations