use of org.openntf.domino.ext.Session.Fixes in project org.openntf.domino by OpenNTF.
the class AbstractSessionFactory method wrapSession.
protected Session wrapSession(final lotus.domino.Session raw, final boolean selfCreated) {
WrapperFactory wf = Factory.getWrapperFactory();
org.openntf.domino.Session sess = wf.fromLotus(raw, Session.SCHEMA, wf);
sess.setNoRecycle(!selfCreated);
Fixes[] fixes = Factory.getThreadConfig().fixes;
if (fixes != null) {
for (Fixes fix : fixes) {
if (fix.isKhan()) {
sess.setFixEnable(fix, true);
}
}
}
sess.setAutoMime(Factory.getThreadConfig().autoMime);
sess.setConvertMIME(false);
if (selfCreated && currentApiPath_ != null) {
Database db = sess.getCurrentDatabase();
if (db == null) {
db = sess.getDatabase(currentApiPath_);
setCurrentDatabase(sess, db);
}
}
return sess;
}
use of org.openntf.domino.ext.Session.Fixes in project org.openntf.domino by OpenNTF.
the class ODAGraphService method getDataServiceConfig.
protected ThreadConfig getDataServiceConfig() {
Fixes[] fixes = Fixes.values();
AutoMime autoMime = AutoMime.WRAP_32K;
boolean bubbleExceptions = false;
return new ThreadConfig(fixes, autoMime, bubbleExceptions);
}
use of org.openntf.domino.ext.Session.Fixes in project org.openntf.domino by OpenNTF.
the class AbstractXPageSessionFactory method wrapSession.
protected Session wrapSession(final lotus.domino.Session raw, final boolean selfCreated) {
Session sess = Factory.getWrapperFactory().fromLotus(raw, Session.SCHEMA, null);
sess.setNoRecycle(!selfCreated);
boolean allFix = true;
AutoMime autoMime = AutoMime.WRAP_32K;
boolean mimeFriendly = true;
boolean viewExactMatch = false;
if (NotesContext.getCurrentUnchecked() != null) {
allFix = ODAPlatform.isAppAllFix(null);
autoMime = ODAPlatform.getAppAutoMime(null);
mimeFriendly = ODAPlatform.isAppMimeFriendly(null);
viewExactMatch = ODAPlatform.isAppViewExactMatch(null);
}
if (allFix) {
for (Fixes fix : Fixes.values()) {
if (fix.isKhan()) {
sess.setFixEnable(fix, true);
}
}
}
sess.setAutoMime(autoMime);
sess.setViewExactMatch(viewExactMatch);
if (mimeFriendly) {
sess.setConvertMIME(false);
}
if (selfCreated && currentApiPath_ != null) {
Database db = sess.getCurrentDatabase();
if (db == null) {
db = sess.getDatabase(currentApiPath_);
setCurrentDatabase(sess, db);
}
}
return sess;
}
Aggregations